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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "markdown",
|
5 |
+
"metadata": {
|
6 |
+
"id": "-iqK1uZxKOPk"
|
7 |
+
},
|
8 |
+
"source": []
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"cell_type": "code",
|
12 |
+
"execution_count": 3,
|
13 |
+
"metadata": {
|
14 |
+
"colab": {
|
15 |
+
"base_uri": "https://localhost:8080/"
|
16 |
+
},
|
17 |
+
"id": "BarGLJEUlp88",
|
18 |
+
"outputId": "84b24178-ffbb-4151-de2d-069dd5746ac7"
|
19 |
+
},
|
20 |
+
"outputs": [
|
21 |
+
{
|
22 |
+
"name": "stdout",
|
23 |
+
"output_type": "stream",
|
24 |
+
"text": [
|
25 |
+
"Requirement already satisfied: datasets in /usr/local/lib/python3.10/dist-packages (2.19.1)\n",
|
26 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.14.0)\n",
|
27 |
+
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.25.2)\n",
|
28 |
+
"Requirement already satisfied: pyarrow>=12.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (14.0.2)\n",
|
29 |
+
"Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets) (0.6)\n",
|
30 |
+
"Requirement already satisfied: dill<0.3.9,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.3.8)\n",
|
31 |
+
"Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.0.3)\n",
|
32 |
+
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.31.0)\n",
|
33 |
+
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.4)\n",
|
34 |
+
"Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.4.1)\n",
|
35 |
+
"Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets) (0.70.16)\n",
|
36 |
+
"Requirement already satisfied: fsspec[http]<=2024.3.1,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.6.0)\n",
|
37 |
+
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.5)\n",
|
38 |
+
"Requirement already satisfied: huggingface-hub>=0.21.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.23.0)\n",
|
39 |
+
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.0)\n",
|
40 |
+
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.1)\n",
|
41 |
+
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
|
42 |
+
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.2.0)\n",
|
43 |
+
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n",
|
44 |
+
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.5)\n",
|
45 |
+
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.4)\n",
|
46 |
+
"Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
|
47 |
+
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.2->datasets) (4.11.0)\n",
|
48 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.3.2)\n",
|
49 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.7)\n",
|
50 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2.0.7)\n",
|
51 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2024.2.2)\n",
|
52 |
+
"Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
|
53 |
+
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2023.4)\n",
|
54 |
+
"Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n",
|
55 |
+
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n"
|
56 |
+
]
|
57 |
+
}
|
58 |
+
],
|
59 |
+
"source": [
|
60 |
+
"pip install datasets"
|
61 |
+
]
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"cell_type": "code",
|
65 |
+
"execution_count": 1,
|
66 |
+
"metadata": {
|
67 |
+
"colab": {
|
68 |
+
"base_uri": "https://localhost:8080/"
|
69 |
+
},
|
70 |
+
"id": "MoeKcp3tlQSf",
|
71 |
+
"outputId": "1d6fd480-d37f-4028-de75-9595abc97464"
|
72 |
+
},
|
73 |
+
"outputs": [
|
74 |
+
{
|
75 |
+
"name": "stderr",
|
76 |
+
"output_type": "stream",
|
77 |
+
"text": [
|
78 |
+
"/home/user/Desktop/model/venv/lib/python3.11/site-packages/datasets/load.py:1486: FutureWarning: The repository for marsyas/gtzan contains custom code which must be executed to correctly load the dataset. You can inspect the repository content at https://hf.co/datasets/marsyas/gtzan\n",
|
79 |
+
"You can avoid this message in future by passing the argument `trust_remote_code=True`.\n",
|
80 |
+
"Passing `trust_remote_code=True` will be mandatory to load this dataset from the next major release of `datasets`.\n",
|
81 |
+
" warnings.warn(\n"
|
82 |
+
]
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"data": {
|
86 |
+
"text/plain": [
|
87 |
+
"DatasetDict({\n",
|
88 |
+
" train: Dataset({\n",
|
89 |
+
" features: ['file', 'audio', 'genre'],\n",
|
90 |
+
" num_rows: 999\n",
|
91 |
+
" })\n",
|
92 |
+
"})"
|
93 |
+
]
|
94 |
+
},
|
95 |
+
"execution_count": 1,
|
96 |
+
"metadata": {},
|
97 |
+
"output_type": "execute_result"
|
98 |
+
}
|
99 |
+
],
|
100 |
+
"source": [
|
101 |
+
"from datasets import load_dataset\n",
|
102 |
+
"\n",
|
103 |
+
"gtzan = load_dataset(\"marsyas/gtzan\", \"all\")\n",
|
104 |
+
"gtzan"
|
105 |
+
]
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"cell_type": "code",
|
109 |
+
"execution_count": 2,
|
110 |
+
"metadata": {
|
111 |
+
"colab": {
|
112 |
+
"base_uri": "https://localhost:8080/"
|
113 |
+
},
|
114 |
+
"id": "A3GolExklYZH",
|
115 |
+
"outputId": "bdf2d280-749a-4a62-b398-92aa9174079e"
|
116 |
+
},
|
117 |
+
"outputs": [
|
118 |
+
{
|
119 |
+
"data": {
|
120 |
+
"text/plain": [
|
121 |
+
"DatasetDict({\n",
|
122 |
+
" train: Dataset({\n",
|
123 |
+
" features: ['file', 'audio', 'genre'],\n",
|
124 |
+
" num_rows: 999\n",
|
125 |
+
" })\n",
|
126 |
+
"})"
|
127 |
+
]
|
128 |
+
},
|
129 |
+
"execution_count": 2,
|
130 |
+
"metadata": {},
|
131 |
+
"output_type": "execute_result"
|
132 |
+
}
|
133 |
+
],
|
134 |
+
"source": [
|
135 |
+
"gtzan"
|
136 |
+
]
|
137 |
+
},
|
138 |
+
{
|
139 |
+
"cell_type": "code",
|
140 |
+
"execution_count": 3,
|
141 |
+
"metadata": {
|
142 |
+
"id": "r7nBVDEKmKzq"
|
143 |
+
},
|
144 |
+
"outputs": [],
|
145 |
+
"source": [
|
146 |
+
"gtzan = gtzan['train'].train_test_split(seed=42, test_size=0.1)\n"
|
147 |
+
]
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"cell_type": "code",
|
151 |
+
"execution_count": 4,
|
152 |
+
"metadata": {
|
153 |
+
"colab": {
|
154 |
+
"base_uri": "https://localhost:8080/"
|
155 |
+
},
|
156 |
+
"id": "AVT3baEn9IAo",
|
157 |
+
"outputId": "8c3fe83a-b0a6-4427-c401-28722a4725fb"
|
158 |
+
},
|
159 |
+
"outputs": [
|
160 |
+
{
|
161 |
+
"data": {
|
162 |
+
"text/plain": [
|
163 |
+
"{'file': '/home/user/.cache/huggingface/datasets/downloads/extracted/8467212e1467f829ca8aa5be797cbd9704e95050d4c3e44235bb44dfacaa486f/genres/pop/pop.00098.wav',\n",
|
164 |
+
" 'audio': {'path': '/home/user/.cache/huggingface/datasets/downloads/extracted/8467212e1467f829ca8aa5be797cbd9704e95050d4c3e44235bb44dfacaa486f/genres/pop/pop.00098.wav',\n",
|
165 |
+
" 'array': array([ 0.10720825, 0.16122437, 0.28585815, ..., -0.22924805,\n",
|
166 |
+
" -0.20629883, -0.11334229]),\n",
|
167 |
+
" 'sampling_rate': 22050},\n",
|
168 |
+
" 'genre': 7}"
|
169 |
+
]
|
170 |
+
},
|
171 |
+
"execution_count": 4,
|
172 |
+
"metadata": {},
|
173 |
+
"output_type": "execute_result"
|
174 |
+
}
|
175 |
+
],
|
176 |
+
"source": [
|
177 |
+
"gtzan[\"train\"][0]"
|
178 |
+
]
|
179 |
+
},
|
180 |
+
{
|
181 |
+
"cell_type": "code",
|
182 |
+
"execution_count": 5,
|
183 |
+
"metadata": {
|
184 |
+
"colab": {
|
185 |
+
"base_uri": "https://localhost:8080/",
|
186 |
+
"height": 35
|
187 |
+
},
|
188 |
+
"id": "qrB5kdIx9WwX",
|
189 |
+
"outputId": "3c0eaa93-f8db-4b39-d5dd-d312d82cc554"
|
190 |
+
},
|
191 |
+
"outputs": [
|
192 |
+
{
|
193 |
+
"data": {
|
194 |
+
"text/plain": [
|
195 |
+
"'pop'"
|
196 |
+
]
|
197 |
+
},
|
198 |
+
"execution_count": 5,
|
199 |
+
"metadata": {},
|
200 |
+
"output_type": "execute_result"
|
201 |
+
}
|
202 |
+
],
|
203 |
+
"source": [
|
204 |
+
"id2label_fn = gtzan[\"train\"].features[\"genre\"].int2str\n",
|
205 |
+
"id2label_fn(gtzan[\"train\"][0][\"genre\"])"
|
206 |
+
]
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"cell_type": "code",
|
210 |
+
"execution_count": 6,
|
211 |
+
"metadata": {
|
212 |
+
"colab": {
|
213 |
+
"base_uri": "https://localhost:8080/"
|
214 |
+
},
|
215 |
+
"id": "MHzcJshE9b1B",
|
216 |
+
"outputId": "dff1405a-1070-44e5-eb08-ace3416df099"
|
217 |
+
},
|
218 |
+
"outputs": [
|
219 |
+
{
|
220 |
+
"data": {
|
221 |
+
"text/plain": [
|
222 |
+
"DatasetDict({\n",
|
223 |
+
" train: Dataset({\n",
|
224 |
+
" features: ['file', 'audio', 'genre'],\n",
|
225 |
+
" num_rows: 899\n",
|
226 |
+
" })\n",
|
227 |
+
" test: Dataset({\n",
|
228 |
+
" features: ['file', 'audio', 'genre'],\n",
|
229 |
+
" num_rows: 100\n",
|
230 |
+
" })\n",
|
231 |
+
"})"
|
232 |
+
]
|
233 |
+
},
|
234 |
+
"execution_count": 6,
|
235 |
+
"metadata": {},
|
236 |
+
"output_type": "execute_result"
|
237 |
+
}
|
238 |
+
],
|
239 |
+
"source": [
|
240 |
+
"gtzan"
|
241 |
+
]
|
242 |
+
},
|
243 |
+
{
|
244 |
+
"cell_type": "code",
|
245 |
+
"execution_count": 7,
|
246 |
+
"metadata": {
|
247 |
+
"colab": {
|
248 |
+
"base_uri": "https://localhost:8080/"
|
249 |
+
},
|
250 |
+
"id": "Q54XUqyW9opO",
|
251 |
+
"outputId": "2a03f78b-b911-42ea-ab87-0f8250cedb16"
|
252 |
+
},
|
253 |
+
"outputs": [
|
254 |
+
{
|
255 |
+
"name": "stdout",
|
256 |
+
"output_type": "stream",
|
257 |
+
"text": [
|
258 |
+
"Requirement already satisfied: gradio in ./venv/lib/python3.11/site-packages (4.31.4)\n",
|
259 |
+
"Requirement already satisfied: aiofiles<24.0,>=22.0 in ./venv/lib/python3.11/site-packages (from gradio) (23.2.1)\n",
|
260 |
+
"Requirement already satisfied: altair<6.0,>=4.2.0 in ./venv/lib/python3.11/site-packages (from gradio) (5.3.0)\n",
|
261 |
+
"Requirement already satisfied: fastapi in ./venv/lib/python3.11/site-packages (from gradio) (0.111.0)\n",
|
262 |
+
"Requirement already satisfied: ffmpy in ./venv/lib/python3.11/site-packages (from gradio) (0.3.2)\n",
|
263 |
+
"Requirement already satisfied: gradio-client==0.16.4 in ./venv/lib/python3.11/site-packages (from gradio) (0.16.4)\n",
|
264 |
+
"Requirement already satisfied: httpx>=0.24.1 in ./venv/lib/python3.11/site-packages (from gradio) (0.27.0)\n",
|
265 |
+
"Requirement already satisfied: huggingface-hub>=0.19.3 in ./venv/lib/python3.11/site-packages (from gradio) (0.23.0)\n",
|
266 |
+
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in ./venv/lib/python3.11/site-packages (from gradio) (6.4.0)\n",
|
267 |
+
"Requirement already satisfied: jinja2<4.0 in ./venv/lib/python3.11/site-packages (from gradio) (3.1.4)\n",
|
268 |
+
"Requirement already satisfied: markupsafe~=2.0 in ./venv/lib/python3.11/site-packages (from gradio) (2.1.5)\n",
|
269 |
+
"Requirement already satisfied: matplotlib~=3.0 in ./venv/lib/python3.11/site-packages (from gradio) (3.9.0)\n",
|
270 |
+
"Requirement already satisfied: numpy~=1.0 in ./venv/lib/python3.11/site-packages (from gradio) (1.26.4)\n",
|
271 |
+
"Requirement already satisfied: orjson~=3.0 in ./venv/lib/python3.11/site-packages (from gradio) (3.10.3)\n",
|
272 |
+
"Requirement already satisfied: packaging in ./venv/lib/python3.11/site-packages (from gradio) (24.0)\n",
|
273 |
+
"Requirement already satisfied: pandas<3.0,>=1.0 in ./venv/lib/python3.11/site-packages (from gradio) (2.2.2)\n",
|
274 |
+
"Requirement already satisfied: pillow<11.0,>=8.0 in ./venv/lib/python3.11/site-packages (from gradio) (10.3.0)\n",
|
275 |
+
"Requirement already satisfied: pydantic>=2.0 in ./venv/lib/python3.11/site-packages (from gradio) (2.7.1)\n",
|
276 |
+
"Requirement already satisfied: pydub in ./venv/lib/python3.11/site-packages (from gradio) (0.25.1)\n",
|
277 |
+
"Requirement already satisfied: python-multipart>=0.0.9 in ./venv/lib/python3.11/site-packages (from gradio) (0.0.9)\n",
|
278 |
+
"Requirement already satisfied: pyyaml<7.0,>=5.0 in ./venv/lib/python3.11/site-packages (from gradio) (6.0.1)\n",
|
279 |
+
"Requirement already satisfied: ruff>=0.2.2 in ./venv/lib/python3.11/site-packages (from gradio) (0.4.4)\n",
|
280 |
+
"Requirement already satisfied: semantic-version~=2.0 in ./venv/lib/python3.11/site-packages (from gradio) (2.10.0)\n",
|
281 |
+
"Requirement already satisfied: tomlkit==0.12.0 in ./venv/lib/python3.11/site-packages (from gradio) (0.12.0)\n",
|
282 |
+
"Requirement already satisfied: typer<1.0,>=0.12 in ./venv/lib/python3.11/site-packages (from gradio) (0.12.3)\n",
|
283 |
+
"Requirement already satisfied: typing-extensions~=4.0 in ./venv/lib/python3.11/site-packages (from gradio) (4.11.0)\n",
|
284 |
+
"Requirement already satisfied: urllib3~=2.0 in ./venv/lib/python3.11/site-packages (from gradio) (2.2.1)\n",
|
285 |
+
"Requirement already satisfied: uvicorn>=0.14.0 in ./venv/lib/python3.11/site-packages (from gradio) (0.29.0)\n",
|
286 |
+
"Requirement already satisfied: fsspec in ./venv/lib/python3.11/site-packages (from gradio-client==0.16.4->gradio) (2024.3.1)\n",
|
287 |
+
"Requirement already satisfied: websockets<12.0,>=10.0 in ./venv/lib/python3.11/site-packages (from gradio-client==0.16.4->gradio) (11.0.3)\n",
|
288 |
+
"Requirement already satisfied: jsonschema>=3.0 in ./venv/lib/python3.11/site-packages (from altair<6.0,>=4.2.0->gradio) (4.22.0)\n",
|
289 |
+
"Requirement already satisfied: toolz in ./venv/lib/python3.11/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.1)\n",
|
290 |
+
"Requirement already satisfied: anyio in ./venv/lib/python3.11/site-packages (from httpx>=0.24.1->gradio) (4.3.0)\n",
|
291 |
+
"Requirement already satisfied: certifi in ./venv/lib/python3.11/site-packages (from httpx>=0.24.1->gradio) (2024.2.2)\n",
|
292 |
+
"Requirement already satisfied: httpcore==1.* in ./venv/lib/python3.11/site-packages (from httpx>=0.24.1->gradio) (1.0.5)\n",
|
293 |
+
"Requirement already satisfied: idna in ./venv/lib/python3.11/site-packages (from httpx>=0.24.1->gradio) (3.7)\n",
|
294 |
+
"Requirement already satisfied: sniffio in ./venv/lib/python3.11/site-packages (from httpx>=0.24.1->gradio) (1.3.1)\n",
|
295 |
+
"Requirement already satisfied: h11<0.15,>=0.13 in ./venv/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
|
296 |
+
"Requirement already satisfied: filelock in ./venv/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (3.14.0)\n",
|
297 |
+
"Requirement already satisfied: requests in ./venv/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (2.31.0)\n",
|
298 |
+
"Requirement already satisfied: tqdm>=4.42.1 in ./venv/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (4.66.4)\n",
|
299 |
+
"Requirement already satisfied: contourpy>=1.0.1 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (1.2.1)\n",
|
300 |
+
"Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (0.12.1)\n",
|
301 |
+
"Requirement already satisfied: fonttools>=4.22.0 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (4.51.0)\n",
|
302 |
+
"Requirement already satisfied: kiwisolver>=1.3.1 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (1.4.5)\n",
|
303 |
+
"Requirement already satisfied: pyparsing>=2.3.1 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (3.1.2)\n",
|
304 |
+
"Requirement already satisfied: python-dateutil>=2.7 in ./venv/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (2.9.0.post0)\n",
|
305 |
+
"Requirement already satisfied: pytz>=2020.1 in ./venv/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
|
306 |
+
"Requirement already satisfied: tzdata>=2022.7 in ./venv/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
|
307 |
+
"Requirement already satisfied: annotated-types>=0.4.0 in ./venv/lib/python3.11/site-packages (from pydantic>=2.0->gradio) (0.6.0)\n",
|
308 |
+
"Requirement already satisfied: pydantic-core==2.18.2 in ./venv/lib/python3.11/site-packages (from pydantic>=2.0->gradio) (2.18.2)\n",
|
309 |
+
"Requirement already satisfied: click>=8.0.0 in ./venv/lib/python3.11/site-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
|
310 |
+
"Requirement already satisfied: shellingham>=1.3.0 in ./venv/lib/python3.11/site-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
|
311 |
+
"Requirement already satisfied: rich>=10.11.0 in ./venv/lib/python3.11/site-packages (from typer<1.0,>=0.12->gradio) (13.7.1)\n",
|
312 |
+
"Requirement already satisfied: starlette<0.38.0,>=0.37.2 in ./venv/lib/python3.11/site-packages (from fastapi->gradio) (0.37.2)\n",
|
313 |
+
"Requirement already satisfied: fastapi-cli>=0.0.2 in ./venv/lib/python3.11/site-packages (from fastapi->gradio) (0.0.4)\n",
|
314 |
+
"Requirement already satisfied: ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 in ./venv/lib/python3.11/site-packages (from fastapi->gradio) (5.10.0)\n",
|
315 |
+
"Requirement already satisfied: email_validator>=2.0.0 in ./venv/lib/python3.11/site-packages (from fastapi->gradio) (2.1.1)\n",
|
316 |
+
"Requirement already satisfied: dnspython>=2.0.0 in ./venv/lib/python3.11/site-packages (from email_validator>=2.0.0->fastapi->gradio) (2.6.1)\n",
|
317 |
+
"Requirement already satisfied: attrs>=22.2.0 in ./venv/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.2.0)\n",
|
318 |
+
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in ./venv/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.12.1)\n",
|
319 |
+
"Requirement already satisfied: referencing>=0.28.4 in ./venv/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.35.1)\n",
|
320 |
+
"Requirement already satisfied: rpds-py>=0.7.1 in ./venv/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.18.1)\n",
|
321 |
+
"Requirement already satisfied: six>=1.5 in ./venv/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
|
322 |
+
"Requirement already satisfied: markdown-it-py>=2.2.0 in ./venv/lib/python3.11/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
|
323 |
+
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./venv/lib/python3.11/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n",
|
324 |
+
"Requirement already satisfied: httptools>=0.5.0 in ./venv/lib/python3.11/site-packages (from uvicorn>=0.14.0->gradio) (0.6.1)\n",
|
325 |
+
"Requirement already satisfied: python-dotenv>=0.13 in ./venv/lib/python3.11/site-packages (from uvicorn>=0.14.0->gradio) (1.0.1)\n",
|
326 |
+
"Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in ./venv/lib/python3.11/site-packages (from uvicorn>=0.14.0->gradio) (0.19.0)\n",
|
327 |
+
"Requirement already satisfied: watchfiles>=0.13 in ./venv/lib/python3.11/site-packages (from uvicorn>=0.14.0->gradio) (0.21.0)\n",
|
328 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.11/site-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.3.2)\n",
|
329 |
+
"Requirement already satisfied: mdurl~=0.1 in ./venv/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
|
330 |
+
"Note: you may need to restart the kernel to use updated packages.\n"
|
331 |
+
]
|
332 |
+
}
|
333 |
+
],
|
334 |
+
"source": [
|
335 |
+
"pip install gradio"
|
336 |
+
]
|
337 |
+
},
|
338 |
+
{
|
339 |
+
"cell_type": "code",
|
340 |
+
"execution_count": 8,
|
341 |
+
"metadata": {
|
342 |
+
"id": "3nsunOhq9i6K"
|
343 |
+
},
|
344 |
+
"outputs": [],
|
345 |
+
"source": [
|
346 |
+
"import gradio as gr"
|
347 |
+
]
|
348 |
+
},
|
349 |
+
{
|
350 |
+
"cell_type": "code",
|
351 |
+
"execution_count": 9,
|
352 |
+
"metadata": {
|
353 |
+
"colab": {
|
354 |
+
"base_uri": "https://localhost:8080/",
|
355 |
+
"height": 715
|
356 |
+
},
|
357 |
+
"id": "wD4Jd7qg-ApE",
|
358 |
+
"outputId": "734b3fcf-6440-4b4b-8405-2c3a830e8569",
|
359 |
+
"scrolled": true
|
360 |
+
},
|
361 |
+
"outputs": [
|
362 |
+
{
|
363 |
+
"name": "stderr",
|
364 |
+
"output_type": "stream",
|
365 |
+
"text": [
|
366 |
+
"/home/user/Desktop/model/venv/lib/python3.11/site-packages/gradio/processing_utils.py:582: UserWarning: Trying to convert audio automatically from float64 to 16-bit int format.\n",
|
367 |
+
" warnings.warn(warning.format(data.dtype))\n"
|
368 |
+
]
|
369 |
+
},
|
370 |
+
{
|
371 |
+
"name": "stdout",
|
372 |
+
"output_type": "stream",
|
373 |
+
"text": [
|
374 |
+
"Running on local URL: http://127.0.0.1:7860\n",
|
375 |
+
"\n",
|
376 |
+
"To create a public link, set `share=True` in `launch()`.\n"
|
377 |
+
]
|
378 |
+
},
|
379 |
+
{
|
380 |
+
"data": {
|
381 |
+
"text/html": [
|
382 |
+
"<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
383 |
+
],
|
384 |
+
"text/plain": [
|
385 |
+
"<IPython.core.display.HTML object>"
|
386 |
+
]
|
387 |
+
},
|
388 |
+
"metadata": {},
|
389 |
+
"output_type": "display_data"
|
390 |
+
},
|
391 |
+
{
|
392 |
+
"name": "stdout",
|
393 |
+
"output_type": "stream",
|
394 |
+
"text": [
|
395 |
+
"Keyboard interruption in main thread... closing server.\n"
|
396 |
+
]
|
397 |
+
},
|
398 |
+
{
|
399 |
+
"data": {
|
400 |
+
"text/plain": []
|
401 |
+
},
|
402 |
+
"execution_count": 9,
|
403 |
+
"metadata": {},
|
404 |
+
"output_type": "execute_result"
|
405 |
+
}
|
406 |
+
],
|
407 |
+
"source": [
|
408 |
+
"def generate_audio():\n",
|
409 |
+
" example = gtzan[\"train\"].shuffle()[0]\n",
|
410 |
+
" audio = example[\"audio\"]\n",
|
411 |
+
" return (\n",
|
412 |
+
" audio[\"sampling_rate\"],\n",
|
413 |
+
" audio[\"array\"],\n",
|
414 |
+
" ), id2label_fn(example[\"genre\"])\n",
|
415 |
+
"\n",
|
416 |
+
"\n",
|
417 |
+
"with gr.Blocks() as demo:\n",
|
418 |
+
" with gr.Column():\n",
|
419 |
+
" for _ in range(4):\n",
|
420 |
+
" audio, label = generate_audio()\n",
|
421 |
+
" output = gr.Audio(audio, label=label)\n",
|
422 |
+
"\n",
|
423 |
+
"demo.launch(debug=True)\n"
|
424 |
+
]
|
425 |
+
},
|
426 |
+
{
|
427 |
+
"cell_type": "code",
|
428 |
+
"execution_count": 13,
|
429 |
+
"metadata": {
|
430 |
+
"id": "JUzgRS0J_DR8"
|
431 |
+
},
|
432 |
+
"outputs": [],
|
433 |
+
"source": [
|
434 |
+
"from transformers import AutoFeatureExtractor\n",
|
435 |
+
"\n",
|
436 |
+
"model_id = \"ntu-spml/distilhubert\"\n",
|
437 |
+
"feature_extractor = AutoFeatureExtractor.from_pretrained(\n",
|
438 |
+
" model_id, do_normalize=True, return_attention_mask=True\n",
|
439 |
+
")"
|
440 |
+
]
|
441 |
+
},
|
442 |
+
{
|
443 |
+
"cell_type": "code",
|
444 |
+
"execution_count": 14,
|
445 |
+
"metadata": {
|
446 |
+
"colab": {
|
447 |
+
"base_uri": "https://localhost:8080/"
|
448 |
+
},
|
449 |
+
"id": "rbQJMBRr_MJU",
|
450 |
+
"outputId": "0c8010d9-ab10-4970-de54-173ab7fb03c9"
|
451 |
+
},
|
452 |
+
"outputs": [
|
453 |
+
{
|
454 |
+
"data": {
|
455 |
+
"text/plain": [
|
456 |
+
"16000"
|
457 |
+
]
|
458 |
+
},
|
459 |
+
"execution_count": 14,
|
460 |
+
"metadata": {},
|
461 |
+
"output_type": "execute_result"
|
462 |
+
}
|
463 |
+
],
|
464 |
+
"source": [
|
465 |
+
"sampling_rate = feature_extractor.sampling_rate\n",
|
466 |
+
"sampling_rate"
|
467 |
+
]
|
468 |
+
},
|
469 |
+
{
|
470 |
+
"cell_type": "code",
|
471 |
+
"execution_count": 15,
|
472 |
+
"metadata": {
|
473 |
+
"id": "G_TXS3TE_Pom"
|
474 |
+
},
|
475 |
+
"outputs": [],
|
476 |
+
"source": [
|
477 |
+
"from datasets import Audio\n",
|
478 |
+
"\n",
|
479 |
+
"gtzan = gtzan.cast_column(\"audio\", Audio(sampling_rate=sampling_rate))"
|
480 |
+
]
|
481 |
+
},
|
482 |
+
{
|
483 |
+
"cell_type": "code",
|
484 |
+
"execution_count": 16,
|
485 |
+
"metadata": {
|
486 |
+
"colab": {
|
487 |
+
"base_uri": "https://localhost:8080/"
|
488 |
+
},
|
489 |
+
"id": "7VBWBOIv_VF9",
|
490 |
+
"outputId": "d7564201-e814-45bc-8254-5e2eebaf65b8"
|
491 |
+
},
|
492 |
+
"outputs": [
|
493 |
+
{
|
494 |
+
"data": {
|
495 |
+
"text/plain": [
|
496 |
+
"{'file': '/home/user/.cache/huggingface/datasets/downloads/extracted/8467212e1467f829ca8aa5be797cbd9704e95050d4c3e44235bb44dfacaa486f/genres/pop/pop.00098.wav',\n",
|
497 |
+
" 'audio': {'path': '/home/user/.cache/huggingface/datasets/downloads/extracted/8467212e1467f829ca8aa5be797cbd9704e95050d4c3e44235bb44dfacaa486f/genres/pop/pop.00098.wav',\n",
|
498 |
+
" 'array': array([ 0.0873509 , 0.20183384, 0.4790867 , ..., -0.18743178,\n",
|
499 |
+
" -0.23294401, -0.13517427]),\n",
|
500 |
+
" 'sampling_rate': 16000},\n",
|
501 |
+
" 'genre': 7}"
|
502 |
+
]
|
503 |
+
},
|
504 |
+
"execution_count": 16,
|
505 |
+
"metadata": {},
|
506 |
+
"output_type": "execute_result"
|
507 |
+
}
|
508 |
+
],
|
509 |
+
"source": [
|
510 |
+
"gtzan[\"train\"][0]"
|
511 |
+
]
|
512 |
+
},
|
513 |
+
{
|
514 |
+
"cell_type": "code",
|
515 |
+
"execution_count": 17,
|
516 |
+
"metadata": {
|
517 |
+
"colab": {
|
518 |
+
"base_uri": "https://localhost:8080/"
|
519 |
+
},
|
520 |
+
"id": "uTogCiaS_Y4R",
|
521 |
+
"outputId": "738eea16-68f8-4a0e-a8a3-6fbb3c21e69b"
|
522 |
+
},
|
523 |
+
"outputs": [
|
524 |
+
{
|
525 |
+
"name": "stdout",
|
526 |
+
"output_type": "stream",
|
527 |
+
"text": [
|
528 |
+
"Mean: 0.000185, Variance: 0.0493\n"
|
529 |
+
]
|
530 |
+
}
|
531 |
+
],
|
532 |
+
"source": [
|
533 |
+
"import numpy as np\n",
|
534 |
+
"\n",
|
535 |
+
"sample = gtzan[\"train\"][0][\"audio\"]\n",
|
536 |
+
"\n",
|
537 |
+
"print(f\"Mean: {np.mean(sample['array']):.3}, Variance: {np.var(sample['array']):.3}\")"
|
538 |
+
]
|
539 |
+
},
|
540 |
+
{
|
541 |
+
"cell_type": "code",
|
542 |
+
"execution_count": 18,
|
543 |
+
"metadata": {
|
544 |
+
"colab": {
|
545 |
+
"base_uri": "https://localhost:8080/"
|
546 |
+
},
|
547 |
+
"id": "F_NLE8xQ_cj6",
|
548 |
+
"outputId": "7d4aefe0-9249-4661-f80c-247d720bbac7"
|
549 |
+
},
|
550 |
+
"outputs": [
|
551 |
+
{
|
552 |
+
"name": "stdout",
|
553 |
+
"output_type": "stream",
|
554 |
+
"text": [
|
555 |
+
"inputs keys: ['input_values', 'attention_mask']\n",
|
556 |
+
"Mean: -7.45e-09, Variance: 1.0\n"
|
557 |
+
]
|
558 |
+
}
|
559 |
+
],
|
560 |
+
"source": [
|
561 |
+
"inputs = feature_extractor(sample[\"array\"], sampling_rate=sample[\"sampling_rate\"])\n",
|
562 |
+
"\n",
|
563 |
+
"print(f\"inputs keys: {list(inputs.keys())}\")\n",
|
564 |
+
"\n",
|
565 |
+
"print(\n",
|
566 |
+
" f\"Mean: {np.mean(inputs['input_values']):.3}, Variance: {np.var(inputs['input_values']):.3}\"\n",
|
567 |
+
")"
|
568 |
+
]
|
569 |
+
},
|
570 |
+
{
|
571 |
+
"cell_type": "code",
|
572 |
+
"execution_count": 19,
|
573 |
+
"metadata": {
|
574 |
+
"id": "QpQLm9B6_1FS"
|
575 |
+
},
|
576 |
+
"outputs": [],
|
577 |
+
"source": [
|
578 |
+
"max_duration = 30.0\n",
|
579 |
+
"\n",
|
580 |
+
"\n",
|
581 |
+
"def preprocess_function(examples):\n",
|
582 |
+
" audio_arrays = [x[\"array\"] for x in examples[\"audio\"]]\n",
|
583 |
+
" inputs = feature_extractor(\n",
|
584 |
+
" audio_arrays,\n",
|
585 |
+
" sampling_rate=feature_extractor.sampling_rate,\n",
|
586 |
+
" max_length=int(feature_extractor.sampling_rate * max_duration),\n",
|
587 |
+
" truncation=True,\n",
|
588 |
+
" return_attention_mask=True,\n",
|
589 |
+
" )\n",
|
590 |
+
" return inputs"
|
591 |
+
]
|
592 |
+
},
|
593 |
+
{
|
594 |
+
"cell_type": "code",
|
595 |
+
"execution_count": 20,
|
596 |
+
"metadata": {
|
597 |
+
"colab": {
|
598 |
+
"base_uri": "https://localhost:8080/"
|
599 |
+
},
|
600 |
+
"id": "VBMlZHdG_3qV",
|
601 |
+
"outputId": "caef6ff5-ad09-4cf7-ae29-011966eaf285"
|
602 |
+
},
|
603 |
+
"outputs": [
|
604 |
+
{
|
605 |
+
"data": {
|
606 |
+
"application/vnd.jupyter.widget-view+json": {
|
607 |
+
"model_id": "fde897eff7004793a268e47bab0aa2d2",
|
608 |
+
"version_major": 2,
|
609 |
+
"version_minor": 0
|
610 |
+
},
|
611 |
+
"text/plain": [
|
612 |
+
"Map: 0%| | 0/899 [00:00<?, ? examples/s]"
|
613 |
+
]
|
614 |
+
},
|
615 |
+
"metadata": {},
|
616 |
+
"output_type": "display_data"
|
617 |
+
},
|
618 |
+
{
|
619 |
+
"data": {
|
620 |
+
"application/vnd.jupyter.widget-view+json": {
|
621 |
+
"model_id": "d0b134557a964ec0b515e464335443c8",
|
622 |
+
"version_major": 2,
|
623 |
+
"version_minor": 0
|
624 |
+
},
|
625 |
+
"text/plain": [
|
626 |
+
"Map: 0%| | 0/100 [00:00<?, ? examples/s]"
|
627 |
+
]
|
628 |
+
},
|
629 |
+
"metadata": {},
|
630 |
+
"output_type": "display_data"
|
631 |
+
},
|
632 |
+
{
|
633 |
+
"data": {
|
634 |
+
"text/plain": [
|
635 |
+
"DatasetDict({\n",
|
636 |
+
" train: Dataset({\n",
|
637 |
+
" features: ['genre', 'input_values', 'attention_mask'],\n",
|
638 |
+
" num_rows: 899\n",
|
639 |
+
" })\n",
|
640 |
+
" test: Dataset({\n",
|
641 |
+
" features: ['genre', 'input_values', 'attention_mask'],\n",
|
642 |
+
" num_rows: 100\n",
|
643 |
+
" })\n",
|
644 |
+
"})"
|
645 |
+
]
|
646 |
+
},
|
647 |
+
"execution_count": 20,
|
648 |
+
"metadata": {},
|
649 |
+
"output_type": "execute_result"
|
650 |
+
}
|
651 |
+
],
|
652 |
+
"source": [
|
653 |
+
"gtzan_encoded = gtzan.map(\n",
|
654 |
+
" preprocess_function,\n",
|
655 |
+
" remove_columns=[\"audio\", \"file\"],\n",
|
656 |
+
" batched=True,\n",
|
657 |
+
" batch_size=100,\n",
|
658 |
+
" num_proc=1,\n",
|
659 |
+
")\n",
|
660 |
+
"gtzan_encoded"
|
661 |
+
]
|
662 |
+
},
|
663 |
+
{
|
664 |
+
"cell_type": "code",
|
665 |
+
"execution_count": 21,
|
666 |
+
"metadata": {
|
667 |
+
"id": "0APLcKcrAFYn"
|
668 |
+
},
|
669 |
+
"outputs": [],
|
670 |
+
"source": [
|
671 |
+
"gtzan_encoded = gtzan_encoded.rename_column(\"genre\", \"label\")\n"
|
672 |
+
]
|
673 |
+
},
|
674 |
+
{
|
675 |
+
"cell_type": "code",
|
676 |
+
"execution_count": 22,
|
677 |
+
"metadata": {
|
678 |
+
"colab": {
|
679 |
+
"base_uri": "https://localhost:8080/",
|
680 |
+
"height": 35
|
681 |
+
},
|
682 |
+
"id": "tUJf71lOARSn",
|
683 |
+
"outputId": "e87ce79c-f11c-494c-e82f-2e2a2cb8b4a0"
|
684 |
+
},
|
685 |
+
"outputs": [
|
686 |
+
{
|
687 |
+
"data": {
|
688 |
+
"text/plain": [
|
689 |
+
"'pop'"
|
690 |
+
]
|
691 |
+
},
|
692 |
+
"execution_count": 22,
|
693 |
+
"metadata": {},
|
694 |
+
"output_type": "execute_result"
|
695 |
+
}
|
696 |
+
],
|
697 |
+
"source": [
|
698 |
+
"id2label = {\n",
|
699 |
+
" str(i): id2label_fn(i)\n",
|
700 |
+
" for i in range(len(gtzan_encoded[\"train\"].features[\"label\"].names))\n",
|
701 |
+
"}\n",
|
702 |
+
"label2id = {v: k for k, v in id2label.items()}\n",
|
703 |
+
"\n",
|
704 |
+
"id2label[\"7\"]"
|
705 |
+
]
|
706 |
+
},
|
707 |
+
{
|
708 |
+
"cell_type": "code",
|
709 |
+
"execution_count": 23,
|
710 |
+
"metadata": {
|
711 |
+
"colab": {
|
712 |
+
"base_uri": "https://localhost:8080/"
|
713 |
+
},
|
714 |
+
"id": "f8yisCsFAUf6",
|
715 |
+
"outputId": "4b51980e-74fc-4bb9-b38b-8f27762a2bab"
|
716 |
+
},
|
717 |
+
"outputs": [
|
718 |
+
{
|
719 |
+
"name": "stderr",
|
720 |
+
"output_type": "stream",
|
721 |
+
"text": [
|
722 |
+
"Some weights of HubertForSequenceClassification were not initialized from the model checkpoint at ntu-spml/distilhubert and are newly initialized: ['classifier.bias', 'classifier.weight', 'encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1', 'projector.bias', 'projector.weight']\n",
|
723 |
+
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
|
724 |
+
]
|
725 |
+
}
|
726 |
+
],
|
727 |
+
"source": [
|
728 |
+
"from transformers import AutoModelForAudioClassification\n",
|
729 |
+
"\n",
|
730 |
+
"num_labels = len(id2label)\n",
|
731 |
+
"\n",
|
732 |
+
"model = AutoModelForAudioClassification.from_pretrained(\n",
|
733 |
+
" model_id,\n",
|
734 |
+
" num_labels=num_labels,\n",
|
735 |
+
" label2id=label2id,\n",
|
736 |
+
" id2label=id2label,\n",
|
737 |
+
")"
|
738 |
+
]
|
739 |
+
},
|
740 |
+
{
|
741 |
+
"cell_type": "code",
|
742 |
+
"execution_count": 24,
|
743 |
+
"metadata": {
|
744 |
+
"colab": {
|
745 |
+
"base_uri": "https://localhost:8080/",
|
746 |
+
"height": 145,
|
747 |
+
"referenced_widgets": [
|
748 |
+
"5f5bce14ffd54ce6aaddf7eee06b0780",
|
749 |
+
"227494428333441b891020e6f87b338b",
|
750 |
+
"f0bb2256813f416194677eb338417868",
|
751 |
+
"a0aca0338dec449b88c8285d1f0cbef7",
|
752 |
+
"50ba98fdb9ed47d1b6108c7aa4f1b088",
|
753 |
+
"5326b1b1e1094e55b7f1f3ceeb44621c",
|
754 |
+
"7bbce34b8ce5468eb7ef98efcba9ae70",
|
755 |
+
"fc03fa730876435487990cec90250e25",
|
756 |
+
"c1d6265183ba43d2935f5feff79187b7",
|
757 |
+
"00bfd21bca544c47bea6da0e0ce3487f",
|
758 |
+
"216d9091b816416f81033ef201d98bea",
|
759 |
+
"30df2beaf92d4d4ea31e5501918f07ba",
|
760 |
+
"d96f88c9819440d29611539bd2890260",
|
761 |
+
"8b6b79964e2042d8a853510727e2e34f",
|
762 |
+
"5640b91b99ed4e3c8182266e52a86ca8",
|
763 |
+
"5b7df71497b84943a7fabd68b9fdf031",
|
764 |
+
"faf2939133e54dffaa208a75c257d0d3",
|
765 |
+
"7c014d81820d4f598a26a9c28a558a0c",
|
766 |
+
"636229e44fd44ad699a1eaf2339752ad",
|
767 |
+
"335b02d36d1d4195a6bae34d480c8e5c",
|
768 |
+
"5fe3ce149760495482ed27d4437f948e",
|
769 |
+
"cdd0a406c34c49d495c83768bf277552",
|
770 |
+
"d565aba281334aefa921962b6f641379",
|
771 |
+
"ddbd15cd160847d7ad8c373c027bea5e",
|
772 |
+
"6b057e0d7c404cf1bea422f48e4781e8",
|
773 |
+
"f4bdef5898794847bc0c97ca759b8037",
|
774 |
+
"6a028ea873874b20b6cf7928ccd84538",
|
775 |
+
"046b245d59fa456c806d3a74e16e6daa",
|
776 |
+
"ff30d5707c0048058bf66f4d7cacaa53",
|
777 |
+
"289042798aa0494282fd02f8253e8764",
|
778 |
+
"c7ff28fb537347e09acaf84f23eea5ba",
|
779 |
+
"0dda3266d3ea493e83e3b1cf47f6524e"
|
780 |
+
]
|
781 |
+
},
|
782 |
+
"id": "uivN5iECAuBj",
|
783 |
+
"outputId": "94c3fc66-2d04-4a90-ccc4-6ccbee3c20e6"
|
784 |
+
},
|
785 |
+
"outputs": [
|
786 |
+
{
|
787 |
+
"data": {
|
788 |
+
"application/vnd.jupyter.widget-view+json": {
|
789 |
+
"model_id": "4f53d36c21a54abe830ef0ee181f58b8",
|
790 |
+
"version_major": 2,
|
791 |
+
"version_minor": 0
|
792 |
+
},
|
793 |
+
"text/plain": [
|
794 |
+
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
|
795 |
+
]
|
796 |
+
},
|
797 |
+
"metadata": {},
|
798 |
+
"output_type": "display_data"
|
799 |
+
}
|
800 |
+
],
|
801 |
+
"source": [
|
802 |
+
"from huggingface_hub import notebook_login\n",
|
803 |
+
"\n",
|
804 |
+
"notebook_login()"
|
805 |
+
]
|
806 |
+
},
|
807 |
+
{
|
808 |
+
"cell_type": "code",
|
809 |
+
"execution_count": 25,
|
810 |
+
"metadata": {
|
811 |
+
"colab": {
|
812 |
+
"base_uri": "https://localhost:8080/"
|
813 |
+
},
|
814 |
+
"id": "3b-CxXheA66s",
|
815 |
+
"outputId": "00d0f098-2af2-4475-edde-d74b726054e5"
|
816 |
+
},
|
817 |
+
"outputs": [
|
818 |
+
{
|
819 |
+
"name": "stdout",
|
820 |
+
"output_type": "stream",
|
821 |
+
"text": [
|
822 |
+
"Requirement already satisfied: accelerate in ./venv/lib/python3.11/site-packages (0.30.1)\n",
|
823 |
+
"Requirement already satisfied: numpy>=1.17 in ./venv/lib/python3.11/site-packages (from accelerate) (1.26.4)\n",
|
824 |
+
"Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.11/site-packages (from accelerate) (24.0)\n",
|
825 |
+
"Requirement already satisfied: psutil in ./venv/lib/python3.11/site-packages (from accelerate) (5.9.8)\n",
|
826 |
+
"Requirement already satisfied: pyyaml in ./venv/lib/python3.11/site-packages (from accelerate) (6.0.1)\n",
|
827 |
+
"Requirement already satisfied: torch>=1.10.0 in ./venv/lib/python3.11/site-packages (from accelerate) (2.3.0)\n",
|
828 |
+
"Requirement already satisfied: huggingface-hub in ./venv/lib/python3.11/site-packages (from accelerate) (0.23.0)\n",
|
829 |
+
"Requirement already satisfied: safetensors>=0.3.1 in ./venv/lib/python3.11/site-packages (from accelerate) (0.4.3)\n",
|
830 |
+
"Requirement already satisfied: filelock in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (3.14.0)\n",
|
831 |
+
"Requirement already satisfied: typing-extensions>=4.8.0 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (4.11.0)\n",
|
832 |
+
"Requirement already satisfied: sympy in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (1.12)\n",
|
833 |
+
"Requirement already satisfied: networkx in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (3.3)\n",
|
834 |
+
"Requirement already satisfied: jinja2 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (3.1.4)\n",
|
835 |
+
"Requirement already satisfied: fsspec in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (2024.3.1)\n",
|
836 |
+
"Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
|
837 |
+
"Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
|
838 |
+
"Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
|
839 |
+
"Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (8.9.2.26)\n",
|
840 |
+
"Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.3.1)\n",
|
841 |
+
"Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (11.0.2.54)\n",
|
842 |
+
"Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (10.3.2.106)\n",
|
843 |
+
"Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (11.4.5.107)\n",
|
844 |
+
"Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.0.106)\n",
|
845 |
+
"Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (2.20.5)\n",
|
846 |
+
"Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
|
847 |
+
"Requirement already satisfied: triton==2.3.0 in ./venv/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (2.3.0)\n",
|
848 |
+
"Requirement already satisfied: nvidia-nvjitlink-cu12 in ./venv/lib/python3.11/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.10.0->accelerate) (12.4.127)\n",
|
849 |
+
"Requirement already satisfied: requests in ./venv/lib/python3.11/site-packages (from huggingface-hub->accelerate) (2.31.0)\n",
|
850 |
+
"Requirement already satisfied: tqdm>=4.42.1 in ./venv/lib/python3.11/site-packages (from huggingface-hub->accelerate) (4.66.4)\n",
|
851 |
+
"Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.11/site-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.5)\n",
|
852 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.11/site-packages (from requests->huggingface-hub->accelerate) (3.3.2)\n",
|
853 |
+
"Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.11/site-packages (from requests->huggingface-hub->accelerate) (3.7)\n",
|
854 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.11/site-packages (from requests->huggingface-hub->accelerate) (2.2.1)\n",
|
855 |
+
"Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.11/site-packages (from requests->huggingface-hub->accelerate) (2024.2.2)\n",
|
856 |
+
"Requirement already satisfied: mpmath>=0.19 in ./venv/lib/python3.11/site-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)\n",
|
857 |
+
"Note: you may need to restart the kernel to use updated packages.\n"
|
858 |
+
]
|
859 |
+
}
|
860 |
+
],
|
861 |
+
"source": [
|
862 |
+
"pip install accelerate"
|
863 |
+
]
|
864 |
+
},
|
865 |
+
{
|
866 |
+
"cell_type": "code",
|
867 |
+
"execution_count": 23,
|
868 |
+
"metadata": {
|
869 |
+
"id": "4WBTkzyuCflX"
|
870 |
+
},
|
871 |
+
"outputs": [],
|
872 |
+
"source": []
|
873 |
+
},
|
874 |
+
{
|
875 |
+
"cell_type": "code",
|
876 |
+
"execution_count": 27,
|
877 |
+
"metadata": {
|
878 |
+
"id": "kntrjQoADPEK"
|
879 |
+
},
|
880 |
+
"outputs": [],
|
881 |
+
"source": [
|
882 |
+
"pip install -U transformers"
|
883 |
+
]
|
884 |
+
},
|
885 |
+
{
|
886 |
+
"cell_type": "code",
|
887 |
+
"execution_count": 31,
|
888 |
+
"metadata": {
|
889 |
+
"id": "9OlgmAR8A0mG"
|
890 |
+
},
|
891 |
+
"outputs": [],
|
892 |
+
"source": [
|
893 |
+
"from transformers import TrainingArguments\n",
|
894 |
+
"\n",
|
895 |
+
"model_name = model_id.split(\"/\")[-1]\n",
|
896 |
+
"batch_size = 8\n",
|
897 |
+
"gradient_accumulation_steps = 1\n",
|
898 |
+
"num_train_epochs = 10\n",
|
899 |
+
"\n"
|
900 |
+
]
|
901 |
+
},
|
902 |
+
{
|
903 |
+
"cell_type": "code",
|
904 |
+
"execution_count": 32,
|
905 |
+
"metadata": {
|
906 |
+
"id": "cv_Zd_jDC7gj"
|
907 |
+
},
|
908 |
+
"outputs": [
|
909 |
+
{
|
910 |
+
"name": "stderr",
|
911 |
+
"output_type": "stream",
|
912 |
+
"text": [
|
913 |
+
"/home/user/Desktop/model/venv/lib/python3.11/site-packages/transformers/training_args.py:1489: FutureWarning: using `no_cuda` is deprecated and will be removed in version 5.0 of 🤗 Transformers. Use `use_cpu` instead\n",
|
914 |
+
" warnings.warn(\n"
|
915 |
+
]
|
916 |
+
}
|
917 |
+
],
|
918 |
+
"source": [
|
919 |
+
"training_args = TrainingArguments(\n",
|
920 |
+
" f\"{model_name}-finetuned-gtzan\",\n",
|
921 |
+
" eval_strategy=\"epoch\",\n",
|
922 |
+
" save_strategy=\"epoch\",\n",
|
923 |
+
" learning_rate=5e-5,\n",
|
924 |
+
" per_device_train_batch_size=batch_size,\n",
|
925 |
+
" gradient_accumulation_steps=gradient_accumulation_steps,\n",
|
926 |
+
" per_device_eval_batch_size=batch_size,\n",
|
927 |
+
" num_train_epochs=num_train_epochs,\n",
|
928 |
+
" warmup_ratio=0.1,\n",
|
929 |
+
" logging_steps=5,\n",
|
930 |
+
" load_best_model_at_end=True,\n",
|
931 |
+
" metric_for_best_model=\"accuracy\",\n",
|
932 |
+
" fp16=False,\n",
|
933 |
+
" push_to_hub=True,\n",
|
934 |
+
" no_cuda=True\n",
|
935 |
+
")\n"
|
936 |
+
]
|
937 |
+
},
|
938 |
+
{
|
939 |
+
"cell_type": "code",
|
940 |
+
"execution_count": 30,
|
941 |
+
"metadata": {
|
942 |
+
"id": "QiawSGrUExT7"
|
943 |
+
},
|
944 |
+
"outputs": [],
|
945 |
+
"source": [
|
946 |
+
"pip install evaluate"
|
947 |
+
]
|
948 |
+
},
|
949 |
+
{
|
950 |
+
"cell_type": "code",
|
951 |
+
"execution_count": 33,
|
952 |
+
"metadata": {
|
953 |
+
"id": "LpvB8n1bEvVf"
|
954 |
+
},
|
955 |
+
"outputs": [],
|
956 |
+
"source": [
|
957 |
+
"import evaluate\n",
|
958 |
+
"import numpy as np\n",
|
959 |
+
"\n",
|
960 |
+
"metric = evaluate.load(\"accuracy\")\n",
|
961 |
+
"\n",
|
962 |
+
"\n",
|
963 |
+
"def compute_metrics(eval_pred):\n",
|
964 |
+
" \"\"\"Computes accuracy on a batch of predictions\"\"\"\n",
|
965 |
+
" predictions = np.argmax(eval_pred.predictions, axis=1)\n",
|
966 |
+
" return metric.compute(predictions=predictions, references=eval_pred.label_ids)"
|
967 |
+
]
|
968 |
+
},
|
969 |
+
{
|
970 |
+
"cell_type": "code",
|
971 |
+
"execution_count": 34,
|
972 |
+
"metadata": {
|
973 |
+
"id": "phMqgPQxE9yO"
|
974 |
+
},
|
975 |
+
"outputs": [],
|
976 |
+
"source": [
|
977 |
+
"from transformers import Trainer\n",
|
978 |
+
"\n",
|
979 |
+
"trainer = Trainer(\n",
|
980 |
+
" model,\n",
|
981 |
+
" training_args,\n",
|
982 |
+
" train_dataset=gtzan_encoded[\"train\"],\n",
|
983 |
+
" eval_dataset=gtzan_encoded[\"test\"],\n",
|
984 |
+
" tokenizer=feature_extractor,\n",
|
985 |
+
" compute_metrics=compute_metrics,\n",
|
986 |
+
")\n"
|
987 |
+
]
|
988 |
+
},
|
989 |
+
{
|
990 |
+
"cell_type": "code",
|
991 |
+
"execution_count": 35,
|
992 |
+
"metadata": {
|
993 |
+
"colab": {
|
994 |
+
"base_uri": "https://localhost:8080/",
|
995 |
+
"height": 141
|
996 |
+
},
|
997 |
+
"id": "QKMe0MmDF8YA",
|
998 |
+
"outputId": "990bc6fc-e340-49df-e110-ae151885313a"
|
999 |
+
},
|
1000 |
+
"outputs": [
|
1001 |
+
{
|
1002 |
+
"data": {
|
1003 |
+
"text/html": [
|
1004 |
+
"\n",
|
1005 |
+
" <div>\n",
|
1006 |
+
" \n",
|
1007 |
+
" <progress value='1130' max='1130' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
|
1008 |
+
" [1130/1130 6:29:30, Epoch 10/10]\n",
|
1009 |
+
" </div>\n",
|
1010 |
+
" <table border=\"1\" class=\"dataframe\">\n",
|
1011 |
+
" <thead>\n",
|
1012 |
+
" <tr style=\"text-align: left;\">\n",
|
1013 |
+
" <th>Epoch</th>\n",
|
1014 |
+
" <th>Training Loss</th>\n",
|
1015 |
+
" <th>Validation Loss</th>\n",
|
1016 |
+
" <th>Accuracy</th>\n",
|
1017 |
+
" </tr>\n",
|
1018 |
+
" </thead>\n",
|
1019 |
+
" <tbody>\n",
|
1020 |
+
" <tr>\n",
|
1021 |
+
" <td>1</td>\n",
|
1022 |
+
" <td>1.977700</td>\n",
|
1023 |
+
" <td>1.902388</td>\n",
|
1024 |
+
" <td>0.530000</td>\n",
|
1025 |
+
" </tr>\n",
|
1026 |
+
" <tr>\n",
|
1027 |
+
" <td>2</td>\n",
|
1028 |
+
" <td>1.182000</td>\n",
|
1029 |
+
" <td>1.280992</td>\n",
|
1030 |
+
" <td>0.650000</td>\n",
|
1031 |
+
" </tr>\n",
|
1032 |
+
" <tr>\n",
|
1033 |
+
" <td>3</td>\n",
|
1034 |
+
" <td>1.038300</td>\n",
|
1035 |
+
" <td>1.033311</td>\n",
|
1036 |
+
" <td>0.690000</td>\n",
|
1037 |
+
" </tr>\n",
|
1038 |
+
" <tr>\n",
|
1039 |
+
" <td>4</td>\n",
|
1040 |
+
" <td>0.654200</td>\n",
|
1041 |
+
" <td>0.885210</td>\n",
|
1042 |
+
" <td>0.720000</td>\n",
|
1043 |
+
" </tr>\n",
|
1044 |
+
" <tr>\n",
|
1045 |
+
" <td>5</td>\n",
|
1046 |
+
" <td>0.553500</td>\n",
|
1047 |
+
" <td>0.713898</td>\n",
|
1048 |
+
" <td>0.800000</td>\n",
|
1049 |
+
" </tr>\n",
|
1050 |
+
" <tr>\n",
|
1051 |
+
" <td>6</td>\n",
|
1052 |
+
" <td>0.475900</td>\n",
|
1053 |
+
" <td>0.584029</td>\n",
|
1054 |
+
" <td>0.840000</td>\n",
|
1055 |
+
" </tr>\n",
|
1056 |
+
" <tr>\n",
|
1057 |
+
" <td>7</td>\n",
|
1058 |
+
" <td>0.285600</td>\n",
|
1059 |
+
" <td>0.552340</td>\n",
|
1060 |
+
" <td>0.830000</td>\n",
|
1061 |
+
" </tr>\n",
|
1062 |
+
" <tr>\n",
|
1063 |
+
" <td>8</td>\n",
|
1064 |
+
" <td>0.145000</td>\n",
|
1065 |
+
" <td>0.631408</td>\n",
|
1066 |
+
" <td>0.800000</td>\n",
|
1067 |
+
" </tr>\n",
|
1068 |
+
" <tr>\n",
|
1069 |
+
" <td>9</td>\n",
|
1070 |
+
" <td>0.269300</td>\n",
|
1071 |
+
" <td>0.572215</td>\n",
|
1072 |
+
" <td>0.820000</td>\n",
|
1073 |
+
" </tr>\n",
|
1074 |
+
" <tr>\n",
|
1075 |
+
" <td>10</td>\n",
|
1076 |
+
" <td>0.171400</td>\n",
|
1077 |
+
" <td>0.589203</td>\n",
|
1078 |
+
" <td>0.800000</td>\n",
|
1079 |
+
" </tr>\n",
|
1080 |
+
" </tbody>\n",
|
1081 |
+
"</table><p>"
|
1082 |
+
],
|
1083 |
+
"text/plain": [
|
1084 |
+
"<IPython.core.display.HTML object>"
|
1085 |
+
]
|
1086 |
+
},
|
1087 |
+
"metadata": {},
|
1088 |
+
"output_type": "display_data"
|
1089 |
+
},
|
1090 |
+
{
|
1091 |
+
"data": {
|
1092 |
+
"text/plain": [
|
1093 |
+
"TrainOutput(global_step=1130, training_loss=0.7772156888668516, metrics={'train_runtime': 23391.7714, 'train_samples_per_second': 0.384, 'train_steps_per_second': 0.048, 'total_flos': 6.133988274624e+17, 'train_loss': 0.7772156888668516, 'epoch': 10.0})"
|
1094 |
+
]
|
1095 |
+
},
|
1096 |
+
"execution_count": 35,
|
1097 |
+
"metadata": {},
|
1098 |
+
"output_type": "execute_result"
|
1099 |
+
}
|
1100 |
+
],
|
1101 |
+
"source": [
|
1102 |
+
"trainer.train()"
|
1103 |
+
]
|
1104 |
+
},
|
1105 |
+
{
|
1106 |
+
"cell_type": "code",
|
1107 |
+
"execution_count": 36,
|
1108 |
+
"metadata": {},
|
1109 |
+
"outputs": [],
|
1110 |
+
"source": [
|
1111 |
+
"kwargs = {\n",
|
1112 |
+
" \"dataset_tags\": \"marsyas/gtzan\",\n",
|
1113 |
+
" \"dataset\": \"GTZAN\",\n",
|
1114 |
+
" \"model_name\": f\"{model_name}-finetuned-gtzan\",\n",
|
1115 |
+
" \"finetuned_from\": model_id,\n",
|
1116 |
+
" \"tasks\": \"audio-classification\",\n",
|
1117 |
+
"}\n"
|
1118 |
+
]
|
1119 |
+
},
|
1120 |
+
{
|
1121 |
+
"cell_type": "code",
|
1122 |
+
"execution_count": 37,
|
1123 |
+
"metadata": {},
|
1124 |
+
"outputs": [
|
1125 |
+
{
|
1126 |
+
"data": {
|
1127 |
+
"text/plain": [
|
1128 |
+
"CommitInfo(commit_url='https://huggingface.co/RiKrim/distilhubert-finetuned-gtzan/commit/e461b6291a9d20525c7079e316d8df42dcbd141c', commit_message='End of training', commit_description='', oid='e461b6291a9d20525c7079e316d8df42dcbd141c', pr_url=None, pr_revision=None, pr_num=None)"
|
1129 |
+
]
|
1130 |
+
},
|
1131 |
+
"execution_count": 37,
|
1132 |
+
"metadata": {},
|
1133 |
+
"output_type": "execute_result"
|
1134 |
+
}
|
1135 |
+
],
|
1136 |
+
"source": [
|
1137 |
+
"trainer.push_to_hub(**kwargs)\n"
|
1138 |
+
]
|
1139 |
+
},
|
1140 |
+
{
|
1141 |
+
"cell_type": "code",
|
1142 |
+
"execution_count": null,
|
1143 |
+
"metadata": {},
|
1144 |
+
"outputs": [],
|
1145 |
+
"source": []
|
1146 |
+
}
|
1147 |
+
],
|
1148 |
+
"metadata": {
|
1149 |
+
"colab": {
|
1150 |
+
"provenance": []
|
1151 |
+
},
|
1152 |
+
"kernelspec": {
|
1153 |
+
"display_name": "Python 3 (ipykernel)",
|
1154 |
+
"language": "python",
|
1155 |
+
"name": "python3"
|
1156 |
+
},
|
1157 |
+
"language_info": {
|
1158 |
+
"codemirror_mode": {
|
1159 |
+
"name": "ipython",
|
1160 |
+
"version": 3
|
1161 |
+
},
|
1162 |
+
"file_extension": ".py",
|
1163 |
+
"mimetype": "text/x-python",
|
1164 |
+
"name": "python",
|
1165 |
+
"nbconvert_exporter": "python",
|
1166 |
+
"pygments_lexer": "ipython3",
|
1167 |
+
"version": "3.11.6"
|
1168 |
+
},
|
1169 |
+
"widgets": {
|
1170 |
+
"application/vnd.jupyter.widget-state+json": {
|
1171 |
+
"00bfd21bca544c47bea6da0e0ce3487f": {
|
1172 |
+
"model_module": "@jupyter-widgets/base",
|
1173 |
+
"model_module_version": "1.2.0",
|
1174 |
+
"model_name": "LayoutModel",
|
1175 |
+
"state": {
|
1176 |
+
"_model_module": "@jupyter-widgets/base",
|
1177 |
+
"_model_module_version": "1.2.0",
|
1178 |
+
"_model_name": "LayoutModel",
|
1179 |
+
"_view_count": null,
|
1180 |
+
"_view_module": "@jupyter-widgets/base",
|
1181 |
+
"_view_module_version": "1.2.0",
|
1182 |
+
"_view_name": "LayoutView",
|
1183 |
+
"align_content": null,
|
1184 |
+
"align_items": null,
|
1185 |
+
"align_self": null,
|
1186 |
+
"border": null,
|
1187 |
+
"bottom": null,
|
1188 |
+
"display": null,
|
1189 |
+
"flex": null,
|
1190 |
+
"flex_flow": null,
|
1191 |
+
"grid_area": null,
|
1192 |
+
"grid_auto_columns": null,
|
1193 |
+
"grid_auto_flow": null,
|
1194 |
+
"grid_auto_rows": null,
|
1195 |
+
"grid_column": null,
|
1196 |
+
"grid_gap": null,
|
1197 |
+
"grid_row": null,
|
1198 |
+
"grid_template_areas": null,
|
1199 |
+
"grid_template_columns": null,
|
1200 |
+
"grid_template_rows": null,
|
1201 |
+
"height": null,
|
1202 |
+
"justify_content": null,
|
1203 |
+
"justify_items": null,
|
1204 |
+
"left": null,
|
1205 |
+
"margin": null,
|
1206 |
+
"max_height": null,
|
1207 |
+
"max_width": null,
|
1208 |
+
"min_height": null,
|
1209 |
+
"min_width": null,
|
1210 |
+
"object_fit": null,
|
1211 |
+
"object_position": null,
|
1212 |
+
"order": null,
|
1213 |
+
"overflow": null,
|
1214 |
+
"overflow_x": null,
|
1215 |
+
"overflow_y": null,
|
1216 |
+
"padding": null,
|
1217 |
+
"right": null,
|
1218 |
+
"top": null,
|
1219 |
+
"visibility": null,
|
1220 |
+
"width": null
|
1221 |
+
}
|
1222 |
+
},
|
1223 |
+
"046b245d59fa456c806d3a74e16e6daa": {
|
1224 |
+
"model_module": "@jupyter-widgets/controls",
|
1225 |
+
"model_module_version": "1.5.0",
|
1226 |
+
"model_name": "DescriptionStyleModel",
|
1227 |
+
"state": {
|
1228 |
+
"_model_module": "@jupyter-widgets/controls",
|
1229 |
+
"_model_module_version": "1.5.0",
|
1230 |
+
"_model_name": "DescriptionStyleModel",
|
1231 |
+
"_view_count": null,
|
1232 |
+
"_view_module": "@jupyter-widgets/base",
|
1233 |
+
"_view_module_version": "1.2.0",
|
1234 |
+
"_view_name": "StyleView",
|
1235 |
+
"description_width": ""
|
1236 |
+
}
|
1237 |
+
},
|
1238 |
+
"0dda3266d3ea493e83e3b1cf47f6524e": {
|
1239 |
+
"model_module": "@jupyter-widgets/controls",
|
1240 |
+
"model_module_version": "1.5.0",
|
1241 |
+
"model_name": "DescriptionStyleModel",
|
1242 |
+
"state": {
|
1243 |
+
"_model_module": "@jupyter-widgets/controls",
|
1244 |
+
"_model_module_version": "1.5.0",
|
1245 |
+
"_model_name": "DescriptionStyleModel",
|
1246 |
+
"_view_count": null,
|
1247 |
+
"_view_module": "@jupyter-widgets/base",
|
1248 |
+
"_view_module_version": "1.2.0",
|
1249 |
+
"_view_name": "StyleView",
|
1250 |
+
"description_width": ""
|
1251 |
+
}
|
1252 |
+
},
|
1253 |
+
"216d9091b816416f81033ef201d98bea": {
|
1254 |
+
"model_module": "@jupyter-widgets/controls",
|
1255 |
+
"model_module_version": "1.5.0",
|
1256 |
+
"model_name": "DescriptionStyleModel",
|
1257 |
+
"state": {
|
1258 |
+
"_model_module": "@jupyter-widgets/controls",
|
1259 |
+
"_model_module_version": "1.5.0",
|
1260 |
+
"_model_name": "DescriptionStyleModel",
|
1261 |
+
"_view_count": null,
|
1262 |
+
"_view_module": "@jupyter-widgets/base",
|
1263 |
+
"_view_module_version": "1.2.0",
|
1264 |
+
"_view_name": "StyleView",
|
1265 |
+
"description_width": ""
|
1266 |
+
}
|
1267 |
+
},
|
1268 |
+
"227494428333441b891020e6f87b338b": {
|
1269 |
+
"model_module": "@jupyter-widgets/controls",
|
1270 |
+
"model_module_version": "1.5.0",
|
1271 |
+
"model_name": "HTMLModel",
|
1272 |
+
"state": {
|
1273 |
+
"_dom_classes": [],
|
1274 |
+
"_model_module": "@jupyter-widgets/controls",
|
1275 |
+
"_model_module_version": "1.5.0",
|
1276 |
+
"_model_name": "HTMLModel",
|
1277 |
+
"_view_count": null,
|
1278 |
+
"_view_module": "@jupyter-widgets/controls",
|
1279 |
+
"_view_module_version": "1.5.0",
|
1280 |
+
"_view_name": "HTMLView",
|
1281 |
+
"description": "",
|
1282 |
+
"description_tooltip": null,
|
1283 |
+
"layout": "IPY_MODEL_fc03fa730876435487990cec90250e25",
|
1284 |
+
"placeholder": "",
|
1285 |
+
"style": "IPY_MODEL_c1d6265183ba43d2935f5feff79187b7",
|
1286 |
+
"value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
|
1287 |
+
}
|
1288 |
+
},
|
1289 |
+
"289042798aa0494282fd02f8253e8764": {
|
1290 |
+
"model_module": "@jupyter-widgets/controls",
|
1291 |
+
"model_module_version": "1.5.0",
|
1292 |
+
"model_name": "DescriptionStyleModel",
|
1293 |
+
"state": {
|
1294 |
+
"_model_module": "@jupyter-widgets/controls",
|
1295 |
+
"_model_module_version": "1.5.0",
|
1296 |
+
"_model_name": "DescriptionStyleModel",
|
1297 |
+
"_view_count": null,
|
1298 |
+
"_view_module": "@jupyter-widgets/base",
|
1299 |
+
"_view_module_version": "1.2.0",
|
1300 |
+
"_view_name": "StyleView",
|
1301 |
+
"description_width": ""
|
1302 |
+
}
|
1303 |
+
},
|
1304 |
+
"30df2beaf92d4d4ea31e5501918f07ba": {
|
1305 |
+
"model_module": "@jupyter-widgets/base",
|
1306 |
+
"model_module_version": "1.2.0",
|
1307 |
+
"model_name": "LayoutModel",
|
1308 |
+
"state": {
|
1309 |
+
"_model_module": "@jupyter-widgets/base",
|
1310 |
+
"_model_module_version": "1.2.0",
|
1311 |
+
"_model_name": "LayoutModel",
|
1312 |
+
"_view_count": null,
|
1313 |
+
"_view_module": "@jupyter-widgets/base",
|
1314 |
+
"_view_module_version": "1.2.0",
|
1315 |
+
"_view_name": "LayoutView",
|
1316 |
+
"align_content": null,
|
1317 |
+
"align_items": null,
|
1318 |
+
"align_self": null,
|
1319 |
+
"border": null,
|
1320 |
+
"bottom": null,
|
1321 |
+
"display": null,
|
1322 |
+
"flex": null,
|
1323 |
+
"flex_flow": null,
|
1324 |
+
"grid_area": null,
|
1325 |
+
"grid_auto_columns": null,
|
1326 |
+
"grid_auto_flow": null,
|
1327 |
+
"grid_auto_rows": null,
|
1328 |
+
"grid_column": null,
|
1329 |
+
"grid_gap": null,
|
1330 |
+
"grid_row": null,
|
1331 |
+
"grid_template_areas": null,
|
1332 |
+
"grid_template_columns": null,
|
1333 |
+
"grid_template_rows": null,
|
1334 |
+
"height": null,
|
1335 |
+
"justify_content": null,
|
1336 |
+
"justify_items": null,
|
1337 |
+
"left": null,
|
1338 |
+
"margin": null,
|
1339 |
+
"max_height": null,
|
1340 |
+
"max_width": null,
|
1341 |
+
"min_height": null,
|
1342 |
+
"min_width": null,
|
1343 |
+
"object_fit": null,
|
1344 |
+
"object_position": null,
|
1345 |
+
"order": null,
|
1346 |
+
"overflow": null,
|
1347 |
+
"overflow_x": null,
|
1348 |
+
"overflow_y": null,
|
1349 |
+
"padding": null,
|
1350 |
+
"right": null,
|
1351 |
+
"top": null,
|
1352 |
+
"visibility": null,
|
1353 |
+
"width": null
|
1354 |
+
}
|
1355 |
+
},
|
1356 |
+
"335b02d36d1d4195a6bae34d480c8e5c": {
|
1357 |
+
"model_module": "@jupyter-widgets/controls",
|
1358 |
+
"model_module_version": "1.5.0",
|
1359 |
+
"model_name": "DescriptionStyleModel",
|
1360 |
+
"state": {
|
1361 |
+
"_model_module": "@jupyter-widgets/controls",
|
1362 |
+
"_model_module_version": "1.5.0",
|
1363 |
+
"_model_name": "DescriptionStyleModel",
|
1364 |
+
"_view_count": null,
|
1365 |
+
"_view_module": "@jupyter-widgets/base",
|
1366 |
+
"_view_module_version": "1.2.0",
|
1367 |
+
"_view_name": "StyleView",
|
1368 |
+
"description_width": ""
|
1369 |
+
}
|
1370 |
+
},
|
1371 |
+
"50ba98fdb9ed47d1b6108c7aa4f1b088": {
|
1372 |
+
"model_module": "@jupyter-widgets/controls",
|
1373 |
+
"model_module_version": "1.5.0",
|
1374 |
+
"model_name": "ButtonModel",
|
1375 |
+
"state": {
|
1376 |
+
"_dom_classes": [],
|
1377 |
+
"_model_module": "@jupyter-widgets/controls",
|
1378 |
+
"_model_module_version": "1.5.0",
|
1379 |
+
"_model_name": "ButtonModel",
|
1380 |
+
"_view_count": null,
|
1381 |
+
"_view_module": "@jupyter-widgets/controls",
|
1382 |
+
"_view_module_version": "1.5.0",
|
1383 |
+
"_view_name": "ButtonView",
|
1384 |
+
"button_style": "",
|
1385 |
+
"description": "Login",
|
1386 |
+
"disabled": false,
|
1387 |
+
"icon": "",
|
1388 |
+
"layout": "IPY_MODEL_8b6b79964e2042d8a853510727e2e34f",
|
1389 |
+
"style": "IPY_MODEL_5640b91b99ed4e3c8182266e52a86ca8",
|
1390 |
+
"tooltip": ""
|
1391 |
+
}
|
1392 |
+
},
|
1393 |
+
"5326b1b1e1094e55b7f1f3ceeb44621c": {
|
1394 |
+
"model_module": "@jupyter-widgets/controls",
|
1395 |
+
"model_module_version": "1.5.0",
|
1396 |
+
"model_name": "HTMLModel",
|
1397 |
+
"state": {
|
1398 |
+
"_dom_classes": [],
|
1399 |
+
"_model_module": "@jupyter-widgets/controls",
|
1400 |
+
"_model_module_version": "1.5.0",
|
1401 |
+
"_model_name": "HTMLModel",
|
1402 |
+
"_view_count": null,
|
1403 |
+
"_view_module": "@jupyter-widgets/controls",
|
1404 |
+
"_view_module_version": "1.5.0",
|
1405 |
+
"_view_name": "HTMLView",
|
1406 |
+
"description": "",
|
1407 |
+
"description_tooltip": null,
|
1408 |
+
"layout": "IPY_MODEL_5b7df71497b84943a7fabd68b9fdf031",
|
1409 |
+
"placeholder": "",
|
1410 |
+
"style": "IPY_MODEL_faf2939133e54dffaa208a75c257d0d3",
|
1411 |
+
"value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
|
1412 |
+
}
|
1413 |
+
},
|
1414 |
+
"5640b91b99ed4e3c8182266e52a86ca8": {
|
1415 |
+
"model_module": "@jupyter-widgets/controls",
|
1416 |
+
"model_module_version": "1.5.0",
|
1417 |
+
"model_name": "ButtonStyleModel",
|
1418 |
+
"state": {
|
1419 |
+
"_model_module": "@jupyter-widgets/controls",
|
1420 |
+
"_model_module_version": "1.5.0",
|
1421 |
+
"_model_name": "ButtonStyleModel",
|
1422 |
+
"_view_count": null,
|
1423 |
+
"_view_module": "@jupyter-widgets/base",
|
1424 |
+
"_view_module_version": "1.2.0",
|
1425 |
+
"_view_name": "StyleView",
|
1426 |
+
"button_color": null,
|
1427 |
+
"font_weight": ""
|
1428 |
+
}
|
1429 |
+
},
|
1430 |
+
"5b7df71497b84943a7fabd68b9fdf031": {
|
1431 |
+
"model_module": "@jupyter-widgets/base",
|
1432 |
+
"model_module_version": "1.2.0",
|
1433 |
+
"model_name": "LayoutModel",
|
1434 |
+
"state": {
|
1435 |
+
"_model_module": "@jupyter-widgets/base",
|
1436 |
+
"_model_module_version": "1.2.0",
|
1437 |
+
"_model_name": "LayoutModel",
|
1438 |
+
"_view_count": null,
|
1439 |
+
"_view_module": "@jupyter-widgets/base",
|
1440 |
+
"_view_module_version": "1.2.0",
|
1441 |
+
"_view_name": "LayoutView",
|
1442 |
+
"align_content": null,
|
1443 |
+
"align_items": null,
|
1444 |
+
"align_self": null,
|
1445 |
+
"border": null,
|
1446 |
+
"bottom": null,
|
1447 |
+
"display": null,
|
1448 |
+
"flex": null,
|
1449 |
+
"flex_flow": null,
|
1450 |
+
"grid_area": null,
|
1451 |
+
"grid_auto_columns": null,
|
1452 |
+
"grid_auto_flow": null,
|
1453 |
+
"grid_auto_rows": null,
|
1454 |
+
"grid_column": null,
|
1455 |
+
"grid_gap": null,
|
1456 |
+
"grid_row": null,
|
1457 |
+
"grid_template_areas": null,
|
1458 |
+
"grid_template_columns": null,
|
1459 |
+
"grid_template_rows": null,
|
1460 |
+
"height": null,
|
1461 |
+
"justify_content": null,
|
1462 |
+
"justify_items": null,
|
1463 |
+
"left": null,
|
1464 |
+
"margin": null,
|
1465 |
+
"max_height": null,
|
1466 |
+
"max_width": null,
|
1467 |
+
"min_height": null,
|
1468 |
+
"min_width": null,
|
1469 |
+
"object_fit": null,
|
1470 |
+
"object_position": null,
|
1471 |
+
"order": null,
|
1472 |
+
"overflow": null,
|
1473 |
+
"overflow_x": null,
|
1474 |
+
"overflow_y": null,
|
1475 |
+
"padding": null,
|
1476 |
+
"right": null,
|
1477 |
+
"top": null,
|
1478 |
+
"visibility": null,
|
1479 |
+
"width": null
|
1480 |
+
}
|
1481 |
+
},
|
1482 |
+
"5f5bce14ffd54ce6aaddf7eee06b0780": {
|
1483 |
+
"model_module": "@jupyter-widgets/controls",
|
1484 |
+
"model_module_version": "1.5.0",
|
1485 |
+
"model_name": "VBoxModel",
|
1486 |
+
"state": {
|
1487 |
+
"_dom_classes": [],
|
1488 |
+
"_model_module": "@jupyter-widgets/controls",
|
1489 |
+
"_model_module_version": "1.5.0",
|
1490 |
+
"_model_name": "VBoxModel",
|
1491 |
+
"_view_count": null,
|
1492 |
+
"_view_module": "@jupyter-widgets/controls",
|
1493 |
+
"_view_module_version": "1.5.0",
|
1494 |
+
"_view_name": "VBoxView",
|
1495 |
+
"box_style": "",
|
1496 |
+
"children": [
|
1497 |
+
"IPY_MODEL_5fe3ce149760495482ed27d4437f948e",
|
1498 |
+
"IPY_MODEL_cdd0a406c34c49d495c83768bf277552",
|
1499 |
+
"IPY_MODEL_d565aba281334aefa921962b6f641379",
|
1500 |
+
"IPY_MODEL_ddbd15cd160847d7ad8c373c027bea5e"
|
1501 |
+
],
|
1502 |
+
"layout": "IPY_MODEL_7bbce34b8ce5468eb7ef98efcba9ae70"
|
1503 |
+
}
|
1504 |
+
},
|
1505 |
+
"5fe3ce149760495482ed27d4437f948e": {
|
1506 |
+
"model_module": "@jupyter-widgets/controls",
|
1507 |
+
"model_module_version": "1.5.0",
|
1508 |
+
"model_name": "LabelModel",
|
1509 |
+
"state": {
|
1510 |
+
"_dom_classes": [],
|
1511 |
+
"_model_module": "@jupyter-widgets/controls",
|
1512 |
+
"_model_module_version": "1.5.0",
|
1513 |
+
"_model_name": "LabelModel",
|
1514 |
+
"_view_count": null,
|
1515 |
+
"_view_module": "@jupyter-widgets/controls",
|
1516 |
+
"_view_module_version": "1.5.0",
|
1517 |
+
"_view_name": "LabelView",
|
1518 |
+
"description": "",
|
1519 |
+
"description_tooltip": null,
|
1520 |
+
"layout": "IPY_MODEL_6b057e0d7c404cf1bea422f48e4781e8",
|
1521 |
+
"placeholder": "",
|
1522 |
+
"style": "IPY_MODEL_f4bdef5898794847bc0c97ca759b8037",
|
1523 |
+
"value": "Token is valid (permission: fineGrained)."
|
1524 |
+
}
|
1525 |
+
},
|
1526 |
+
"636229e44fd44ad699a1eaf2339752ad": {
|
1527 |
+
"model_module": "@jupyter-widgets/base",
|
1528 |
+
"model_module_version": "1.2.0",
|
1529 |
+
"model_name": "LayoutModel",
|
1530 |
+
"state": {
|
1531 |
+
"_model_module": "@jupyter-widgets/base",
|
1532 |
+
"_model_module_version": "1.2.0",
|
1533 |
+
"_model_name": "LayoutModel",
|
1534 |
+
"_view_count": null,
|
1535 |
+
"_view_module": "@jupyter-widgets/base",
|
1536 |
+
"_view_module_version": "1.2.0",
|
1537 |
+
"_view_name": "LayoutView",
|
1538 |
+
"align_content": null,
|
1539 |
+
"align_items": null,
|
1540 |
+
"align_self": null,
|
1541 |
+
"border": null,
|
1542 |
+
"bottom": null,
|
1543 |
+
"display": null,
|
1544 |
+
"flex": null,
|
1545 |
+
"flex_flow": null,
|
1546 |
+
"grid_area": null,
|
1547 |
+
"grid_auto_columns": null,
|
1548 |
+
"grid_auto_flow": null,
|
1549 |
+
"grid_auto_rows": null,
|
1550 |
+
"grid_column": null,
|
1551 |
+
"grid_gap": null,
|
1552 |
+
"grid_row": null,
|
1553 |
+
"grid_template_areas": null,
|
1554 |
+
"grid_template_columns": null,
|
1555 |
+
"grid_template_rows": null,
|
1556 |
+
"height": null,
|
1557 |
+
"justify_content": null,
|
1558 |
+
"justify_items": null,
|
1559 |
+
"left": null,
|
1560 |
+
"margin": null,
|
1561 |
+
"max_height": null,
|
1562 |
+
"max_width": null,
|
1563 |
+
"min_height": null,
|
1564 |
+
"min_width": null,
|
1565 |
+
"object_fit": null,
|
1566 |
+
"object_position": null,
|
1567 |
+
"order": null,
|
1568 |
+
"overflow": null,
|
1569 |
+
"overflow_x": null,
|
1570 |
+
"overflow_y": null,
|
1571 |
+
"padding": null,
|
1572 |
+
"right": null,
|
1573 |
+
"top": null,
|
1574 |
+
"visibility": null,
|
1575 |
+
"width": null
|
1576 |
+
}
|
1577 |
+
},
|
1578 |
+
"6a028ea873874b20b6cf7928ccd84538": {
|
1579 |
+
"model_module": "@jupyter-widgets/base",
|
1580 |
+
"model_module_version": "1.2.0",
|
1581 |
+
"model_name": "LayoutModel",
|
1582 |
+
"state": {
|
1583 |
+
"_model_module": "@jupyter-widgets/base",
|
1584 |
+
"_model_module_version": "1.2.0",
|
1585 |
+
"_model_name": "LayoutModel",
|
1586 |
+
"_view_count": null,
|
1587 |
+
"_view_module": "@jupyter-widgets/base",
|
1588 |
+
"_view_module_version": "1.2.0",
|
1589 |
+
"_view_name": "LayoutView",
|
1590 |
+
"align_content": null,
|
1591 |
+
"align_items": null,
|
1592 |
+
"align_self": null,
|
1593 |
+
"border": null,
|
1594 |
+
"bottom": null,
|
1595 |
+
"display": null,
|
1596 |
+
"flex": null,
|
1597 |
+
"flex_flow": null,
|
1598 |
+
"grid_area": null,
|
1599 |
+
"grid_auto_columns": null,
|
1600 |
+
"grid_auto_flow": null,
|
1601 |
+
"grid_auto_rows": null,
|
1602 |
+
"grid_column": null,
|
1603 |
+
"grid_gap": null,
|
1604 |
+
"grid_row": null,
|
1605 |
+
"grid_template_areas": null,
|
1606 |
+
"grid_template_columns": null,
|
1607 |
+
"grid_template_rows": null,
|
1608 |
+
"height": null,
|
1609 |
+
"justify_content": null,
|
1610 |
+
"justify_items": null,
|
1611 |
+
"left": null,
|
1612 |
+
"margin": null,
|
1613 |
+
"max_height": null,
|
1614 |
+
"max_width": null,
|
1615 |
+
"min_height": null,
|
1616 |
+
"min_width": null,
|
1617 |
+
"object_fit": null,
|
1618 |
+
"object_position": null,
|
1619 |
+
"order": null,
|
1620 |
+
"overflow": null,
|
1621 |
+
"overflow_x": null,
|
1622 |
+
"overflow_y": null,
|
1623 |
+
"padding": null,
|
1624 |
+
"right": null,
|
1625 |
+
"top": null,
|
1626 |
+
"visibility": null,
|
1627 |
+
"width": null
|
1628 |
+
}
|
1629 |
+
},
|
1630 |
+
"6b057e0d7c404cf1bea422f48e4781e8": {
|
1631 |
+
"model_module": "@jupyter-widgets/base",
|
1632 |
+
"model_module_version": "1.2.0",
|
1633 |
+
"model_name": "LayoutModel",
|
1634 |
+
"state": {
|
1635 |
+
"_model_module": "@jupyter-widgets/base",
|
1636 |
+
"_model_module_version": "1.2.0",
|
1637 |
+
"_model_name": "LayoutModel",
|
1638 |
+
"_view_count": null,
|
1639 |
+
"_view_module": "@jupyter-widgets/base",
|
1640 |
+
"_view_module_version": "1.2.0",
|
1641 |
+
"_view_name": "LayoutView",
|
1642 |
+
"align_content": null,
|
1643 |
+
"align_items": null,
|
1644 |
+
"align_self": null,
|
1645 |
+
"border": null,
|
1646 |
+
"bottom": null,
|
1647 |
+
"display": null,
|
1648 |
+
"flex": null,
|
1649 |
+
"flex_flow": null,
|
1650 |
+
"grid_area": null,
|
1651 |
+
"grid_auto_columns": null,
|
1652 |
+
"grid_auto_flow": null,
|
1653 |
+
"grid_auto_rows": null,
|
1654 |
+
"grid_column": null,
|
1655 |
+
"grid_gap": null,
|
1656 |
+
"grid_row": null,
|
1657 |
+
"grid_template_areas": null,
|
1658 |
+
"grid_template_columns": null,
|
1659 |
+
"grid_template_rows": null,
|
1660 |
+
"height": null,
|
1661 |
+
"justify_content": null,
|
1662 |
+
"justify_items": null,
|
1663 |
+
"left": null,
|
1664 |
+
"margin": null,
|
1665 |
+
"max_height": null,
|
1666 |
+
"max_width": null,
|
1667 |
+
"min_height": null,
|
1668 |
+
"min_width": null,
|
1669 |
+
"object_fit": null,
|
1670 |
+
"object_position": null,
|
1671 |
+
"order": null,
|
1672 |
+
"overflow": null,
|
1673 |
+
"overflow_x": null,
|
1674 |
+
"overflow_y": null,
|
1675 |
+
"padding": null,
|
1676 |
+
"right": null,
|
1677 |
+
"top": null,
|
1678 |
+
"visibility": null,
|
1679 |
+
"width": null
|
1680 |
+
}
|
1681 |
+
},
|
1682 |
+
"7bbce34b8ce5468eb7ef98efcba9ae70": {
|
1683 |
+
"model_module": "@jupyter-widgets/base",
|
1684 |
+
"model_module_version": "1.2.0",
|
1685 |
+
"model_name": "LayoutModel",
|
1686 |
+
"state": {
|
1687 |
+
"_model_module": "@jupyter-widgets/base",
|
1688 |
+
"_model_module_version": "1.2.0",
|
1689 |
+
"_model_name": "LayoutModel",
|
1690 |
+
"_view_count": null,
|
1691 |
+
"_view_module": "@jupyter-widgets/base",
|
1692 |
+
"_view_module_version": "1.2.0",
|
1693 |
+
"_view_name": "LayoutView",
|
1694 |
+
"align_content": null,
|
1695 |
+
"align_items": "center",
|
1696 |
+
"align_self": null,
|
1697 |
+
"border": null,
|
1698 |
+
"bottom": null,
|
1699 |
+
"display": "flex",
|
1700 |
+
"flex": null,
|
1701 |
+
"flex_flow": "column",
|
1702 |
+
"grid_area": null,
|
1703 |
+
"grid_auto_columns": null,
|
1704 |
+
"grid_auto_flow": null,
|
1705 |
+
"grid_auto_rows": null,
|
1706 |
+
"grid_column": null,
|
1707 |
+
"grid_gap": null,
|
1708 |
+
"grid_row": null,
|
1709 |
+
"grid_template_areas": null,
|
1710 |
+
"grid_template_columns": null,
|
1711 |
+
"grid_template_rows": null,
|
1712 |
+
"height": null,
|
1713 |
+
"justify_content": null,
|
1714 |
+
"justify_items": null,
|
1715 |
+
"left": null,
|
1716 |
+
"margin": null,
|
1717 |
+
"max_height": null,
|
1718 |
+
"max_width": null,
|
1719 |
+
"min_height": null,
|
1720 |
+
"min_width": null,
|
1721 |
+
"object_fit": null,
|
1722 |
+
"object_position": null,
|
1723 |
+
"order": null,
|
1724 |
+
"overflow": null,
|
1725 |
+
"overflow_x": null,
|
1726 |
+
"overflow_y": null,
|
1727 |
+
"padding": null,
|
1728 |
+
"right": null,
|
1729 |
+
"top": null,
|
1730 |
+
"visibility": null,
|
1731 |
+
"width": "50%"
|
1732 |
+
}
|
1733 |
+
},
|
1734 |
+
"7c014d81820d4f598a26a9c28a558a0c": {
|
1735 |
+
"model_module": "@jupyter-widgets/controls",
|
1736 |
+
"model_module_version": "1.5.0",
|
1737 |
+
"model_name": "LabelModel",
|
1738 |
+
"state": {
|
1739 |
+
"_dom_classes": [],
|
1740 |
+
"_model_module": "@jupyter-widgets/controls",
|
1741 |
+
"_model_module_version": "1.5.0",
|
1742 |
+
"_model_name": "LabelModel",
|
1743 |
+
"_view_count": null,
|
1744 |
+
"_view_module": "@jupyter-widgets/controls",
|
1745 |
+
"_view_module_version": "1.5.0",
|
1746 |
+
"_view_name": "LabelView",
|
1747 |
+
"description": "",
|
1748 |
+
"description_tooltip": null,
|
1749 |
+
"layout": "IPY_MODEL_636229e44fd44ad699a1eaf2339752ad",
|
1750 |
+
"placeholder": "",
|
1751 |
+
"style": "IPY_MODEL_335b02d36d1d4195a6bae34d480c8e5c",
|
1752 |
+
"value": "Connecting..."
|
1753 |
+
}
|
1754 |
+
},
|
1755 |
+
"8b6b79964e2042d8a853510727e2e34f": {
|
1756 |
+
"model_module": "@jupyter-widgets/base",
|
1757 |
+
"model_module_version": "1.2.0",
|
1758 |
+
"model_name": "LayoutModel",
|
1759 |
+
"state": {
|
1760 |
+
"_model_module": "@jupyter-widgets/base",
|
1761 |
+
"_model_module_version": "1.2.0",
|
1762 |
+
"_model_name": "LayoutModel",
|
1763 |
+
"_view_count": null,
|
1764 |
+
"_view_module": "@jupyter-widgets/base",
|
1765 |
+
"_view_module_version": "1.2.0",
|
1766 |
+
"_view_name": "LayoutView",
|
1767 |
+
"align_content": null,
|
1768 |
+
"align_items": null,
|
1769 |
+
"align_self": null,
|
1770 |
+
"border": null,
|
1771 |
+
"bottom": null,
|
1772 |
+
"display": null,
|
1773 |
+
"flex": null,
|
1774 |
+
"flex_flow": null,
|
1775 |
+
"grid_area": null,
|
1776 |
+
"grid_auto_columns": null,
|
1777 |
+
"grid_auto_flow": null,
|
1778 |
+
"grid_auto_rows": null,
|
1779 |
+
"grid_column": null,
|
1780 |
+
"grid_gap": null,
|
1781 |
+
"grid_row": null,
|
1782 |
+
"grid_template_areas": null,
|
1783 |
+
"grid_template_columns": null,
|
1784 |
+
"grid_template_rows": null,
|
1785 |
+
"height": null,
|
1786 |
+
"justify_content": null,
|
1787 |
+
"justify_items": null,
|
1788 |
+
"left": null,
|
1789 |
+
"margin": null,
|
1790 |
+
"max_height": null,
|
1791 |
+
"max_width": null,
|
1792 |
+
"min_height": null,
|
1793 |
+
"min_width": null,
|
1794 |
+
"object_fit": null,
|
1795 |
+
"object_position": null,
|
1796 |
+
"order": null,
|
1797 |
+
"overflow": null,
|
1798 |
+
"overflow_x": null,
|
1799 |
+
"overflow_y": null,
|
1800 |
+
"padding": null,
|
1801 |
+
"right": null,
|
1802 |
+
"top": null,
|
1803 |
+
"visibility": null,
|
1804 |
+
"width": null
|
1805 |
+
}
|
1806 |
+
},
|
1807 |
+
"a0aca0338dec449b88c8285d1f0cbef7": {
|
1808 |
+
"model_module": "@jupyter-widgets/controls",
|
1809 |
+
"model_module_version": "1.5.0",
|
1810 |
+
"model_name": "CheckboxModel",
|
1811 |
+
"state": {
|
1812 |
+
"_dom_classes": [],
|
1813 |
+
"_model_module": "@jupyter-widgets/controls",
|
1814 |
+
"_model_module_version": "1.5.0",
|
1815 |
+
"_model_name": "CheckboxModel",
|
1816 |
+
"_view_count": null,
|
1817 |
+
"_view_module": "@jupyter-widgets/controls",
|
1818 |
+
"_view_module_version": "1.5.0",
|
1819 |
+
"_view_name": "CheckboxView",
|
1820 |
+
"description": "Add token as git credential?",
|
1821 |
+
"description_tooltip": null,
|
1822 |
+
"disabled": false,
|
1823 |
+
"indent": true,
|
1824 |
+
"layout": "IPY_MODEL_30df2beaf92d4d4ea31e5501918f07ba",
|
1825 |
+
"style": "IPY_MODEL_d96f88c9819440d29611539bd2890260",
|
1826 |
+
"value": true
|
1827 |
+
}
|
1828 |
+
},
|
1829 |
+
"c1d6265183ba43d2935f5feff79187b7": {
|
1830 |
+
"model_module": "@jupyter-widgets/controls",
|
1831 |
+
"model_module_version": "1.5.0",
|
1832 |
+
"model_name": "DescriptionStyleModel",
|
1833 |
+
"state": {
|
1834 |
+
"_model_module": "@jupyter-widgets/controls",
|
1835 |
+
"_model_module_version": "1.5.0",
|
1836 |
+
"_model_name": "DescriptionStyleModel",
|
1837 |
+
"_view_count": null,
|
1838 |
+
"_view_module": "@jupyter-widgets/base",
|
1839 |
+
"_view_module_version": "1.2.0",
|
1840 |
+
"_view_name": "StyleView",
|
1841 |
+
"description_width": ""
|
1842 |
+
}
|
1843 |
+
},
|
1844 |
+
"c7ff28fb537347e09acaf84f23eea5ba": {
|
1845 |
+
"model_module": "@jupyter-widgets/base",
|
1846 |
+
"model_module_version": "1.2.0",
|
1847 |
+
"model_name": "LayoutModel",
|
1848 |
+
"state": {
|
1849 |
+
"_model_module": "@jupyter-widgets/base",
|
1850 |
+
"_model_module_version": "1.2.0",
|
1851 |
+
"_model_name": "LayoutModel",
|
1852 |
+
"_view_count": null,
|
1853 |
+
"_view_module": "@jupyter-widgets/base",
|
1854 |
+
"_view_module_version": "1.2.0",
|
1855 |
+
"_view_name": "LayoutView",
|
1856 |
+
"align_content": null,
|
1857 |
+
"align_items": null,
|
1858 |
+
"align_self": null,
|
1859 |
+
"border": null,
|
1860 |
+
"bottom": null,
|
1861 |
+
"display": null,
|
1862 |
+
"flex": null,
|
1863 |
+
"flex_flow": null,
|
1864 |
+
"grid_area": null,
|
1865 |
+
"grid_auto_columns": null,
|
1866 |
+
"grid_auto_flow": null,
|
1867 |
+
"grid_auto_rows": null,
|
1868 |
+
"grid_column": null,
|
1869 |
+
"grid_gap": null,
|
1870 |
+
"grid_row": null,
|
1871 |
+
"grid_template_areas": null,
|
1872 |
+
"grid_template_columns": null,
|
1873 |
+
"grid_template_rows": null,
|
1874 |
+
"height": null,
|
1875 |
+
"justify_content": null,
|
1876 |
+
"justify_items": null,
|
1877 |
+
"left": null,
|
1878 |
+
"margin": null,
|
1879 |
+
"max_height": null,
|
1880 |
+
"max_width": null,
|
1881 |
+
"min_height": null,
|
1882 |
+
"min_width": null,
|
1883 |
+
"object_fit": null,
|
1884 |
+
"object_position": null,
|
1885 |
+
"order": null,
|
1886 |
+
"overflow": null,
|
1887 |
+
"overflow_x": null,
|
1888 |
+
"overflow_y": null,
|
1889 |
+
"padding": null,
|
1890 |
+
"right": null,
|
1891 |
+
"top": null,
|
1892 |
+
"visibility": null,
|
1893 |
+
"width": null
|
1894 |
+
}
|
1895 |
+
},
|
1896 |
+
"cdd0a406c34c49d495c83768bf277552": {
|
1897 |
+
"model_module": "@jupyter-widgets/controls",
|
1898 |
+
"model_module_version": "1.5.0",
|
1899 |
+
"model_name": "LabelModel",
|
1900 |
+
"state": {
|
1901 |
+
"_dom_classes": [],
|
1902 |
+
"_model_module": "@jupyter-widgets/controls",
|
1903 |
+
"_model_module_version": "1.5.0",
|
1904 |
+
"_model_name": "LabelModel",
|
1905 |
+
"_view_count": null,
|
1906 |
+
"_view_module": "@jupyter-widgets/controls",
|
1907 |
+
"_view_module_version": "1.5.0",
|
1908 |
+
"_view_name": "LabelView",
|
1909 |
+
"description": "",
|
1910 |
+
"description_tooltip": null,
|
1911 |
+
"layout": "IPY_MODEL_6a028ea873874b20b6cf7928ccd84538",
|
1912 |
+
"placeholder": "",
|
1913 |
+
"style": "IPY_MODEL_046b245d59fa456c806d3a74e16e6daa",
|
1914 |
+
"value": "Your token has been saved in your configured git credential helpers (store)."
|
1915 |
+
}
|
1916 |
+
},
|
1917 |
+
"d565aba281334aefa921962b6f641379": {
|
1918 |
+
"model_module": "@jupyter-widgets/controls",
|
1919 |
+
"model_module_version": "1.5.0",
|
1920 |
+
"model_name": "LabelModel",
|
1921 |
+
"state": {
|
1922 |
+
"_dom_classes": [],
|
1923 |
+
"_model_module": "@jupyter-widgets/controls",
|
1924 |
+
"_model_module_version": "1.5.0",
|
1925 |
+
"_model_name": "LabelModel",
|
1926 |
+
"_view_count": null,
|
1927 |
+
"_view_module": "@jupyter-widgets/controls",
|
1928 |
+
"_view_module_version": "1.5.0",
|
1929 |
+
"_view_name": "LabelView",
|
1930 |
+
"description": "",
|
1931 |
+
"description_tooltip": null,
|
1932 |
+
"layout": "IPY_MODEL_ff30d5707c0048058bf66f4d7cacaa53",
|
1933 |
+
"placeholder": "",
|
1934 |
+
"style": "IPY_MODEL_289042798aa0494282fd02f8253e8764",
|
1935 |
+
"value": "Your token has been saved to /root/.cache/huggingface/token"
|
1936 |
+
}
|
1937 |
+
},
|
1938 |
+
"d96f88c9819440d29611539bd2890260": {
|
1939 |
+
"model_module": "@jupyter-widgets/controls",
|
1940 |
+
"model_module_version": "1.5.0",
|
1941 |
+
"model_name": "DescriptionStyleModel",
|
1942 |
+
"state": {
|
1943 |
+
"_model_module": "@jupyter-widgets/controls",
|
1944 |
+
"_model_module_version": "1.5.0",
|
1945 |
+
"_model_name": "DescriptionStyleModel",
|
1946 |
+
"_view_count": null,
|
1947 |
+
"_view_module": "@jupyter-widgets/base",
|
1948 |
+
"_view_module_version": "1.2.0",
|
1949 |
+
"_view_name": "StyleView",
|
1950 |
+
"description_width": ""
|
1951 |
+
}
|
1952 |
+
},
|
1953 |
+
"ddbd15cd160847d7ad8c373c027bea5e": {
|
1954 |
+
"model_module": "@jupyter-widgets/controls",
|
1955 |
+
"model_module_version": "1.5.0",
|
1956 |
+
"model_name": "LabelModel",
|
1957 |
+
"state": {
|
1958 |
+
"_dom_classes": [],
|
1959 |
+
"_model_module": "@jupyter-widgets/controls",
|
1960 |
+
"_model_module_version": "1.5.0",
|
1961 |
+
"_model_name": "LabelModel",
|
1962 |
+
"_view_count": null,
|
1963 |
+
"_view_module": "@jupyter-widgets/controls",
|
1964 |
+
"_view_module_version": "1.5.0",
|
1965 |
+
"_view_name": "LabelView",
|
1966 |
+
"description": "",
|
1967 |
+
"description_tooltip": null,
|
1968 |
+
"layout": "IPY_MODEL_c7ff28fb537347e09acaf84f23eea5ba",
|
1969 |
+
"placeholder": "",
|
1970 |
+
"style": "IPY_MODEL_0dda3266d3ea493e83e3b1cf47f6524e",
|
1971 |
+
"value": "Login successful"
|
1972 |
+
}
|
1973 |
+
},
|
1974 |
+
"f0bb2256813f416194677eb338417868": {
|
1975 |
+
"model_module": "@jupyter-widgets/controls",
|
1976 |
+
"model_module_version": "1.5.0",
|
1977 |
+
"model_name": "PasswordModel",
|
1978 |
+
"state": {
|
1979 |
+
"_dom_classes": [],
|
1980 |
+
"_model_module": "@jupyter-widgets/controls",
|
1981 |
+
"_model_module_version": "1.5.0",
|
1982 |
+
"_model_name": "PasswordModel",
|
1983 |
+
"_view_count": null,
|
1984 |
+
"_view_module": "@jupyter-widgets/controls",
|
1985 |
+
"_view_module_version": "1.5.0",
|
1986 |
+
"_view_name": "PasswordView",
|
1987 |
+
"continuous_update": true,
|
1988 |
+
"description": "Token:",
|
1989 |
+
"description_tooltip": null,
|
1990 |
+
"disabled": false,
|
1991 |
+
"layout": "IPY_MODEL_00bfd21bca544c47bea6da0e0ce3487f",
|
1992 |
+
"placeholder": "",
|
1993 |
+
"style": "IPY_MODEL_216d9091b816416f81033ef201d98bea",
|
1994 |
+
"value": ""
|
1995 |
+
}
|
1996 |
+
},
|
1997 |
+
"f4bdef5898794847bc0c97ca759b8037": {
|
1998 |
+
"model_module": "@jupyter-widgets/controls",
|
1999 |
+
"model_module_version": "1.5.0",
|
2000 |
+
"model_name": "DescriptionStyleModel",
|
2001 |
+
"state": {
|
2002 |
+
"_model_module": "@jupyter-widgets/controls",
|
2003 |
+
"_model_module_version": "1.5.0",
|
2004 |
+
"_model_name": "DescriptionStyleModel",
|
2005 |
+
"_view_count": null,
|
2006 |
+
"_view_module": "@jupyter-widgets/base",
|
2007 |
+
"_view_module_version": "1.2.0",
|
2008 |
+
"_view_name": "StyleView",
|
2009 |
+
"description_width": ""
|
2010 |
+
}
|
2011 |
+
},
|
2012 |
+
"faf2939133e54dffaa208a75c257d0d3": {
|
2013 |
+
"model_module": "@jupyter-widgets/controls",
|
2014 |
+
"model_module_version": "1.5.0",
|
2015 |
+
"model_name": "DescriptionStyleModel",
|
2016 |
+
"state": {
|
2017 |
+
"_model_module": "@jupyter-widgets/controls",
|
2018 |
+
"_model_module_version": "1.5.0",
|
2019 |
+
"_model_name": "DescriptionStyleModel",
|
2020 |
+
"_view_count": null,
|
2021 |
+
"_view_module": "@jupyter-widgets/base",
|
2022 |
+
"_view_module_version": "1.2.0",
|
2023 |
+
"_view_name": "StyleView",
|
2024 |
+
"description_width": ""
|
2025 |
+
}
|
2026 |
+
},
|
2027 |
+
"fc03fa730876435487990cec90250e25": {
|
2028 |
+
"model_module": "@jupyter-widgets/base",
|
2029 |
+
"model_module_version": "1.2.0",
|
2030 |
+
"model_name": "LayoutModel",
|
2031 |
+
"state": {
|
2032 |
+
"_model_module": "@jupyter-widgets/base",
|
2033 |
+
"_model_module_version": "1.2.0",
|
2034 |
+
"_model_name": "LayoutModel",
|
2035 |
+
"_view_count": null,
|
2036 |
+
"_view_module": "@jupyter-widgets/base",
|
2037 |
+
"_view_module_version": "1.2.0",
|
2038 |
+
"_view_name": "LayoutView",
|
2039 |
+
"align_content": null,
|
2040 |
+
"align_items": null,
|
2041 |
+
"align_self": null,
|
2042 |
+
"border": null,
|
2043 |
+
"bottom": null,
|
2044 |
+
"display": null,
|
2045 |
+
"flex": null,
|
2046 |
+
"flex_flow": null,
|
2047 |
+
"grid_area": null,
|
2048 |
+
"grid_auto_columns": null,
|
2049 |
+
"grid_auto_flow": null,
|
2050 |
+
"grid_auto_rows": null,
|
2051 |
+
"grid_column": null,
|
2052 |
+
"grid_gap": null,
|
2053 |
+
"grid_row": null,
|
2054 |
+
"grid_template_areas": null,
|
2055 |
+
"grid_template_columns": null,
|
2056 |
+
"grid_template_rows": null,
|
2057 |
+
"height": null,
|
2058 |
+
"justify_content": null,
|
2059 |
+
"justify_items": null,
|
2060 |
+
"left": null,
|
2061 |
+
"margin": null,
|
2062 |
+
"max_height": null,
|
2063 |
+
"max_width": null,
|
2064 |
+
"min_height": null,
|
2065 |
+
"min_width": null,
|
2066 |
+
"object_fit": null,
|
2067 |
+
"object_position": null,
|
2068 |
+
"order": null,
|
2069 |
+
"overflow": null,
|
2070 |
+
"overflow_x": null,
|
2071 |
+
"overflow_y": null,
|
2072 |
+
"padding": null,
|
2073 |
+
"right": null,
|
2074 |
+
"top": null,
|
2075 |
+
"visibility": null,
|
2076 |
+
"width": null
|
2077 |
+
}
|
2078 |
+
},
|
2079 |
+
"ff30d5707c0048058bf66f4d7cacaa53": {
|
2080 |
+
"model_module": "@jupyter-widgets/base",
|
2081 |
+
"model_module_version": "1.2.0",
|
2082 |
+
"model_name": "LayoutModel",
|
2083 |
+
"state": {
|
2084 |
+
"_model_module": "@jupyter-widgets/base",
|
2085 |
+
"_model_module_version": "1.2.0",
|
2086 |
+
"_model_name": "LayoutModel",
|
2087 |
+
"_view_count": null,
|
2088 |
+
"_view_module": "@jupyter-widgets/base",
|
2089 |
+
"_view_module_version": "1.2.0",
|
2090 |
+
"_view_name": "LayoutView",
|
2091 |
+
"align_content": null,
|
2092 |
+
"align_items": null,
|
2093 |
+
"align_self": null,
|
2094 |
+
"border": null,
|
2095 |
+
"bottom": null,
|
2096 |
+
"display": null,
|
2097 |
+
"flex": null,
|
2098 |
+
"flex_flow": null,
|
2099 |
+
"grid_area": null,
|
2100 |
+
"grid_auto_columns": null,
|
2101 |
+
"grid_auto_flow": null,
|
2102 |
+
"grid_auto_rows": null,
|
2103 |
+
"grid_column": null,
|
2104 |
+
"grid_gap": null,
|
2105 |
+
"grid_row": null,
|
2106 |
+
"grid_template_areas": null,
|
2107 |
+
"grid_template_columns": null,
|
2108 |
+
"grid_template_rows": null,
|
2109 |
+
"height": null,
|
2110 |
+
"justify_content": null,
|
2111 |
+
"justify_items": null,
|
2112 |
+
"left": null,
|
2113 |
+
"margin": null,
|
2114 |
+
"max_height": null,
|
2115 |
+
"max_width": null,
|
2116 |
+
"min_height": null,
|
2117 |
+
"min_width": null,
|
2118 |
+
"object_fit": null,
|
2119 |
+
"object_position": null,
|
2120 |
+
"order": null,
|
2121 |
+
"overflow": null,
|
2122 |
+
"overflow_x": null,
|
2123 |
+
"overflow_y": null,
|
2124 |
+
"padding": null,
|
2125 |
+
"right": null,
|
2126 |
+
"top": null,
|
2127 |
+
"visibility": null,
|
2128 |
+
"width": null
|
2129 |
+
}
|
2130 |
+
}
|
2131 |
+
}
|
2132 |
+
}
|
2133 |
+
},
|
2134 |
+
"nbformat": 4,
|
2135 |
+
"nbformat_minor": 4
|
2136 |
+
}
|