Spaces:
Sleeping
Sleeping
llama
commited on
Commit
β’
e1dfa10
1
Parent(s):
a16183f
Upload check.ipynb with huggingface_hub
Browse files- check.ipynb +132 -0
check.ipynb
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 4,
|
6 |
+
"id": "74ee58a0-8c1a-4650-bb45-367214130cde",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [
|
9 |
+
{
|
10 |
+
"name": "stdout",
|
11 |
+
"output_type": "stream",
|
12 |
+
"text": [
|
13 |
+
"Run this to confirm the notebook is working.\n"
|
14 |
+
]
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"source": [
|
18 |
+
"print(\"Run this to confirm the notebook is working.\")"
|
19 |
+
]
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"cell_type": "code",
|
23 |
+
"execution_count": null,
|
24 |
+
"id": "0889a582-4903-496f-99e7-7cdcdffe9f29",
|
25 |
+
"metadata": {},
|
26 |
+
"outputs": [],
|
27 |
+
"source": [
|
28 |
+
"# Please make sure you are logged in with `huggingface-cli login`"
|
29 |
+
]
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"cell_type": "code",
|
33 |
+
"execution_count": 6,
|
34 |
+
"id": "40b30b76-185c-4404-b5ed-157a7c745ce1",
|
35 |
+
"metadata": {
|
36 |
+
"collapsed": true,
|
37 |
+
"jupyter": {
|
38 |
+
"outputs_hidden": true
|
39 |
+
},
|
40 |
+
"tags": []
|
41 |
+
},
|
42 |
+
"outputs": [
|
43 |
+
{
|
44 |
+
"name": "stdout",
|
45 |
+
"output_type": "stream",
|
46 |
+
"text": [
|
47 |
+
"Collecting huggingface_hub\n",
|
48 |
+
" Downloading huggingface_hub-0.23.0-py3-none-any.whl (401 kB)\n",
|
49 |
+
"\u001b[K |ββββββββββββββββββββββββββββββββ| 401 kB 25.6 MB/s eta 0:00:01\n",
|
50 |
+
"\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (6.0.1)\n",
|
51 |
+
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (4.11.0)\n",
|
52 |
+
"Collecting filelock\n",
|
53 |
+
" Downloading filelock-3.14.0-py3-none-any.whl (12 kB)\n",
|
54 |
+
"Requirement already satisfied: tqdm>=4.42.1 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (4.61.2)\n",
|
55 |
+
"Requirement already satisfied: requests in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (2.31.0)\n",
|
56 |
+
"Collecting fsspec>=2023.5.0\n",
|
57 |
+
" Downloading fsspec-2024.5.0-py3-none-any.whl (316 kB)\n",
|
58 |
+
"\u001b[K |ββββββββββββββββββββββββββββββββ| 316 kB 143.8 MB/s eta 0:00:01\n",
|
59 |
+
"\u001b[?25hRequirement already satisfied: packaging>=20.9 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (24.0)\n",
|
60 |
+
"Requirement already satisfied: idna<4,>=2.5 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (2.10)\n",
|
61 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (3.3.2)\n",
|
62 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (1.26.6)\n",
|
63 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (2021.5.30)\n",
|
64 |
+
"Installing collected packages: fsspec, filelock, huggingface-hub\n",
|
65 |
+
"Successfully installed filelock-3.14.0 fsspec-2024.5.0 huggingface-hub-0.23.0\n"
|
66 |
+
]
|
67 |
+
}
|
68 |
+
],
|
69 |
+
"source": [
|
70 |
+
"!pip install huggingface_hub"
|
71 |
+
]
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"cell_type": "code",
|
75 |
+
"execution_count": 7,
|
76 |
+
"id": "03ad7b5e-24ae-49e5-8fa7-e6b30260012f",
|
77 |
+
"metadata": {},
|
78 |
+
"outputs": [],
|
79 |
+
"source": [
|
80 |
+
"from huggingface_hub import HfApi\n",
|
81 |
+
"\n",
|
82 |
+
"api = HfApi()\n"
|
83 |
+
]
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"cell_type": "code",
|
87 |
+
"execution_count": null,
|
88 |
+
"id": "f19b7b94-54d9-4c57-ad16-544b694d6d17",
|
89 |
+
"metadata": {
|
90 |
+
"tags": []
|
91 |
+
},
|
92 |
+
"outputs": [],
|
93 |
+
"source": [
|
94 |
+
"uploaded_file_info = api.upload_file(\n",
|
95 |
+
" path_or_fileobj=\"check.ipynb\",\n",
|
96 |
+
" path_in_repo=\"data1/check.ipynb\",\n",
|
97 |
+
" repo_id=\"FlawedLLM/Jupyter_Amex\",\n",
|
98 |
+
" repo_type=\"space\",\n",
|
99 |
+
")"
|
100 |
+
]
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"cell_type": "code",
|
104 |
+
"execution_count": null,
|
105 |
+
"id": "a7f4ee16-819d-4c43-a904-ed94b5d58a2f",
|
106 |
+
"metadata": {},
|
107 |
+
"outputs": [],
|
108 |
+
"source": []
|
109 |
+
}
|
110 |
+
],
|
111 |
+
"metadata": {
|
112 |
+
"kernelspec": {
|
113 |
+
"display_name": "Python 3 (ipykernel)",
|
114 |
+
"language": "python",
|
115 |
+
"name": "python3"
|
116 |
+
},
|
117 |
+
"language_info": {
|
118 |
+
"codemirror_mode": {
|
119 |
+
"name": "ipython",
|
120 |
+
"version": 3
|
121 |
+
},
|
122 |
+
"file_extension": ".py",
|
123 |
+
"mimetype": "text/x-python",
|
124 |
+
"name": "python",
|
125 |
+
"nbconvert_exporter": "python",
|
126 |
+
"pygments_lexer": "ipython3",
|
127 |
+
"version": "3.9.5"
|
128 |
+
}
|
129 |
+
},
|
130 |
+
"nbformat": 4,
|
131 |
+
"nbformat_minor": 5
|
132 |
+
}
|