Steven Zhang commited on
Commit
661a6eb
β€’
1 Parent(s): b13c70a
.idea/MIDI-Audio-Extension.iml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ <component name="PyDocumentationSettings">
9
+ <option name="format" value="PLAIN" />
10
+ <option name="myDocStringFormat" value="Plain" />
11
+ </component>
12
+ </module>
.idea/inspectionProfiles/Project_Default.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
5
+ <option name="ignoredPackages">
6
+ <value>
7
+ <list size="3">
8
+ <item index="0" class="java.lang.String" itemvalue="tensorflow" />
9
+ <item index="1" class="java.lang.String" itemvalue="pydrive" />
10
+ <item index="2" class="java.lang.String" itemvalue="gdown" />
11
+ </list>
12
+ </value>
13
+ </option>
14
+ </inspection_tool>
15
+ </profile>
16
+ </component>
.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
4
+ </project>
.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/MIDI-Audio-Extension.iml" filepath="$PROJECT_DIR$/.idea/MIDI-Audio-Extension.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/MIDI-Audio-Extension" vcs="Git" />
6
+ </component>
7
+ </project>
.idea/workspace.xml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="7535bc3f-f243-4360-9c8c-3741eb254ac5" name="Changes" comment="" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="Git.Settings">
14
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
+ <option name="RESET_MODE" value="HARD" />
16
+ </component>
17
+ <component name="MarkdownSettingsMigration">
18
+ <option name="stateVersion" value="1" />
19
+ </component>
20
+ <component name="ProjectId" id="2IgyH78Is6vuEZsIbrrYlsoVCFC" />
21
+ <component name="ProjectViewState">
22
+ <option name="hideEmptyMiddlePackages" value="true" />
23
+ <option name="showLibraryContents" value="true" />
24
+ </component>
25
+ <component name="PropertiesComponent"><![CDATA[{
26
+ "keyToString": {
27
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
28
+ "RunOnceActivity.ShowReadmeOnStart": "true",
29
+ "last_opened_file_path": "C:/Users/drago/PycharmProjects/MIDI-Audio-Extension/MIDI-song-extender/UI.py"
30
+ }
31
+ }]]></component>
32
+ <component name="RecentsManager">
33
+ <key name="CopyFile.RECENT_KEYS">
34
+ <recent name="C:\Users\drago\PycharmProjects\MIDI-Audio-Extension\MIDI-song-extender" />
35
+ <recent name="C:\Users\drago\PycharmProjects\MIDI-Audio-Extension" />
36
+ </key>
37
+ </component>
38
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
39
+ <component name="TaskManager">
40
+ <task active="true" id="Default" summary="Default task">
41
+ <changelist id="7535bc3f-f243-4360-9c8c-3741eb254ac5" name="Changes" comment="" />
42
+ <created>1670617429345</created>
43
+ <option name="number" value="Default" />
44
+ <option name="presentableId" value="Default" />
45
+ <updated>1670617429345</updated>
46
+ </task>
47
+ <servers />
48
+ </component>
49
+ <component name="Vcs.Log.Tabs.Properties">
50
+ <option name="TAB_STATES">
51
+ <map>
52
+ <entry key="MAIN">
53
+ <value>
54
+ <State>
55
+ <option name="FILTERS">
56
+ <map>
57
+ <entry key="branch">
58
+ <value>
59
+ <list>
60
+ <option value="pr/1" />
61
+ </list>
62
+ </value>
63
+ </entry>
64
+ </map>
65
+ </option>
66
+ </State>
67
+ </value>
68
+ </entry>
69
+ </map>
70
+ </option>
71
+ </component>
72
+ </project>
Poem Generation/.DS_Store DELETED
Binary file (6.15 kB)
 
Poem Generation/UI_poem_gen.ipynb DELETED
@@ -1,1853 +0,0 @@
1
- {
2
- "nbformat": 4,
3
- "nbformat_minor": 0,
4
- "metadata": {
5
- "colab": {
6
- "provenance": []
7
- },
8
- "kernelspec": {
9
- "name": "python3",
10
- "display_name": "Python 3"
11
- },
12
- "language_info": {
13
- "name": "python"
14
- },
15
- "widgets": {
16
- "application/vnd.jupyter.widget-state+json": {
17
- "530e92427f96443e8db1a97abd6c6a52": {
18
- "model_module": "@jupyter-widgets/controls",
19
- "model_name": "HBoxModel",
20
- "model_module_version": "1.5.0",
21
- "state": {
22
- "_dom_classes": [],
23
- "_model_module": "@jupyter-widgets/controls",
24
- "_model_module_version": "1.5.0",
25
- "_model_name": "HBoxModel",
26
- "_view_count": null,
27
- "_view_module": "@jupyter-widgets/controls",
28
- "_view_module_version": "1.5.0",
29
- "_view_name": "HBoxView",
30
- "box_style": "",
31
- "children": [
32
- "IPY_MODEL_e02f05cf2a5d42b7bee0bbe719198b8d",
33
- "IPY_MODEL_173b02af44c346e2a56283ee6a146c0e",
34
- "IPY_MODEL_4b42f65e2e0945fd8f51d39200f29fa8"
35
- ],
36
- "layout": "IPY_MODEL_246e208413d143949a101914a6216ea8"
37
- }
38
- },
39
- "e02f05cf2a5d42b7bee0bbe719198b8d": {
40
- "model_module": "@jupyter-widgets/controls",
41
- "model_name": "HTMLModel",
42
- "model_module_version": "1.5.0",
43
- "state": {
44
- "_dom_classes": [],
45
- "_model_module": "@jupyter-widgets/controls",
46
- "_model_module_version": "1.5.0",
47
- "_model_name": "HTMLModel",
48
- "_view_count": null,
49
- "_view_module": "@jupyter-widgets/controls",
50
- "_view_module_version": "1.5.0",
51
- "_view_name": "HTMLView",
52
- "description": "",
53
- "description_tooltip": null,
54
- "layout": "IPY_MODEL_0c75250aaa454c638fc8bed7365ce415",
55
- "placeholder": "​",
56
- "style": "IPY_MODEL_8965848a3d594be188f056ee3644ecb5",
57
- "value": "Downloading: 100%"
58
- }
59
- },
60
- "173b02af44c346e2a56283ee6a146c0e": {
61
- "model_module": "@jupyter-widgets/controls",
62
- "model_name": "FloatProgressModel",
63
- "model_module_version": "1.5.0",
64
- "state": {
65
- "_dom_classes": [],
66
- "_model_module": "@jupyter-widgets/controls",
67
- "_model_module_version": "1.5.0",
68
- "_model_name": "FloatProgressModel",
69
- "_view_count": null,
70
- "_view_module": "@jupyter-widgets/controls",
71
- "_view_module_version": "1.5.0",
72
- "_view_name": "ProgressView",
73
- "bar_style": "success",
74
- "description": "",
75
- "description_tooltip": null,
76
- "layout": "IPY_MODEL_0395259b5c674039b9c51500e33c37e9",
77
- "max": 762,
78
- "min": 0,
79
- "orientation": "horizontal",
80
- "style": "IPY_MODEL_1b65db5804f64ceaaac4cac9c526cd3f",
81
- "value": 762
82
- }
83
- },
84
- "4b42f65e2e0945fd8f51d39200f29fa8": {
85
- "model_module": "@jupyter-widgets/controls",
86
- "model_name": "HTMLModel",
87
- "model_module_version": "1.5.0",
88
- "state": {
89
- "_dom_classes": [],
90
- "_model_module": "@jupyter-widgets/controls",
91
- "_model_module_version": "1.5.0",
92
- "_model_name": "HTMLModel",
93
- "_view_count": null,
94
- "_view_module": "@jupyter-widgets/controls",
95
- "_view_module_version": "1.5.0",
96
- "_view_name": "HTMLView",
97
- "description": "",
98
- "description_tooltip": null,
99
- "layout": "IPY_MODEL_812aa6f521ce4b798c08bffab3329b67",
100
- "placeholder": "​",
101
- "style": "IPY_MODEL_4794a81d2ef44fbeb1e88998085a5f43",
102
- "value": " 762/762 [00:00&lt;00:00, 5.67kB/s]"
103
- }
104
- },
105
- "246e208413d143949a101914a6216ea8": {
106
- "model_module": "@jupyter-widgets/base",
107
- "model_name": "LayoutModel",
108
- "model_module_version": "1.2.0",
109
- "state": {
110
- "_model_module": "@jupyter-widgets/base",
111
- "_model_module_version": "1.2.0",
112
- "_model_name": "LayoutModel",
113
- "_view_count": null,
114
- "_view_module": "@jupyter-widgets/base",
115
- "_view_module_version": "1.2.0",
116
- "_view_name": "LayoutView",
117
- "align_content": null,
118
- "align_items": null,
119
- "align_self": null,
120
- "border": null,
121
- "bottom": null,
122
- "display": null,
123
- "flex": null,
124
- "flex_flow": null,
125
- "grid_area": null,
126
- "grid_auto_columns": null,
127
- "grid_auto_flow": null,
128
- "grid_auto_rows": null,
129
- "grid_column": null,
130
- "grid_gap": null,
131
- "grid_row": null,
132
- "grid_template_areas": null,
133
- "grid_template_columns": null,
134
- "grid_template_rows": null,
135
- "height": null,
136
- "justify_content": null,
137
- "justify_items": null,
138
- "left": null,
139
- "margin": null,
140
- "max_height": null,
141
- "max_width": null,
142
- "min_height": null,
143
- "min_width": null,
144
- "object_fit": null,
145
- "object_position": null,
146
- "order": null,
147
- "overflow": null,
148
- "overflow_x": null,
149
- "overflow_y": null,
150
- "padding": null,
151
- "right": null,
152
- "top": null,
153
- "visibility": null,
154
- "width": null
155
- }
156
- },
157
- "0c75250aaa454c638fc8bed7365ce415": {
158
- "model_module": "@jupyter-widgets/base",
159
- "model_name": "LayoutModel",
160
- "model_module_version": "1.2.0",
161
- "state": {
162
- "_model_module": "@jupyter-widgets/base",
163
- "_model_module_version": "1.2.0",
164
- "_model_name": "LayoutModel",
165
- "_view_count": null,
166
- "_view_module": "@jupyter-widgets/base",
167
- "_view_module_version": "1.2.0",
168
- "_view_name": "LayoutView",
169
- "align_content": null,
170
- "align_items": null,
171
- "align_self": null,
172
- "border": null,
173
- "bottom": null,
174
- "display": null,
175
- "flex": null,
176
- "flex_flow": null,
177
- "grid_area": null,
178
- "grid_auto_columns": null,
179
- "grid_auto_flow": null,
180
- "grid_auto_rows": null,
181
- "grid_column": null,
182
- "grid_gap": null,
183
- "grid_row": null,
184
- "grid_template_areas": null,
185
- "grid_template_columns": null,
186
- "grid_template_rows": null,
187
- "height": null,
188
- "justify_content": null,
189
- "justify_items": null,
190
- "left": null,
191
- "margin": null,
192
- "max_height": null,
193
- "max_width": null,
194
- "min_height": null,
195
- "min_width": null,
196
- "object_fit": null,
197
- "object_position": null,
198
- "order": null,
199
- "overflow": null,
200
- "overflow_x": null,
201
- "overflow_y": null,
202
- "padding": null,
203
- "right": null,
204
- "top": null,
205
- "visibility": null,
206
- "width": null
207
- }
208
- },
209
- "8965848a3d594be188f056ee3644ecb5": {
210
- "model_module": "@jupyter-widgets/controls",
211
- "model_name": "DescriptionStyleModel",
212
- "model_module_version": "1.5.0",
213
- "state": {
214
- "_model_module": "@jupyter-widgets/controls",
215
- "_model_module_version": "1.5.0",
216
- "_model_name": "DescriptionStyleModel",
217
- "_view_count": null,
218
- "_view_module": "@jupyter-widgets/base",
219
- "_view_module_version": "1.2.0",
220
- "_view_name": "StyleView",
221
- "description_width": ""
222
- }
223
- },
224
- "0395259b5c674039b9c51500e33c37e9": {
225
- "model_module": "@jupyter-widgets/base",
226
- "model_name": "LayoutModel",
227
- "model_module_version": "1.2.0",
228
- "state": {
229
- "_model_module": "@jupyter-widgets/base",
230
- "_model_module_version": "1.2.0",
231
- "_model_name": "LayoutModel",
232
- "_view_count": null,
233
- "_view_module": "@jupyter-widgets/base",
234
- "_view_module_version": "1.2.0",
235
- "_view_name": "LayoutView",
236
- "align_content": null,
237
- "align_items": null,
238
- "align_self": null,
239
- "border": null,
240
- "bottom": null,
241
- "display": null,
242
- "flex": null,
243
- "flex_flow": null,
244
- "grid_area": null,
245
- "grid_auto_columns": null,
246
- "grid_auto_flow": null,
247
- "grid_auto_rows": null,
248
- "grid_column": null,
249
- "grid_gap": null,
250
- "grid_row": null,
251
- "grid_template_areas": null,
252
- "grid_template_columns": null,
253
- "grid_template_rows": null,
254
- "height": null,
255
- "justify_content": null,
256
- "justify_items": null,
257
- "left": null,
258
- "margin": null,
259
- "max_height": null,
260
- "max_width": null,
261
- "min_height": null,
262
- "min_width": null,
263
- "object_fit": null,
264
- "object_position": null,
265
- "order": null,
266
- "overflow": null,
267
- "overflow_x": null,
268
- "overflow_y": null,
269
- "padding": null,
270
- "right": null,
271
- "top": null,
272
- "visibility": null,
273
- "width": null
274
- }
275
- },
276
- "1b65db5804f64ceaaac4cac9c526cd3f": {
277
- "model_module": "@jupyter-widgets/controls",
278
- "model_name": "ProgressStyleModel",
279
- "model_module_version": "1.5.0",
280
- "state": {
281
- "_model_module": "@jupyter-widgets/controls",
282
- "_model_module_version": "1.5.0",
283
- "_model_name": "ProgressStyleModel",
284
- "_view_count": null,
285
- "_view_module": "@jupyter-widgets/base",
286
- "_view_module_version": "1.2.0",
287
- "_view_name": "StyleView",
288
- "bar_color": null,
289
- "description_width": ""
290
- }
291
- },
292
- "812aa6f521ce4b798c08bffab3329b67": {
293
- "model_module": "@jupyter-widgets/base",
294
- "model_name": "LayoutModel",
295
- "model_module_version": "1.2.0",
296
- "state": {
297
- "_model_module": "@jupyter-widgets/base",
298
- "_model_module_version": "1.2.0",
299
- "_model_name": "LayoutModel",
300
- "_view_count": null,
301
- "_view_module": "@jupyter-widgets/base",
302
- "_view_module_version": "1.2.0",
303
- "_view_name": "LayoutView",
304
- "align_content": null,
305
- "align_items": null,
306
- "align_self": null,
307
- "border": null,
308
- "bottom": null,
309
- "display": null,
310
- "flex": null,
311
- "flex_flow": null,
312
- "grid_area": null,
313
- "grid_auto_columns": null,
314
- "grid_auto_flow": null,
315
- "grid_auto_rows": null,
316
- "grid_column": null,
317
- "grid_gap": null,
318
- "grid_row": null,
319
- "grid_template_areas": null,
320
- "grid_template_columns": null,
321
- "grid_template_rows": null,
322
- "height": null,
323
- "justify_content": null,
324
- "justify_items": null,
325
- "left": null,
326
- "margin": null,
327
- "max_height": null,
328
- "max_width": null,
329
- "min_height": null,
330
- "min_width": null,
331
- "object_fit": null,
332
- "object_position": null,
333
- "order": null,
334
- "overflow": null,
335
- "overflow_x": null,
336
- "overflow_y": null,
337
- "padding": null,
338
- "right": null,
339
- "top": null,
340
- "visibility": null,
341
- "width": null
342
- }
343
- },
344
- "4794a81d2ef44fbeb1e88998085a5f43": {
345
- "model_module": "@jupyter-widgets/controls",
346
- "model_name": "DescriptionStyleModel",
347
- "model_module_version": "1.5.0",
348
- "state": {
349
- "_model_module": "@jupyter-widgets/controls",
350
- "_model_module_version": "1.5.0",
351
- "_model_name": "DescriptionStyleModel",
352
- "_view_count": null,
353
- "_view_module": "@jupyter-widgets/base",
354
- "_view_module_version": "1.2.0",
355
- "_view_name": "StyleView",
356
- "description_width": ""
357
- }
358
- },
359
- "6b7df437d08d4c01be16b79e41019e3b": {
360
- "model_module": "@jupyter-widgets/controls",
361
- "model_name": "HBoxModel",
362
- "model_module_version": "1.5.0",
363
- "state": {
364
- "_dom_classes": [],
365
- "_model_module": "@jupyter-widgets/controls",
366
- "_model_module_version": "1.5.0",
367
- "_model_name": "HBoxModel",
368
- "_view_count": null,
369
- "_view_module": "@jupyter-widgets/controls",
370
- "_view_module_version": "1.5.0",
371
- "_view_name": "HBoxView",
372
- "box_style": "",
373
- "children": [
374
- "IPY_MODEL_23563f674f0f4f1693a0acde9623573c",
375
- "IPY_MODEL_8c427e0fc2d34a24867fd5d711b080e2",
376
- "IPY_MODEL_2a694b94ca2043b286ce17d3c36ed54b"
377
- ],
378
- "layout": "IPY_MODEL_020e7d8888d0405b93d1a3127a16ba15"
379
- }
380
- },
381
- "23563f674f0f4f1693a0acde9623573c": {
382
- "model_module": "@jupyter-widgets/controls",
383
- "model_name": "HTMLModel",
384
- "model_module_version": "1.5.0",
385
- "state": {
386
- "_dom_classes": [],
387
- "_model_module": "@jupyter-widgets/controls",
388
- "_model_module_version": "1.5.0",
389
- "_model_name": "HTMLModel",
390
- "_view_count": null,
391
- "_view_module": "@jupyter-widgets/controls",
392
- "_view_module_version": "1.5.0",
393
- "_view_name": "HTMLView",
394
- "description": "",
395
- "description_tooltip": null,
396
- "layout": "IPY_MODEL_b86ccf32ba324ee198481b3611617dbc",
397
- "placeholder": "​",
398
- "style": "IPY_MODEL_621717f94333429ab4e47224550771fe",
399
- "value": "Downloading: 100%"
400
- }
401
- },
402
- "8c427e0fc2d34a24867fd5d711b080e2": {
403
- "model_module": "@jupyter-widgets/controls",
404
- "model_name": "FloatProgressModel",
405
- "model_module_version": "1.5.0",
406
- "state": {
407
- "_dom_classes": [],
408
- "_model_module": "@jupyter-widgets/controls",
409
- "_model_module_version": "1.5.0",
410
- "_model_name": "FloatProgressModel",
411
- "_view_count": null,
412
- "_view_module": "@jupyter-widgets/controls",
413
- "_view_module_version": "1.5.0",
414
- "_view_name": "ProgressView",
415
- "bar_style": "success",
416
- "description": "",
417
- "description_tooltip": null,
418
- "layout": "IPY_MODEL_c2e4edd790054604a7756a1d7b9f497a",
419
- "max": 1042301,
420
- "min": 0,
421
- "orientation": "horizontal",
422
- "style": "IPY_MODEL_e58ef4fb5651473c9cf9b889624ccd55",
423
- "value": 1042301
424
- }
425
- },
426
- "2a694b94ca2043b286ce17d3c36ed54b": {
427
- "model_module": "@jupyter-widgets/controls",
428
- "model_name": "HTMLModel",
429
- "model_module_version": "1.5.0",
430
- "state": {
431
- "_dom_classes": [],
432
- "_model_module": "@jupyter-widgets/controls",
433
- "_model_module_version": "1.5.0",
434
- "_model_name": "HTMLModel",
435
- "_view_count": null,
436
- "_view_module": "@jupyter-widgets/controls",
437
- "_view_module_version": "1.5.0",
438
- "_view_name": "HTMLView",
439
- "description": "",
440
- "description_tooltip": null,
441
- "layout": "IPY_MODEL_473c51fb7519486bbe3050c77ab7080c",
442
- "placeholder": "​",
443
- "style": "IPY_MODEL_b4382f19bea946a9a6b2a87475604e46",
444
- "value": " 1.04M/1.04M [00:00&lt;00:00, 2.13MB/s]"
445
- }
446
- },
447
- "020e7d8888d0405b93d1a3127a16ba15": {
448
- "model_module": "@jupyter-widgets/base",
449
- "model_name": "LayoutModel",
450
- "model_module_version": "1.2.0",
451
- "state": {
452
- "_model_module": "@jupyter-widgets/base",
453
- "_model_module_version": "1.2.0",
454
- "_model_name": "LayoutModel",
455
- "_view_count": null,
456
- "_view_module": "@jupyter-widgets/base",
457
- "_view_module_version": "1.2.0",
458
- "_view_name": "LayoutView",
459
- "align_content": null,
460
- "align_items": null,
461
- "align_self": null,
462
- "border": null,
463
- "bottom": null,
464
- "display": null,
465
- "flex": null,
466
- "flex_flow": null,
467
- "grid_area": null,
468
- "grid_auto_columns": null,
469
- "grid_auto_flow": null,
470
- "grid_auto_rows": null,
471
- "grid_column": null,
472
- "grid_gap": null,
473
- "grid_row": null,
474
- "grid_template_areas": null,
475
- "grid_template_columns": null,
476
- "grid_template_rows": null,
477
- "height": null,
478
- "justify_content": null,
479
- "justify_items": null,
480
- "left": null,
481
- "margin": null,
482
- "max_height": null,
483
- "max_width": null,
484
- "min_height": null,
485
- "min_width": null,
486
- "object_fit": null,
487
- "object_position": null,
488
- "order": null,
489
- "overflow": null,
490
- "overflow_x": null,
491
- "overflow_y": null,
492
- "padding": null,
493
- "right": null,
494
- "top": null,
495
- "visibility": null,
496
- "width": null
497
- }
498
- },
499
- "b86ccf32ba324ee198481b3611617dbc": {
500
- "model_module": "@jupyter-widgets/base",
501
- "model_name": "LayoutModel",
502
- "model_module_version": "1.2.0",
503
- "state": {
504
- "_model_module": "@jupyter-widgets/base",
505
- "_model_module_version": "1.2.0",
506
- "_model_name": "LayoutModel",
507
- "_view_count": null,
508
- "_view_module": "@jupyter-widgets/base",
509
- "_view_module_version": "1.2.0",
510
- "_view_name": "LayoutView",
511
- "align_content": null,
512
- "align_items": null,
513
- "align_self": null,
514
- "border": null,
515
- "bottom": null,
516
- "display": null,
517
- "flex": null,
518
- "flex_flow": null,
519
- "grid_area": null,
520
- "grid_auto_columns": null,
521
- "grid_auto_flow": null,
522
- "grid_auto_rows": null,
523
- "grid_column": null,
524
- "grid_gap": null,
525
- "grid_row": null,
526
- "grid_template_areas": null,
527
- "grid_template_columns": null,
528
- "grid_template_rows": null,
529
- "height": null,
530
- "justify_content": null,
531
- "justify_items": null,
532
- "left": null,
533
- "margin": null,
534
- "max_height": null,
535
- "max_width": null,
536
- "min_height": null,
537
- "min_width": null,
538
- "object_fit": null,
539
- "object_position": null,
540
- "order": null,
541
- "overflow": null,
542
- "overflow_x": null,
543
- "overflow_y": null,
544
- "padding": null,
545
- "right": null,
546
- "top": null,
547
- "visibility": null,
548
- "width": null
549
- }
550
- },
551
- "621717f94333429ab4e47224550771fe": {
552
- "model_module": "@jupyter-widgets/controls",
553
- "model_name": "DescriptionStyleModel",
554
- "model_module_version": "1.5.0",
555
- "state": {
556
- "_model_module": "@jupyter-widgets/controls",
557
- "_model_module_version": "1.5.0",
558
- "_model_name": "DescriptionStyleModel",
559
- "_view_count": null,
560
- "_view_module": "@jupyter-widgets/base",
561
- "_view_module_version": "1.2.0",
562
- "_view_name": "StyleView",
563
- "description_width": ""
564
- }
565
- },
566
- "c2e4edd790054604a7756a1d7b9f497a": {
567
- "model_module": "@jupyter-widgets/base",
568
- "model_name": "LayoutModel",
569
- "model_module_version": "1.2.0",
570
- "state": {
571
- "_model_module": "@jupyter-widgets/base",
572
- "_model_module_version": "1.2.0",
573
- "_model_name": "LayoutModel",
574
- "_view_count": null,
575
- "_view_module": "@jupyter-widgets/base",
576
- "_view_module_version": "1.2.0",
577
- "_view_name": "LayoutView",
578
- "align_content": null,
579
- "align_items": null,
580
- "align_self": null,
581
- "border": null,
582
- "bottom": null,
583
- "display": null,
584
- "flex": null,
585
- "flex_flow": null,
586
- "grid_area": null,
587
- "grid_auto_columns": null,
588
- "grid_auto_flow": null,
589
- "grid_auto_rows": null,
590
- "grid_column": null,
591
- "grid_gap": null,
592
- "grid_row": null,
593
- "grid_template_areas": null,
594
- "grid_template_columns": null,
595
- "grid_template_rows": null,
596
- "height": null,
597
- "justify_content": null,
598
- "justify_items": null,
599
- "left": null,
600
- "margin": null,
601
- "max_height": null,
602
- "max_width": null,
603
- "min_height": null,
604
- "min_width": null,
605
- "object_fit": null,
606
- "object_position": null,
607
- "order": null,
608
- "overflow": null,
609
- "overflow_x": null,
610
- "overflow_y": null,
611
- "padding": null,
612
- "right": null,
613
- "top": null,
614
- "visibility": null,
615
- "width": null
616
- }
617
- },
618
- "e58ef4fb5651473c9cf9b889624ccd55": {
619
- "model_module": "@jupyter-widgets/controls",
620
- "model_name": "ProgressStyleModel",
621
- "model_module_version": "1.5.0",
622
- "state": {
623
- "_model_module": "@jupyter-widgets/controls",
624
- "_model_module_version": "1.5.0",
625
- "_model_name": "ProgressStyleModel",
626
- "_view_count": null,
627
- "_view_module": "@jupyter-widgets/base",
628
- "_view_module_version": "1.2.0",
629
- "_view_name": "StyleView",
630
- "bar_color": null,
631
- "description_width": ""
632
- }
633
- },
634
- "473c51fb7519486bbe3050c77ab7080c": {
635
- "model_module": "@jupyter-widgets/base",
636
- "model_name": "LayoutModel",
637
- "model_module_version": "1.2.0",
638
- "state": {
639
- "_model_module": "@jupyter-widgets/base",
640
- "_model_module_version": "1.2.0",
641
- "_model_name": "LayoutModel",
642
- "_view_count": null,
643
- "_view_module": "@jupyter-widgets/base",
644
- "_view_module_version": "1.2.0",
645
- "_view_name": "LayoutView",
646
- "align_content": null,
647
- "align_items": null,
648
- "align_self": null,
649
- "border": null,
650
- "bottom": null,
651
- "display": null,
652
- "flex": null,
653
- "flex_flow": null,
654
- "grid_area": null,
655
- "grid_auto_columns": null,
656
- "grid_auto_flow": null,
657
- "grid_auto_rows": null,
658
- "grid_column": null,
659
- "grid_gap": null,
660
- "grid_row": null,
661
- "grid_template_areas": null,
662
- "grid_template_columns": null,
663
- "grid_template_rows": null,
664
- "height": null,
665
- "justify_content": null,
666
- "justify_items": null,
667
- "left": null,
668
- "margin": null,
669
- "max_height": null,
670
- "max_width": null,
671
- "min_height": null,
672
- "min_width": null,
673
- "object_fit": null,
674
- "object_position": null,
675
- "order": null,
676
- "overflow": null,
677
- "overflow_x": null,
678
- "overflow_y": null,
679
- "padding": null,
680
- "right": null,
681
- "top": null,
682
- "visibility": null,
683
- "width": null
684
- }
685
- },
686
- "b4382f19bea946a9a6b2a87475604e46": {
687
- "model_module": "@jupyter-widgets/controls",
688
- "model_name": "DescriptionStyleModel",
689
- "model_module_version": "1.5.0",
690
- "state": {
691
- "_model_module": "@jupyter-widgets/controls",
692
- "_model_module_version": "1.5.0",
693
- "_model_name": "DescriptionStyleModel",
694
- "_view_count": null,
695
- "_view_module": "@jupyter-widgets/base",
696
- "_view_module_version": "1.2.0",
697
- "_view_name": "StyleView",
698
- "description_width": ""
699
- }
700
- },
701
- "52b302d4ea1d4999a11652906f9395e6": {
702
- "model_module": "@jupyter-widgets/controls",
703
- "model_name": "HBoxModel",
704
- "model_module_version": "1.5.0",
705
- "state": {
706
- "_dom_classes": [],
707
- "_model_module": "@jupyter-widgets/controls",
708
- "_model_module_version": "1.5.0",
709
- "_model_name": "HBoxModel",
710
- "_view_count": null,
711
- "_view_module": "@jupyter-widgets/controls",
712
- "_view_module_version": "1.5.0",
713
- "_view_name": "HBoxView",
714
- "box_style": "",
715
- "children": [
716
- "IPY_MODEL_7e8fe68702cb47749524717a2f0f2678",
717
- "IPY_MODEL_e35c5da585b74cda96cf944dca0f1522",
718
- "IPY_MODEL_3d8d2200ba91491cb90473ab36f11b2a"
719
- ],
720
- "layout": "IPY_MODEL_aa8f858b51374b5fb8f33e4bd82e2bdf"
721
- }
722
- },
723
- "7e8fe68702cb47749524717a2f0f2678": {
724
- "model_module": "@jupyter-widgets/controls",
725
- "model_name": "HTMLModel",
726
- "model_module_version": "1.5.0",
727
- "state": {
728
- "_dom_classes": [],
729
- "_model_module": "@jupyter-widgets/controls",
730
- "_model_module_version": "1.5.0",
731
- "_model_name": "HTMLModel",
732
- "_view_count": null,
733
- "_view_module": "@jupyter-widgets/controls",
734
- "_view_module_version": "1.5.0",
735
- "_view_name": "HTMLView",
736
- "description": "",
737
- "description_tooltip": null,
738
- "layout": "IPY_MODEL_875fd933bfbf4d2c869bfca5ee5e5b88",
739
- "placeholder": "​",
740
- "style": "IPY_MODEL_e04f3eb8192c4da28816aabe24e7c126",
741
- "value": "Downloading: 100%"
742
- }
743
- },
744
- "e35c5da585b74cda96cf944dca0f1522": {
745
- "model_module": "@jupyter-widgets/controls",
746
- "model_name": "FloatProgressModel",
747
- "model_module_version": "1.5.0",
748
- "state": {
749
- "_dom_classes": [],
750
- "_model_module": "@jupyter-widgets/controls",
751
- "_model_module_version": "1.5.0",
752
- "_model_name": "FloatProgressModel",
753
- "_view_count": null,
754
- "_view_module": "@jupyter-widgets/controls",
755
- "_view_module_version": "1.5.0",
756
- "_view_name": "ProgressView",
757
- "bar_style": "success",
758
- "description": "",
759
- "description_tooltip": null,
760
- "layout": "IPY_MODEL_8d9ea460130947e1b30567c14d804a33",
761
- "max": 456318,
762
- "min": 0,
763
- "orientation": "horizontal",
764
- "style": "IPY_MODEL_9e3ce0f556c54eba95a1aa4db1e177f3",
765
- "value": 456318
766
- }
767
- },
768
- "3d8d2200ba91491cb90473ab36f11b2a": {
769
- "model_module": "@jupyter-widgets/controls",
770
- "model_name": "HTMLModel",
771
- "model_module_version": "1.5.0",
772
- "state": {
773
- "_dom_classes": [],
774
- "_model_module": "@jupyter-widgets/controls",
775
- "_model_module_version": "1.5.0",
776
- "_model_name": "HTMLModel",
777
- "_view_count": null,
778
- "_view_module": "@jupyter-widgets/controls",
779
- "_view_module_version": "1.5.0",
780
- "_view_name": "HTMLView",
781
- "description": "",
782
- "description_tooltip": null,
783
- "layout": "IPY_MODEL_153545ef1fc84847bf0d437fc37c0afd",
784
- "placeholder": "​",
785
- "style": "IPY_MODEL_a74454be91b34441b1b05e1714b7d9b6",
786
- "value": " 456k/456k [00:00&lt;00:00, 5.61kB/s]"
787
- }
788
- },
789
- "aa8f858b51374b5fb8f33e4bd82e2bdf": {
790
- "model_module": "@jupyter-widgets/base",
791
- "model_name": "LayoutModel",
792
- "model_module_version": "1.2.0",
793
- "state": {
794
- "_model_module": "@jupyter-widgets/base",
795
- "_model_module_version": "1.2.0",
796
- "_model_name": "LayoutModel",
797
- "_view_count": null,
798
- "_view_module": "@jupyter-widgets/base",
799
- "_view_module_version": "1.2.0",
800
- "_view_name": "LayoutView",
801
- "align_content": null,
802
- "align_items": null,
803
- "align_self": null,
804
- "border": null,
805
- "bottom": null,
806
- "display": null,
807
- "flex": null,
808
- "flex_flow": null,
809
- "grid_area": null,
810
- "grid_auto_columns": null,
811
- "grid_auto_flow": null,
812
- "grid_auto_rows": null,
813
- "grid_column": null,
814
- "grid_gap": null,
815
- "grid_row": null,
816
- "grid_template_areas": null,
817
- "grid_template_columns": null,
818
- "grid_template_rows": null,
819
- "height": null,
820
- "justify_content": null,
821
- "justify_items": null,
822
- "left": null,
823
- "margin": null,
824
- "max_height": null,
825
- "max_width": null,
826
- "min_height": null,
827
- "min_width": null,
828
- "object_fit": null,
829
- "object_position": null,
830
- "order": null,
831
- "overflow": null,
832
- "overflow_x": null,
833
- "overflow_y": null,
834
- "padding": null,
835
- "right": null,
836
- "top": null,
837
- "visibility": null,
838
- "width": null
839
- }
840
- },
841
- "875fd933bfbf4d2c869bfca5ee5e5b88": {
842
- "model_module": "@jupyter-widgets/base",
843
- "model_name": "LayoutModel",
844
- "model_module_version": "1.2.0",
845
- "state": {
846
- "_model_module": "@jupyter-widgets/base",
847
- "_model_module_version": "1.2.0",
848
- "_model_name": "LayoutModel",
849
- "_view_count": null,
850
- "_view_module": "@jupyter-widgets/base",
851
- "_view_module_version": "1.2.0",
852
- "_view_name": "LayoutView",
853
- "align_content": null,
854
- "align_items": null,
855
- "align_self": null,
856
- "border": null,
857
- "bottom": null,
858
- "display": null,
859
- "flex": null,
860
- "flex_flow": null,
861
- "grid_area": null,
862
- "grid_auto_columns": null,
863
- "grid_auto_flow": null,
864
- "grid_auto_rows": null,
865
- "grid_column": null,
866
- "grid_gap": null,
867
- "grid_row": null,
868
- "grid_template_areas": null,
869
- "grid_template_columns": null,
870
- "grid_template_rows": null,
871
- "height": null,
872
- "justify_content": null,
873
- "justify_items": null,
874
- "left": null,
875
- "margin": null,
876
- "max_height": null,
877
- "max_width": null,
878
- "min_height": null,
879
- "min_width": null,
880
- "object_fit": null,
881
- "object_position": null,
882
- "order": null,
883
- "overflow": null,
884
- "overflow_x": null,
885
- "overflow_y": null,
886
- "padding": null,
887
- "right": null,
888
- "top": null,
889
- "visibility": null,
890
- "width": null
891
- }
892
- },
893
- "e04f3eb8192c4da28816aabe24e7c126": {
894
- "model_module": "@jupyter-widgets/controls",
895
- "model_name": "DescriptionStyleModel",
896
- "model_module_version": "1.5.0",
897
- "state": {
898
- "_model_module": "@jupyter-widgets/controls",
899
- "_model_module_version": "1.5.0",
900
- "_model_name": "DescriptionStyleModel",
901
- "_view_count": null,
902
- "_view_module": "@jupyter-widgets/base",
903
- "_view_module_version": "1.2.0",
904
- "_view_name": "StyleView",
905
- "description_width": ""
906
- }
907
- },
908
- "8d9ea460130947e1b30567c14d804a33": {
909
- "model_module": "@jupyter-widgets/base",
910
- "model_name": "LayoutModel",
911
- "model_module_version": "1.2.0",
912
- "state": {
913
- "_model_module": "@jupyter-widgets/base",
914
- "_model_module_version": "1.2.0",
915
- "_model_name": "LayoutModel",
916
- "_view_count": null,
917
- "_view_module": "@jupyter-widgets/base",
918
- "_view_module_version": "1.2.0",
919
- "_view_name": "LayoutView",
920
- "align_content": null,
921
- "align_items": null,
922
- "align_self": null,
923
- "border": null,
924
- "bottom": null,
925
- "display": null,
926
- "flex": null,
927
- "flex_flow": null,
928
- "grid_area": null,
929
- "grid_auto_columns": null,
930
- "grid_auto_flow": null,
931
- "grid_auto_rows": null,
932
- "grid_column": null,
933
- "grid_gap": null,
934
- "grid_row": null,
935
- "grid_template_areas": null,
936
- "grid_template_columns": null,
937
- "grid_template_rows": null,
938
- "height": null,
939
- "justify_content": null,
940
- "justify_items": null,
941
- "left": null,
942
- "margin": null,
943
- "max_height": null,
944
- "max_width": null,
945
- "min_height": null,
946
- "min_width": null,
947
- "object_fit": null,
948
- "object_position": null,
949
- "order": null,
950
- "overflow": null,
951
- "overflow_x": null,
952
- "overflow_y": null,
953
- "padding": null,
954
- "right": null,
955
- "top": null,
956
- "visibility": null,
957
- "width": null
958
- }
959
- },
960
- "9e3ce0f556c54eba95a1aa4db1e177f3": {
961
- "model_module": "@jupyter-widgets/controls",
962
- "model_name": "ProgressStyleModel",
963
- "model_module_version": "1.5.0",
964
- "state": {
965
- "_model_module": "@jupyter-widgets/controls",
966
- "_model_module_version": "1.5.0",
967
- "_model_name": "ProgressStyleModel",
968
- "_view_count": null,
969
- "_view_module": "@jupyter-widgets/base",
970
- "_view_module_version": "1.2.0",
971
- "_view_name": "StyleView",
972
- "bar_color": null,
973
- "description_width": ""
974
- }
975
- },
976
- "153545ef1fc84847bf0d437fc37c0afd": {
977
- "model_module": "@jupyter-widgets/base",
978
- "model_name": "LayoutModel",
979
- "model_module_version": "1.2.0",
980
- "state": {
981
- "_model_module": "@jupyter-widgets/base",
982
- "_model_module_version": "1.2.0",
983
- "_model_name": "LayoutModel",
984
- "_view_count": null,
985
- "_view_module": "@jupyter-widgets/base",
986
- "_view_module_version": "1.2.0",
987
- "_view_name": "LayoutView",
988
- "align_content": null,
989
- "align_items": null,
990
- "align_self": null,
991
- "border": null,
992
- "bottom": null,
993
- "display": null,
994
- "flex": null,
995
- "flex_flow": null,
996
- "grid_area": null,
997
- "grid_auto_columns": null,
998
- "grid_auto_flow": null,
999
- "grid_auto_rows": null,
1000
- "grid_column": null,
1001
- "grid_gap": null,
1002
- "grid_row": null,
1003
- "grid_template_areas": null,
1004
- "grid_template_columns": null,
1005
- "grid_template_rows": null,
1006
- "height": null,
1007
- "justify_content": null,
1008
- "justify_items": null,
1009
- "left": null,
1010
- "margin": null,
1011
- "max_height": null,
1012
- "max_width": null,
1013
- "min_height": null,
1014
- "min_width": null,
1015
- "object_fit": null,
1016
- "object_position": null,
1017
- "order": null,
1018
- "overflow": null,
1019
- "overflow_x": null,
1020
- "overflow_y": null,
1021
- "padding": null,
1022
- "right": null,
1023
- "top": null,
1024
- "visibility": null,
1025
- "width": null
1026
- }
1027
- },
1028
- "a74454be91b34441b1b05e1714b7d9b6": {
1029
- "model_module": "@jupyter-widgets/controls",
1030
- "model_name": "DescriptionStyleModel",
1031
- "model_module_version": "1.5.0",
1032
- "state": {
1033
- "_model_module": "@jupyter-widgets/controls",
1034
- "_model_module_version": "1.5.0",
1035
- "_model_name": "DescriptionStyleModel",
1036
- "_view_count": null,
1037
- "_view_module": "@jupyter-widgets/base",
1038
- "_view_module_version": "1.2.0",
1039
- "_view_name": "StyleView",
1040
- "description_width": ""
1041
- }
1042
- },
1043
- "926d77fde11f4f31920e3c6604ad2512": {
1044
- "model_module": "@jupyter-widgets/controls",
1045
- "model_name": "HBoxModel",
1046
- "model_module_version": "1.5.0",
1047
- "state": {
1048
- "_dom_classes": [],
1049
- "_model_module": "@jupyter-widgets/controls",
1050
- "_model_module_version": "1.5.0",
1051
- "_model_name": "HBoxModel",
1052
- "_view_count": null,
1053
- "_view_module": "@jupyter-widgets/controls",
1054
- "_view_module_version": "1.5.0",
1055
- "_view_name": "HBoxView",
1056
- "box_style": "",
1057
- "children": [
1058
- "IPY_MODEL_c761c42270c14cca8818e9e8e5fefaf7",
1059
- "IPY_MODEL_15073b5721a941a88948bd1d4a4e30a2",
1060
- "IPY_MODEL_51e0e9a4829e45e0b2518380e8a7614a"
1061
- ],
1062
- "layout": "IPY_MODEL_db76248f90524c94bdbf680ca185816e"
1063
- }
1064
- },
1065
- "c761c42270c14cca8818e9e8e5fefaf7": {
1066
- "model_module": "@jupyter-widgets/controls",
1067
- "model_name": "HTMLModel",
1068
- "model_module_version": "1.5.0",
1069
- "state": {
1070
- "_dom_classes": [],
1071
- "_model_module": "@jupyter-widgets/controls",
1072
- "_model_module_version": "1.5.0",
1073
- "_model_name": "HTMLModel",
1074
- "_view_count": null,
1075
- "_view_module": "@jupyter-widgets/controls",
1076
- "_view_module_version": "1.5.0",
1077
- "_view_name": "HTMLView",
1078
- "description": "",
1079
- "description_tooltip": null,
1080
- "layout": "IPY_MODEL_e2f414e22bfe438295eb504d191ca25a",
1081
- "placeholder": "​",
1082
- "style": "IPY_MODEL_6f86e52c4844489b902c355a67f07c57",
1083
- "value": "Downloading: 100%"
1084
- }
1085
- },
1086
- "15073b5721a941a88948bd1d4a4e30a2": {
1087
- "model_module": "@jupyter-widgets/controls",
1088
- "model_name": "FloatProgressModel",
1089
- "model_module_version": "1.5.0",
1090
- "state": {
1091
- "_dom_classes": [],
1092
- "_model_module": "@jupyter-widgets/controls",
1093
- "_model_module_version": "1.5.0",
1094
- "_model_name": "FloatProgressModel",
1095
- "_view_count": null,
1096
- "_view_module": "@jupyter-widgets/controls",
1097
- "_view_module_version": "1.5.0",
1098
- "_view_name": "ProgressView",
1099
- "bar_style": "success",
1100
- "description": "",
1101
- "description_tooltip": null,
1102
- "layout": "IPY_MODEL_0525588beb664916a5c499669dea218c",
1103
- "max": 1355256,
1104
- "min": 0,
1105
- "orientation": "horizontal",
1106
- "style": "IPY_MODEL_b914433a72d9420fa451da42fb87b3a9",
1107
- "value": 1355256
1108
- }
1109
- },
1110
- "51e0e9a4829e45e0b2518380e8a7614a": {
1111
- "model_module": "@jupyter-widgets/controls",
1112
- "model_name": "HTMLModel",
1113
- "model_module_version": "1.5.0",
1114
- "state": {
1115
- "_dom_classes": [],
1116
- "_model_module": "@jupyter-widgets/controls",
1117
- "_model_module_version": "1.5.0",
1118
- "_model_name": "HTMLModel",
1119
- "_view_count": null,
1120
- "_view_module": "@jupyter-widgets/controls",
1121
- "_view_module_version": "1.5.0",
1122
- "_view_name": "HTMLView",
1123
- "description": "",
1124
- "description_tooltip": null,
1125
- "layout": "IPY_MODEL_0a32118ff47246d38c61ed31c4e27bc0",
1126
- "placeholder": "​",
1127
- "style": "IPY_MODEL_6210e1a9cb474898acbde80d6fe1be58",
1128
- "value": " 1.36M/1.36M [00:00&lt;00:00, 2.83MB/s]"
1129
- }
1130
- },
1131
- "db76248f90524c94bdbf680ca185816e": {
1132
- "model_module": "@jupyter-widgets/base",
1133
- "model_name": "LayoutModel",
1134
- "model_module_version": "1.2.0",
1135
- "state": {
1136
- "_model_module": "@jupyter-widgets/base",
1137
- "_model_module_version": "1.2.0",
1138
- "_model_name": "LayoutModel",
1139
- "_view_count": null,
1140
- "_view_module": "@jupyter-widgets/base",
1141
- "_view_module_version": "1.2.0",
1142
- "_view_name": "LayoutView",
1143
- "align_content": null,
1144
- "align_items": null,
1145
- "align_self": null,
1146
- "border": null,
1147
- "bottom": null,
1148
- "display": null,
1149
- "flex": null,
1150
- "flex_flow": null,
1151
- "grid_area": null,
1152
- "grid_auto_columns": null,
1153
- "grid_auto_flow": null,
1154
- "grid_auto_rows": null,
1155
- "grid_column": null,
1156
- "grid_gap": null,
1157
- "grid_row": null,
1158
- "grid_template_areas": null,
1159
- "grid_template_columns": null,
1160
- "grid_template_rows": null,
1161
- "height": null,
1162
- "justify_content": null,
1163
- "justify_items": null,
1164
- "left": null,
1165
- "margin": null,
1166
- "max_height": null,
1167
- "max_width": null,
1168
- "min_height": null,
1169
- "min_width": null,
1170
- "object_fit": null,
1171
- "object_position": null,
1172
- "order": null,
1173
- "overflow": null,
1174
- "overflow_x": null,
1175
- "overflow_y": null,
1176
- "padding": null,
1177
- "right": null,
1178
- "top": null,
1179
- "visibility": null,
1180
- "width": null
1181
- }
1182
- },
1183
- "e2f414e22bfe438295eb504d191ca25a": {
1184
- "model_module": "@jupyter-widgets/base",
1185
- "model_name": "LayoutModel",
1186
- "model_module_version": "1.2.0",
1187
- "state": {
1188
- "_model_module": "@jupyter-widgets/base",
1189
- "_model_module_version": "1.2.0",
1190
- "_model_name": "LayoutModel",
1191
- "_view_count": null,
1192
- "_view_module": "@jupyter-widgets/base",
1193
- "_view_module_version": "1.2.0",
1194
- "_view_name": "LayoutView",
1195
- "align_content": null,
1196
- "align_items": null,
1197
- "align_self": null,
1198
- "border": null,
1199
- "bottom": null,
1200
- "display": null,
1201
- "flex": null,
1202
- "flex_flow": null,
1203
- "grid_area": null,
1204
- "grid_auto_columns": null,
1205
- "grid_auto_flow": null,
1206
- "grid_auto_rows": null,
1207
- "grid_column": null,
1208
- "grid_gap": null,
1209
- "grid_row": null,
1210
- "grid_template_areas": null,
1211
- "grid_template_columns": null,
1212
- "grid_template_rows": null,
1213
- "height": null,
1214
- "justify_content": null,
1215
- "justify_items": null,
1216
- "left": null,
1217
- "margin": null,
1218
- "max_height": null,
1219
- "max_width": null,
1220
- "min_height": null,
1221
- "min_width": null,
1222
- "object_fit": null,
1223
- "object_position": null,
1224
- "order": null,
1225
- "overflow": null,
1226
- "overflow_x": null,
1227
- "overflow_y": null,
1228
- "padding": null,
1229
- "right": null,
1230
- "top": null,
1231
- "visibility": null,
1232
- "width": null
1233
- }
1234
- },
1235
- "6f86e52c4844489b902c355a67f07c57": {
1236
- "model_module": "@jupyter-widgets/controls",
1237
- "model_name": "DescriptionStyleModel",
1238
- "model_module_version": "1.5.0",
1239
- "state": {
1240
- "_model_module": "@jupyter-widgets/controls",
1241
- "_model_module_version": "1.5.0",
1242
- "_model_name": "DescriptionStyleModel",
1243
- "_view_count": null,
1244
- "_view_module": "@jupyter-widgets/base",
1245
- "_view_module_version": "1.2.0",
1246
- "_view_name": "StyleView",
1247
- "description_width": ""
1248
- }
1249
- },
1250
- "0525588beb664916a5c499669dea218c": {
1251
- "model_module": "@jupyter-widgets/base",
1252
- "model_name": "LayoutModel",
1253
- "model_module_version": "1.2.0",
1254
- "state": {
1255
- "_model_module": "@jupyter-widgets/base",
1256
- "_model_module_version": "1.2.0",
1257
- "_model_name": "LayoutModel",
1258
- "_view_count": null,
1259
- "_view_module": "@jupyter-widgets/base",
1260
- "_view_module_version": "1.2.0",
1261
- "_view_name": "LayoutView",
1262
- "align_content": null,
1263
- "align_items": null,
1264
- "align_self": null,
1265
- "border": null,
1266
- "bottom": null,
1267
- "display": null,
1268
- "flex": null,
1269
- "flex_flow": null,
1270
- "grid_area": null,
1271
- "grid_auto_columns": null,
1272
- "grid_auto_flow": null,
1273
- "grid_auto_rows": null,
1274
- "grid_column": null,
1275
- "grid_gap": null,
1276
- "grid_row": null,
1277
- "grid_template_areas": null,
1278
- "grid_template_columns": null,
1279
- "grid_template_rows": null,
1280
- "height": null,
1281
- "justify_content": null,
1282
- "justify_items": null,
1283
- "left": null,
1284
- "margin": null,
1285
- "max_height": null,
1286
- "max_width": null,
1287
- "min_height": null,
1288
- "min_width": null,
1289
- "object_fit": null,
1290
- "object_position": null,
1291
- "order": null,
1292
- "overflow": null,
1293
- "overflow_x": null,
1294
- "overflow_y": null,
1295
- "padding": null,
1296
- "right": null,
1297
- "top": null,
1298
- "visibility": null,
1299
- "width": null
1300
- }
1301
- },
1302
- "b914433a72d9420fa451da42fb87b3a9": {
1303
- "model_module": "@jupyter-widgets/controls",
1304
- "model_name": "ProgressStyleModel",
1305
- "model_module_version": "1.5.0",
1306
- "state": {
1307
- "_model_module": "@jupyter-widgets/controls",
1308
- "_model_module_version": "1.5.0",
1309
- "_model_name": "ProgressStyleModel",
1310
- "_view_count": null,
1311
- "_view_module": "@jupyter-widgets/base",
1312
- "_view_module_version": "1.2.0",
1313
- "_view_name": "StyleView",
1314
- "bar_color": null,
1315
- "description_width": ""
1316
- }
1317
- },
1318
- "0a32118ff47246d38c61ed31c4e27bc0": {
1319
- "model_module": "@jupyter-widgets/base",
1320
- "model_name": "LayoutModel",
1321
- "model_module_version": "1.2.0",
1322
- "state": {
1323
- "_model_module": "@jupyter-widgets/base",
1324
- "_model_module_version": "1.2.0",
1325
- "_model_name": "LayoutModel",
1326
- "_view_count": null,
1327
- "_view_module": "@jupyter-widgets/base",
1328
- "_view_module_version": "1.2.0",
1329
- "_view_name": "LayoutView",
1330
- "align_content": null,
1331
- "align_items": null,
1332
- "align_self": null,
1333
- "border": null,
1334
- "bottom": null,
1335
- "display": null,
1336
- "flex": null,
1337
- "flex_flow": null,
1338
- "grid_area": null,
1339
- "grid_auto_columns": null,
1340
- "grid_auto_flow": null,
1341
- "grid_auto_rows": null,
1342
- "grid_column": null,
1343
- "grid_gap": null,
1344
- "grid_row": null,
1345
- "grid_template_areas": null,
1346
- "grid_template_columns": null,
1347
- "grid_template_rows": null,
1348
- "height": null,
1349
- "justify_content": null,
1350
- "justify_items": null,
1351
- "left": null,
1352
- "margin": null,
1353
- "max_height": null,
1354
- "max_width": null,
1355
- "min_height": null,
1356
- "min_width": null,
1357
- "object_fit": null,
1358
- "object_position": null,
1359
- "order": null,
1360
- "overflow": null,
1361
- "overflow_x": null,
1362
- "overflow_y": null,
1363
- "padding": null,
1364
- "right": null,
1365
- "top": null,
1366
- "visibility": null,
1367
- "width": null
1368
- }
1369
- },
1370
- "6210e1a9cb474898acbde80d6fe1be58": {
1371
- "model_module": "@jupyter-widgets/controls",
1372
- "model_name": "DescriptionStyleModel",
1373
- "model_module_version": "1.5.0",
1374
- "state": {
1375
- "_model_module": "@jupyter-widgets/controls",
1376
- "_model_module_version": "1.5.0",
1377
- "_model_name": "DescriptionStyleModel",
1378
- "_view_count": null,
1379
- "_view_module": "@jupyter-widgets/base",
1380
- "_view_module_version": "1.2.0",
1381
- "_view_name": "StyleView",
1382
- "description_width": ""
1383
- }
1384
- }
1385
- }
1386
- }
1387
- },
1388
- "cells": [
1389
- {
1390
- "cell_type": "code",
1391
- "source": [
1392
- "from google.colab import drive\n",
1393
- "drive.mount('/content/drive')"
1394
- ],
1395
- "metadata": {
1396
- "colab": {
1397
- "base_uri": "https://localhost:8080/"
1398
- },
1399
- "id": "SLqPFhYaMOOJ",
1400
- "outputId": "b2d4ed09-354e-4be1-8bf9-38cefcc374db"
1401
- },
1402
- "execution_count": null,
1403
- "outputs": [
1404
- {
1405
- "output_type": "stream",
1406
- "name": "stdout",
1407
- "text": [
1408
- "Mounted at /content/drive\n"
1409
- ]
1410
- }
1411
- ]
1412
- },
1413
- {
1414
- "cell_type": "code",
1415
- "execution_count": null,
1416
- "metadata": {
1417
- "colab": {
1418
- "base_uri": "https://localhost:8080/"
1419
- },
1420
- "id": "AVFoNjUDIxQo",
1421
- "outputId": "d234fea1-7d2e-43ea-d5f0-51eb18926aab"
1422
- },
1423
- "outputs": [
1424
- {
1425
- "output_type": "stream",
1426
- "name": "stdout",
1427
- "text": [
1428
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
1429
- "Collecting gradio\n",
1430
- " Downloading gradio-3.9-py3-none-any.whl (11.6 MB)\n",
1431
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 11.6 MB 5.1 MB/s \n",
1432
- "\u001b[?25hCollecting paramiko\n",
1433
- " Downloading paramiko-2.12.0-py2.py3-none-any.whl (213 kB)\n",
1434
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 213 kB 68.1 MB/s \n",
1435
- "\u001b[?25hCollecting h11<0.13,>=0.11\n",
1436
- " Downloading h11-0.12.0-py3-none-any.whl (54 kB)\n",
1437
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 54 kB 3.4 MB/s \n",
1438
- "\u001b[?25hCollecting ffmpy\n",
1439
- " Downloading ffmpy-0.3.0.tar.gz (4.8 kB)\n",
1440
- "Collecting pydub\n",
1441
- " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
1442
- "Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from gradio) (6.0)\n",
1443
- "Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (from gradio) (7.1.2)\n",
1444
- "Collecting python-multipart\n",
1445
- " Downloading python-multipart-0.0.5.tar.gz (32 kB)\n",
1446
- "Collecting fastapi\n",
1447
- " Downloading fastapi-0.86.0-py3-none-any.whl (55 kB)\n",
1448
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 55 kB 3.6 MB/s \n",
1449
- "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from gradio) (1.3.5)\n",
1450
- "Requirement already satisfied: pydantic in /usr/local/lib/python3.7/dist-packages (from gradio) (1.10.2)\n",
1451
- "Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from gradio) (3.2.2)\n",
1452
- "Collecting orjson\n",
1453
- " Downloading orjson-3.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272 kB)\n",
1454
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 272 kB 53.5 MB/s \n",
1455
- "\u001b[?25hCollecting httpx\n",
1456
- " Downloading httpx-0.23.0-py3-none-any.whl (84 kB)\n",
1457
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 3.8 MB/s \n",
1458
- "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from gradio) (2.23.0)\n",
1459
- "Collecting markdown-it-py[linkify,plugins]\n",
1460
- " Downloading markdown_it_py-2.1.0-py3-none-any.whl (84 kB)\n",
1461
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 3.6 MB/s \n",
1462
- "\u001b[?25hCollecting websockets\n",
1463
- " Downloading websockets-10.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)\n",
1464
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 106 kB 72.4 MB/s \n",
1465
- "\u001b[?25hCollecting pycryptodome\n",
1466
- " Downloading pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl (2.3 MB)\n",
1467
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.3 MB 40.3 MB/s \n",
1468
- "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.7/dist-packages (from gradio) (2022.10.0)\n",
1469
- "Requirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from gradio) (3.8.3)\n",
1470
- "Collecting uvicorn\n",
1471
- " Downloading uvicorn-0.19.0-py3-none-any.whl (56 kB)\n",
1472
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 56 kB 1.1 MB/s \n",
1473
- "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from gradio) (1.21.6)\n",
1474
- "Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from gradio) (2.11.3)\n",
1475
- "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.8.1)\n",
1476
- "Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.1.1)\n",
1477
- "Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (0.13.0)\n",
1478
- "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.0.2)\n",
1479
- "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.2.0)\n",
1480
- "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.3.1)\n",
1481
- "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (6.0.2)\n",
1482
- "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (22.1.0)\n",
1483
- "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (2.1.1)\n",
1484
- "Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.7/dist-packages (from yarl<2.0,>=1.0->aiohttp->gradio) (2.10)\n",
1485
- "Collecting starlette==0.20.4\n",
1486
- " Downloading starlette-0.20.4-py3-none-any.whl (63 kB)\n",
1487
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 63 kB 2.3 MB/s \n",
1488
- "\u001b[?25hCollecting anyio<5,>=3.4.0\n",
1489
- " Downloading anyio-3.6.2-py3-none-any.whl (80 kB)\n",
1490
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 80 kB 10.1 MB/s \n",
1491
- "\u001b[?25hCollecting sniffio>=1.1\n",
1492
- " Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n",
1493
- "Requirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from httpx->gradio) (2022.9.24)\n",
1494
- "Collecting httpcore<0.16.0,>=0.15.0\n",
1495
- " Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)\n",
1496
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 1.9 MB/s \n",
1497
- "\u001b[?25hCollecting rfc3986[idna2008]<2,>=1.3\n",
1498
- " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
1499
- "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->gradio) (2.0.1)\n",
1500
- "Collecting mdurl~=0.1\n",
1501
- " Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
1502
- "Collecting mdit-py-plugins\n",
1503
- " Downloading mdit_py_plugins-0.3.1-py3-none-any.whl (46 kB)\n",
1504
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 46 kB 3.9 MB/s \n",
1505
- "\u001b[?25hCollecting linkify-it-py~=1.0\n",
1506
- " Downloading linkify_it_py-1.0.3-py3-none-any.whl (19 kB)\n",
1507
- "Collecting uc-micro-py\n",
1508
- " Downloading uc_micro_py-1.0.1-py3-none-any.whl (6.2 kB)\n",
1509
- "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (0.11.0)\n",
1510
- "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (3.0.9)\n",
1511
- "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (1.4.4)\n",
1512
- "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (2.8.2)\n",
1513
- "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib->gradio) (1.15.0)\n",
1514
- "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->gradio) (2022.5)\n",
1515
- "Collecting cryptography>=2.5\n",
1516
- " Downloading cryptography-38.0.3-cp36-abi3-manylinux_2_24_x86_64.whl (4.1 MB)\n",
1517
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4.1 MB 33.2 MB/s \n",
1518
- "\u001b[?25hCollecting bcrypt>=3.1.3\n",
1519
- " Downloading bcrypt-4.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (593 kB)\n",
1520
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 593 kB 64.0 MB/s \n",
1521
- "\u001b[?25hCollecting pynacl>=1.0.1\n",
1522
- " Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)\n",
1523
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 856 kB 76.1 MB/s \n",
1524
- "\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=2.5->paramiko->gradio) (1.15.1)\n",
1525
- "Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=2.5->paramiko->gradio) (2.21)\n",
1526
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (1.24.3)\n",
1527
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (3.0.4)\n",
1528
- "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from uvicorn->gradio) (7.1.2)\n",
1529
- "Building wheels for collected packages: ffmpy, python-multipart\n",
1530
- " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
1531
- " Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=4712 sha256=8772ed366b9401749c2553ba6e4c3b27b90318514852609278c470afd54c3703\n",
1532
- " Stored in directory: /root/.cache/pip/wheels/13/e4/6c/e8059816e86796a597c6e6b0d4c880630f51a1fcfa0befd5e6\n",
1533
- " Building wheel for python-multipart (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
1534
- " Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=993df2825c6c6b14a7305652ff56ebc4d0cd024c87d49ae695b90372d1b7f253\n",
1535
- " Stored in directory: /root/.cache/pip/wheels/2c/41/7c/bfd1c180534ffdcc0972f78c5758f89881602175d48a8bcd2c\n",
1536
- "Successfully built ffmpy python-multipart\n",
1537
- "Installing collected packages: sniffio, mdurl, uc-micro-py, rfc3986, markdown-it-py, h11, anyio, starlette, pynacl, mdit-py-plugins, linkify-it-py, httpcore, cryptography, bcrypt, websockets, uvicorn, python-multipart, pydub, pycryptodome, paramiko, orjson, httpx, ffmpy, fastapi, gradio\n",
1538
- "Successfully installed anyio-3.6.2 bcrypt-4.0.1 cryptography-38.0.3 fastapi-0.86.0 ffmpy-0.3.0 gradio-3.9 h11-0.12.0 httpcore-0.15.0 httpx-0.23.0 linkify-it-py-1.0.3 markdown-it-py-2.1.0 mdit-py-plugins-0.3.1 mdurl-0.1.2 orjson-3.8.1 paramiko-2.12.0 pycryptodome-3.15.0 pydub-0.25.1 pynacl-1.5.0 python-multipart-0.0.5 rfc3986-1.5.0 sniffio-1.3.0 starlette-0.20.4 uc-micro-py-1.0.1 uvicorn-0.19.0 websockets-10.4\n",
1539
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
1540
- "Collecting transformers\n",
1541
- " Downloading transformers-4.24.0-py3-none-any.whl (5.5 MB)\n",
1542
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.5 MB 4.5 MB/s \n",
1543
- "\u001b[?25hRequirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.64.1)\n",
1544
- "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (6.0)\n",
1545
- "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n",
1546
- "Collecting huggingface-hub<1.0,>=0.10.0\n",
1547
- " Downloading huggingface_hub-0.10.1-py3-none-any.whl (163 kB)\n",
1548
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 163 kB 49.4 MB/s \n",
1549
- "\u001b[?25hRequirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers) (4.13.0)\n",
1550
- "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2022.6.2)\n",
1551
- "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (21.3)\n",
1552
- "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.8.0)\n",
1553
- "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
1554
- " Downloading tokenizers-0.13.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
1555
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7.6 MB 43.6 MB/s \n",
1556
- "\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (1.21.6)\n",
1557
- "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.10.0->transformers) (4.1.1)\n",
1558
- "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers) (3.0.9)\n",
1559
- "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers) (3.10.0)\n",
1560
- "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n",
1561
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.24.3)\n",
1562
- "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2022.9.24)\n",
1563
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n",
1564
- "Installing collected packages: tokenizers, huggingface-hub, transformers\n",
1565
- "Successfully installed huggingface-hub-0.10.1 tokenizers-0.13.2 transformers-4.24.0\n"
1566
- ]
1567
- }
1568
- ],
1569
- "source": [
1570
- "!pip install gradio\n",
1571
- "!pip install transformers"
1572
- ]
1573
- },
1574
- {
1575
- "cell_type": "code",
1576
- "source": [
1577
- "import gradio as gr\n",
1578
- "\n",
1579
- "from transformers import AutoTokenizer\n",
1580
- "from transformers import TFAutoModelForCausalLM"
1581
- ],
1582
- "metadata": {
1583
- "id": "1yVHOnYwKZwJ"
1584
- },
1585
- "execution_count": null,
1586
- "outputs": []
1587
- },
1588
- {
1589
- "cell_type": "code",
1590
- "source": [
1591
- "#load model\n",
1592
- "model = TFAutoModelForCausalLM.from_pretrained('drive/MyDrive/FIRE_3rd Sem/peom_gn/')\n",
1593
- "base_model = \"distilgpt2\"\n",
1594
- "tokenizer = AutoTokenizer.from_pretrained(base_model)"
1595
- ],
1596
- "metadata": {
1597
- "colab": {
1598
- "base_uri": "https://localhost:8080/",
1599
- "height": 236,
1600
- "referenced_widgets": [
1601
- "530e92427f96443e8db1a97abd6c6a52",
1602
- "e02f05cf2a5d42b7bee0bbe719198b8d",
1603
- "173b02af44c346e2a56283ee6a146c0e",
1604
- "4b42f65e2e0945fd8f51d39200f29fa8",
1605
- "246e208413d143949a101914a6216ea8",
1606
- "0c75250aaa454c638fc8bed7365ce415",
1607
- "8965848a3d594be188f056ee3644ecb5",
1608
- "0395259b5c674039b9c51500e33c37e9",
1609
- "1b65db5804f64ceaaac4cac9c526cd3f",
1610
- "812aa6f521ce4b798c08bffab3329b67",
1611
- "4794a81d2ef44fbeb1e88998085a5f43",
1612
- "6b7df437d08d4c01be16b79e41019e3b",
1613
- "23563f674f0f4f1693a0acde9623573c",
1614
- "8c427e0fc2d34a24867fd5d711b080e2",
1615
- "2a694b94ca2043b286ce17d3c36ed54b",
1616
- "020e7d8888d0405b93d1a3127a16ba15",
1617
- "b86ccf32ba324ee198481b3611617dbc",
1618
- "621717f94333429ab4e47224550771fe",
1619
- "c2e4edd790054604a7756a1d7b9f497a",
1620
- "e58ef4fb5651473c9cf9b889624ccd55",
1621
- "473c51fb7519486bbe3050c77ab7080c",
1622
- "b4382f19bea946a9a6b2a87475604e46",
1623
- "52b302d4ea1d4999a11652906f9395e6",
1624
- "7e8fe68702cb47749524717a2f0f2678",
1625
- "e35c5da585b74cda96cf944dca0f1522",
1626
- "3d8d2200ba91491cb90473ab36f11b2a",
1627
- "aa8f858b51374b5fb8f33e4bd82e2bdf",
1628
- "875fd933bfbf4d2c869bfca5ee5e5b88",
1629
- "e04f3eb8192c4da28816aabe24e7c126",
1630
- "8d9ea460130947e1b30567c14d804a33",
1631
- "9e3ce0f556c54eba95a1aa4db1e177f3",
1632
- "153545ef1fc84847bf0d437fc37c0afd",
1633
- "a74454be91b34441b1b05e1714b7d9b6",
1634
- "926d77fde11f4f31920e3c6604ad2512",
1635
- "c761c42270c14cca8818e9e8e5fefaf7",
1636
- "15073b5721a941a88948bd1d4a4e30a2",
1637
- "51e0e9a4829e45e0b2518380e8a7614a",
1638
- "db76248f90524c94bdbf680ca185816e",
1639
- "e2f414e22bfe438295eb504d191ca25a",
1640
- "6f86e52c4844489b902c355a67f07c57",
1641
- "0525588beb664916a5c499669dea218c",
1642
- "b914433a72d9420fa451da42fb87b3a9",
1643
- "0a32118ff47246d38c61ed31c4e27bc0",
1644
- "6210e1a9cb474898acbde80d6fe1be58"
1645
- ]
1646
- },
1647
- "id": "cQ9woCBaKogJ",
1648
- "outputId": "1d825c73-6532-449b-8234-d27f330ed228"
1649
- },
1650
- "execution_count": null,
1651
- "outputs": [
1652
- {
1653
- "output_type": "stream",
1654
- "name": "stderr",
1655
- "text": [
1656
- "All model checkpoint layers were used when initializing TFGPT2LMHeadModel.\n",
1657
- "\n",
1658
- "All the layers of TFGPT2LMHeadModel were initialized from the model checkpoint at drive/MyDrive/FIRE_3rd Sem/peom_gn/.\n",
1659
- "If your task is similar to the task the model of the checkpoint was trained on, you can already use TFGPT2LMHeadModel for predictions without further training.\n"
1660
- ]
1661
- },
1662
- {
1663
- "output_type": "display_data",
1664
- "data": {
1665
- "text/plain": [
1666
- "Downloading: 0%| | 0.00/762 [00:00<?, ?B/s]"
1667
- ],
1668
- "application/vnd.jupyter.widget-view+json": {
1669
- "version_major": 2,
1670
- "version_minor": 0,
1671
- "model_id": "530e92427f96443e8db1a97abd6c6a52"
1672
- }
1673
- },
1674
- "metadata": {}
1675
- },
1676
- {
1677
- "output_type": "display_data",
1678
- "data": {
1679
- "text/plain": [
1680
- "Downloading: 0%| | 0.00/1.04M [00:00<?, ?B/s]"
1681
- ],
1682
- "application/vnd.jupyter.widget-view+json": {
1683
- "version_major": 2,
1684
- "version_minor": 0,
1685
- "model_id": "6b7df437d08d4c01be16b79e41019e3b"
1686
- }
1687
- },
1688
- "metadata": {}
1689
- },
1690
- {
1691
- "output_type": "display_data",
1692
- "data": {
1693
- "text/plain": [
1694
- "Downloading: 0%| | 0.00/456k [00:00<?, ?B/s]"
1695
- ],
1696
- "application/vnd.jupyter.widget-view+json": {
1697
- "version_major": 2,
1698
- "version_minor": 0,
1699
- "model_id": "52b302d4ea1d4999a11652906f9395e6"
1700
- }
1701
- },
1702
- "metadata": {}
1703
- },
1704
- {
1705
- "output_type": "display_data",
1706
- "data": {
1707
- "text/plain": [
1708
- "Downloading: 0%| | 0.00/1.36M [00:00<?, ?B/s]"
1709
- ],
1710
- "application/vnd.jupyter.widget-view+json": {
1711
- "version_major": 2,
1712
- "version_minor": 0,
1713
- "model_id": "926d77fde11f4f31920e3c6604ad2512"
1714
- }
1715
- },
1716
- "metadata": {}
1717
- }
1718
- ]
1719
- },
1720
- {
1721
- "cell_type": "code",
1722
- "source": [
1723
- "\"\"\"\n",
1724
- "def model_inference(start):\n",
1725
- " res = []\n",
1726
- " prev_sen = start\n",
1727
- " for i in range(6):\n",
1728
- " input = prev_sen\n",
1729
- " res.append(input)\n",
1730
- "\n",
1731
- " tokenized = tokenizer(input, return_tensors=\"np\")\n",
1732
- " outputs = model.generate(**tokenized, max_new_tokens=15)\n",
1733
- " prev_sen = tokenizer.decode(outputs[0])\n",
1734
- " if len(prev_sen.split(input)) > 1:\n",
1735
- " prev_sen = prev_sen.split(input)[1]\n",
1736
- " else:\n",
1737
- " break\n",
1738
- "\n",
1739
- " res = \"\".join(res).replace(\"<LINE>\", \"\\n\")\n",
1740
- " return res\"\"\""
1741
- ],
1742
- "metadata": {
1743
- "id": "0r5Jh3YOKbeo"
1744
- },
1745
- "execution_count": null,
1746
- "outputs": []
1747
- },
1748
- {
1749
- "cell_type": "code",
1750
- "source": [
1751
- "def model_inference1(start):\n",
1752
- " tokenized = tokenizer(start, return_tensors=\"np\")\n",
1753
- " outputs = model.generate(**tokenized, max_new_tokens=20)\n",
1754
- " res = tokenizer.decode(outputs[0])\n",
1755
- " return res.replace(\"<LINE>\", \"\\n\")"
1756
- ],
1757
- "metadata": {
1758
- "id": "NscfxxiSZBSN"
1759
- },
1760
- "execution_count": null,
1761
- "outputs": []
1762
- },
1763
- {
1764
- "cell_type": "code",
1765
- "source": [
1766
- "demo = gr.Interface(\n",
1767
- " fn=model_inference1,\n",
1768
- " inputs=gr.Textbox(lines=2, placeholder=\"Start Here...\"),\n",
1769
- " outputs=\"text\",\n",
1770
- ")\n",
1771
- "demo.launch()\n"
1772
- ],
1773
- "metadata": {
1774
- "colab": {
1775
- "base_uri": "https://localhost:8080/",
1776
- "height": 671
1777
- },
1778
- "id": "lFhwwyBUI-wj",
1779
- "outputId": "f6f1f76f-705e-469f-d9a0-0c3a2c6ce427"
1780
- },
1781
- "execution_count": null,
1782
- "outputs": [
1783
- {
1784
- "output_type": "stream",
1785
- "name": "stdout",
1786
- "text": [
1787
- "Colab notebook detected. To show errors in colab notebook, set `debug=True` in `launch()`\n",
1788
- "\n",
1789
- "Using Embedded Colab Mode (NEW). If you have issues, please use share=True and file an issue at https://github.com/gradio-app/gradio/\n",
1790
- "Note: opening the browser inspector may crash Embedded Colab Mode.\n",
1791
- "\n",
1792
- "To create a public link, set `share=True` in `launch()`.\n"
1793
- ]
1794
- },
1795
- {
1796
- "output_type": "display_data",
1797
- "data": {
1798
- "text/plain": [
1799
- "<IPython.core.display.Javascript object>"
1800
- ],
1801
- "application/javascript": [
1802
- "(async (port, path, width, height, cache, element) => {\n",
1803
- " if (!google.colab.kernel.accessAllowed && !cache) {\n",
1804
- " return;\n",
1805
- " }\n",
1806
- " element.appendChild(document.createTextNode(''));\n",
1807
- " const url = await google.colab.kernel.proxyPort(port, {cache});\n",
1808
- "\n",
1809
- " const external_link = document.createElement('div');\n",
1810
- " external_link.innerHTML = `\n",
1811
- " <div style=\"font-family: monospace; margin-bottom: 0.5rem\">\n",
1812
- " Running on <a href=${new URL(path, url).toString()} target=\"_blank\">\n",
1813
- " https://localhost:${port}${path}\n",
1814
- " </a>\n",
1815
- " </div>\n",
1816
- " `;\n",
1817
- " element.appendChild(external_link);\n",
1818
- "\n",
1819
- " const iframe = document.createElement('iframe');\n",
1820
- " iframe.src = new URL(path, url).toString();\n",
1821
- " iframe.height = height;\n",
1822
- " iframe.allow = \"autoplay; camera; microphone; clipboard-read; clipboard-write;\"\n",
1823
- " iframe.width = width;\n",
1824
- " iframe.style.border = 0;\n",
1825
- " element.appendChild(iframe);\n",
1826
- " })(7860, \"/\", \"100%\", 500, false, window.element)"
1827
- ]
1828
- },
1829
- "metadata": {}
1830
- },
1831
- {
1832
- "output_type": "execute_result",
1833
- "data": {
1834
- "text/plain": [
1835
- "(<gradio.routes.App at 0x7f13172aa410>, 'http://127.0.0.1:7860/', None)"
1836
- ]
1837
- },
1838
- "metadata": {},
1839
- "execution_count": 7
1840
- }
1841
- ]
1842
- },
1843
- {
1844
- "cell_type": "code",
1845
- "source": [],
1846
- "metadata": {
1847
- "id": "6g5QwJB6JtP7"
1848
- },
1849
- "execution_count": null,
1850
- "outputs": []
1851
- }
1852
- ]
1853
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Poem Generation/model/config.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "_name_or_path": "distilgpt2",
3
- "_num_labels": 1,
4
- "activation_function": "gelu_new",
5
- "architectures": [
6
- "GPT2LMHeadModel"
7
- ],
8
- "attn_pdrop": 0.1,
9
- "bos_token_id": 50256,
10
- "embd_pdrop": 0.1,
11
- "eos_token_id": 50256,
12
- "id2label": {
13
- "0": "LABEL_0"
14
- },
15
- "initializer_range": 0.02,
16
- "label2id": {
17
- "LABEL_0": 0
18
- },
19
- "layer_norm_epsilon": 1e-05,
20
- "model_type": "gpt2",
21
- "n_ctx": 1024,
22
- "n_embd": 768,
23
- "n_head": 12,
24
- "n_inner": null,
25
- "n_layer": 6,
26
- "n_positions": 1024,
27
- "reorder_and_upcast_attn": false,
28
- "resid_pdrop": 0.1,
29
- "scale_attn_by_inverse_layer_idx": false,
30
- "scale_attn_weights": true,
31
- "summary_activation": null,
32
- "summary_first_dropout": 0.1,
33
- "summary_proj_to_labels": true,
34
- "summary_type": "cls_index",
35
- "summary_use_proj": true,
36
- "task_specific_params": {
37
- "text-generation": {
38
- "do_sample": true,
39
- "max_length": 50
40
- }
41
- },
42
- "transformers_version": "4.24.0",
43
- "use_cache": true,
44
- "vocab_size": 50257
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Sentiment Analysis/.DS_Store DELETED
Binary file (6.15 kB)
 
Sentiment Analysis/Dataset_Generation.ipynb DELETED
@@ -1,1259 +0,0 @@
1
- {
2
- "nbformat": 4,
3
- "nbformat_minor": 0,
4
- "metadata": {
5
- "colab": {
6
- "provenance": []
7
- },
8
- "kernelspec": {
9
- "name": "python3",
10
- "display_name": "Python 3"
11
- },
12
- "language_info": {
13
- "name": "python"
14
- },
15
- "widgets": {
16
- "application/vnd.jupyter.widget-state+json": {
17
- "fbbc510b0e1548748409b6c016bdaa24": {
18
- "model_module": "@jupyter-widgets/controls",
19
- "model_name": "HBoxModel",
20
- "model_module_version": "1.5.0",
21
- "state": {
22
- "_dom_classes": [],
23
- "_model_module": "@jupyter-widgets/controls",
24
- "_model_module_version": "1.5.0",
25
- "_model_name": "HBoxModel",
26
- "_view_count": null,
27
- "_view_module": "@jupyter-widgets/controls",
28
- "_view_module_version": "1.5.0",
29
- "_view_name": "HBoxView",
30
- "box_style": "",
31
- "children": [
32
- "IPY_MODEL_5b95f4951d0b44bb99d2b76f54556511",
33
- "IPY_MODEL_031b30d2c7d7402f8c63dd11c83bc690",
34
- "IPY_MODEL_38b1d5d5328249e2b830e9847cf407e1"
35
- ],
36
- "layout": "IPY_MODEL_30e4917df33c4f4fbd7813ab864f6b76"
37
- }
38
- },
39
- "5b95f4951d0b44bb99d2b76f54556511": {
40
- "model_module": "@jupyter-widgets/controls",
41
- "model_name": "HTMLModel",
42
- "model_module_version": "1.5.0",
43
- "state": {
44
- "_dom_classes": [],
45
- "_model_module": "@jupyter-widgets/controls",
46
- "_model_module_version": "1.5.0",
47
- "_model_name": "HTMLModel",
48
- "_view_count": null,
49
- "_view_module": "@jupyter-widgets/controls",
50
- "_view_module_version": "1.5.0",
51
- "_view_name": "HTMLView",
52
- "description": "",
53
- "description_tooltip": null,
54
- "layout": "IPY_MODEL_b470b1d8fb274a6fb933ecab0c18fa12",
55
- "placeholder": "​",
56
- "style": "IPY_MODEL_6eba305524bb4ea08d36eff08f34fa75",
57
- "value": "100%"
58
- }
59
- },
60
- "031b30d2c7d7402f8c63dd11c83bc690": {
61
- "model_module": "@jupyter-widgets/controls",
62
- "model_name": "FloatProgressModel",
63
- "model_module_version": "1.5.0",
64
- "state": {
65
- "_dom_classes": [],
66
- "_model_module": "@jupyter-widgets/controls",
67
- "_model_module_version": "1.5.0",
68
- "_model_name": "FloatProgressModel",
69
- "_view_count": null,
70
- "_view_module": "@jupyter-widgets/controls",
71
- "_view_module_version": "1.5.0",
72
- "_view_name": "ProgressView",
73
- "bar_style": "success",
74
- "description": "",
75
- "description_tooltip": null,
76
- "layout": "IPY_MODEL_57519ea679234aa18d9cb7e44b8181a9",
77
- "max": 3,
78
- "min": 0,
79
- "orientation": "horizontal",
80
- "style": "IPY_MODEL_ae126db234f34079a2bf79dbabd624a3",
81
- "value": 3
82
- }
83
- },
84
- "38b1d5d5328249e2b830e9847cf407e1": {
85
- "model_module": "@jupyter-widgets/controls",
86
- "model_name": "HTMLModel",
87
- "model_module_version": "1.5.0",
88
- "state": {
89
- "_dom_classes": [],
90
- "_model_module": "@jupyter-widgets/controls",
91
- "_model_module_version": "1.5.0",
92
- "_model_name": "HTMLModel",
93
- "_view_count": null,
94
- "_view_module": "@jupyter-widgets/controls",
95
- "_view_module_version": "1.5.0",
96
- "_view_name": "HTMLView",
97
- "description": "",
98
- "description_tooltip": null,
99
- "layout": "IPY_MODEL_3fce668226424a70bd0afcc725d68739",
100
- "placeholder": "​",
101
- "style": "IPY_MODEL_b810c87d8aec4c96acb20f4563777ddc",
102
- "value": " 3/3 [00:00&lt;00:00, 37.60it/s]"
103
- }
104
- },
105
- "30e4917df33c4f4fbd7813ab864f6b76": {
106
- "model_module": "@jupyter-widgets/base",
107
- "model_name": "LayoutModel",
108
- "model_module_version": "1.2.0",
109
- "state": {
110
- "_model_module": "@jupyter-widgets/base",
111
- "_model_module_version": "1.2.0",
112
- "_model_name": "LayoutModel",
113
- "_view_count": null,
114
- "_view_module": "@jupyter-widgets/base",
115
- "_view_module_version": "1.2.0",
116
- "_view_name": "LayoutView",
117
- "align_content": null,
118
- "align_items": null,
119
- "align_self": null,
120
- "border": null,
121
- "bottom": null,
122
- "display": null,
123
- "flex": null,
124
- "flex_flow": null,
125
- "grid_area": null,
126
- "grid_auto_columns": null,
127
- "grid_auto_flow": null,
128
- "grid_auto_rows": null,
129
- "grid_column": null,
130
- "grid_gap": null,
131
- "grid_row": null,
132
- "grid_template_areas": null,
133
- "grid_template_columns": null,
134
- "grid_template_rows": null,
135
- "height": null,
136
- "justify_content": null,
137
- "justify_items": null,
138
- "left": null,
139
- "margin": null,
140
- "max_height": null,
141
- "max_width": null,
142
- "min_height": null,
143
- "min_width": null,
144
- "object_fit": null,
145
- "object_position": null,
146
- "order": null,
147
- "overflow": null,
148
- "overflow_x": null,
149
- "overflow_y": null,
150
- "padding": null,
151
- "right": null,
152
- "top": null,
153
- "visibility": null,
154
- "width": null
155
- }
156
- },
157
- "b470b1d8fb274a6fb933ecab0c18fa12": {
158
- "model_module": "@jupyter-widgets/base",
159
- "model_name": "LayoutModel",
160
- "model_module_version": "1.2.0",
161
- "state": {
162
- "_model_module": "@jupyter-widgets/base",
163
- "_model_module_version": "1.2.0",
164
- "_model_name": "LayoutModel",
165
- "_view_count": null,
166
- "_view_module": "@jupyter-widgets/base",
167
- "_view_module_version": "1.2.0",
168
- "_view_name": "LayoutView",
169
- "align_content": null,
170
- "align_items": null,
171
- "align_self": null,
172
- "border": null,
173
- "bottom": null,
174
- "display": null,
175
- "flex": null,
176
- "flex_flow": null,
177
- "grid_area": null,
178
- "grid_auto_columns": null,
179
- "grid_auto_flow": null,
180
- "grid_auto_rows": null,
181
- "grid_column": null,
182
- "grid_gap": null,
183
- "grid_row": null,
184
- "grid_template_areas": null,
185
- "grid_template_columns": null,
186
- "grid_template_rows": null,
187
- "height": null,
188
- "justify_content": null,
189
- "justify_items": null,
190
- "left": null,
191
- "margin": null,
192
- "max_height": null,
193
- "max_width": null,
194
- "min_height": null,
195
- "min_width": null,
196
- "object_fit": null,
197
- "object_position": null,
198
- "order": null,
199
- "overflow": null,
200
- "overflow_x": null,
201
- "overflow_y": null,
202
- "padding": null,
203
- "right": null,
204
- "top": null,
205
- "visibility": null,
206
- "width": null
207
- }
208
- },
209
- "6eba305524bb4ea08d36eff08f34fa75": {
210
- "model_module": "@jupyter-widgets/controls",
211
- "model_name": "DescriptionStyleModel",
212
- "model_module_version": "1.5.0",
213
- "state": {
214
- "_model_module": "@jupyter-widgets/controls",
215
- "_model_module_version": "1.5.0",
216
- "_model_name": "DescriptionStyleModel",
217
- "_view_count": null,
218
- "_view_module": "@jupyter-widgets/base",
219
- "_view_module_version": "1.2.0",
220
- "_view_name": "StyleView",
221
- "description_width": ""
222
- }
223
- },
224
- "57519ea679234aa18d9cb7e44b8181a9": {
225
- "model_module": "@jupyter-widgets/base",
226
- "model_name": "LayoutModel",
227
- "model_module_version": "1.2.0",
228
- "state": {
229
- "_model_module": "@jupyter-widgets/base",
230
- "_model_module_version": "1.2.0",
231
- "_model_name": "LayoutModel",
232
- "_view_count": null,
233
- "_view_module": "@jupyter-widgets/base",
234
- "_view_module_version": "1.2.0",
235
- "_view_name": "LayoutView",
236
- "align_content": null,
237
- "align_items": null,
238
- "align_self": null,
239
- "border": null,
240
- "bottom": null,
241
- "display": null,
242
- "flex": null,
243
- "flex_flow": null,
244
- "grid_area": null,
245
- "grid_auto_columns": null,
246
- "grid_auto_flow": null,
247
- "grid_auto_rows": null,
248
- "grid_column": null,
249
- "grid_gap": null,
250
- "grid_row": null,
251
- "grid_template_areas": null,
252
- "grid_template_columns": null,
253
- "grid_template_rows": null,
254
- "height": null,
255
- "justify_content": null,
256
- "justify_items": null,
257
- "left": null,
258
- "margin": null,
259
- "max_height": null,
260
- "max_width": null,
261
- "min_height": null,
262
- "min_width": null,
263
- "object_fit": null,
264
- "object_position": null,
265
- "order": null,
266
- "overflow": null,
267
- "overflow_x": null,
268
- "overflow_y": null,
269
- "padding": null,
270
- "right": null,
271
- "top": null,
272
- "visibility": null,
273
- "width": null
274
- }
275
- },
276
- "ae126db234f34079a2bf79dbabd624a3": {
277
- "model_module": "@jupyter-widgets/controls",
278
- "model_name": "ProgressStyleModel",
279
- "model_module_version": "1.5.0",
280
- "state": {
281
- "_model_module": "@jupyter-widgets/controls",
282
- "_model_module_version": "1.5.0",
283
- "_model_name": "ProgressStyleModel",
284
- "_view_count": null,
285
- "_view_module": "@jupyter-widgets/base",
286
- "_view_module_version": "1.2.0",
287
- "_view_name": "StyleView",
288
- "bar_color": null,
289
- "description_width": ""
290
- }
291
- },
292
- "3fce668226424a70bd0afcc725d68739": {
293
- "model_module": "@jupyter-widgets/base",
294
- "model_name": "LayoutModel",
295
- "model_module_version": "1.2.0",
296
- "state": {
297
- "_model_module": "@jupyter-widgets/base",
298
- "_model_module_version": "1.2.0",
299
- "_model_name": "LayoutModel",
300
- "_view_count": null,
301
- "_view_module": "@jupyter-widgets/base",
302
- "_view_module_version": "1.2.0",
303
- "_view_name": "LayoutView",
304
- "align_content": null,
305
- "align_items": null,
306
- "align_self": null,
307
- "border": null,
308
- "bottom": null,
309
- "display": null,
310
- "flex": null,
311
- "flex_flow": null,
312
- "grid_area": null,
313
- "grid_auto_columns": null,
314
- "grid_auto_flow": null,
315
- "grid_auto_rows": null,
316
- "grid_column": null,
317
- "grid_gap": null,
318
- "grid_row": null,
319
- "grid_template_areas": null,
320
- "grid_template_columns": null,
321
- "grid_template_rows": null,
322
- "height": null,
323
- "justify_content": null,
324
- "justify_items": null,
325
- "left": null,
326
- "margin": null,
327
- "max_height": null,
328
- "max_width": null,
329
- "min_height": null,
330
- "min_width": null,
331
- "object_fit": null,
332
- "object_position": null,
333
- "order": null,
334
- "overflow": null,
335
- "overflow_x": null,
336
- "overflow_y": null,
337
- "padding": null,
338
- "right": null,
339
- "top": null,
340
- "visibility": null,
341
- "width": null
342
- }
343
- },
344
- "b810c87d8aec4c96acb20f4563777ddc": {
345
- "model_module": "@jupyter-widgets/controls",
346
- "model_name": "DescriptionStyleModel",
347
- "model_module_version": "1.5.0",
348
- "state": {
349
- "_model_module": "@jupyter-widgets/controls",
350
- "_model_module_version": "1.5.0",
351
- "_model_name": "DescriptionStyleModel",
352
- "_view_count": null,
353
- "_view_module": "@jupyter-widgets/base",
354
- "_view_module_version": "1.2.0",
355
- "_view_name": "StyleView",
356
- "description_width": ""
357
- }
358
- },
359
- "2691abf9765e4cf18a142cfc10ee5d2f": {
360
- "model_module": "@jupyter-widgets/controls",
361
- "model_name": "HBoxModel",
362
- "model_module_version": "1.5.0",
363
- "state": {
364
- "_dom_classes": [],
365
- "_model_module": "@jupyter-widgets/controls",
366
- "_model_module_version": "1.5.0",
367
- "_model_name": "HBoxModel",
368
- "_view_count": null,
369
- "_view_module": "@jupyter-widgets/controls",
370
- "_view_module_version": "1.5.0",
371
- "_view_name": "HBoxView",
372
- "box_style": "",
373
- "children": [
374
- "IPY_MODEL_2d8281fc5bc6411a898e4c31687462d9",
375
- "IPY_MODEL_831f795de5d54f32bbd821bcafb16675",
376
- "IPY_MODEL_fc06fd3b96124f498f041cff507fe00a"
377
- ],
378
- "layout": "IPY_MODEL_5bc4c971d82b47eaad865379fa9c381c"
379
- }
380
- },
381
- "2d8281fc5bc6411a898e4c31687462d9": {
382
- "model_module": "@jupyter-widgets/controls",
383
- "model_name": "HTMLModel",
384
- "model_module_version": "1.5.0",
385
- "state": {
386
- "_dom_classes": [],
387
- "_model_module": "@jupyter-widgets/controls",
388
- "_model_module_version": "1.5.0",
389
- "_model_name": "HTMLModel",
390
- "_view_count": null,
391
- "_view_module": "@jupyter-widgets/controls",
392
- "_view_module_version": "1.5.0",
393
- "_view_name": "HTMLView",
394
- "description": "",
395
- "description_tooltip": null,
396
- "layout": "IPY_MODEL_9469012a76194346b83c438ee64b620e",
397
- "placeholder": "​",
398
- "style": "IPY_MODEL_874e1e2f9f5341a4bed55ea0ae4b8cc1",
399
- "value": "100%"
400
- }
401
- },
402
- "831f795de5d54f32bbd821bcafb16675": {
403
- "model_module": "@jupyter-widgets/controls",
404
- "model_name": "FloatProgressModel",
405
- "model_module_version": "1.5.0",
406
- "state": {
407
- "_dom_classes": [],
408
- "_model_module": "@jupyter-widgets/controls",
409
- "_model_module_version": "1.5.0",
410
- "_model_name": "FloatProgressModel",
411
- "_view_count": null,
412
- "_view_module": "@jupyter-widgets/controls",
413
- "_view_module_version": "1.5.0",
414
- "_view_name": "ProgressView",
415
- "bar_style": "success",
416
- "description": "",
417
- "description_tooltip": null,
418
- "layout": "IPY_MODEL_038876ce0b0d456ab5c4f30f8f498dbe",
419
- "max": 68,
420
- "min": 0,
421
- "orientation": "horizontal",
422
- "style": "IPY_MODEL_5102475328e84e15b3d178dc599cc93a",
423
- "value": 68
424
- }
425
- },
426
- "fc06fd3b96124f498f041cff507fe00a": {
427
- "model_module": "@jupyter-widgets/controls",
428
- "model_name": "HTMLModel",
429
- "model_module_version": "1.5.0",
430
- "state": {
431
- "_dom_classes": [],
432
- "_model_module": "@jupyter-widgets/controls",
433
- "_model_module_version": "1.5.0",
434
- "_model_name": "HTMLModel",
435
- "_view_count": null,
436
- "_view_module": "@jupyter-widgets/controls",
437
- "_view_module_version": "1.5.0",
438
- "_view_name": "HTMLView",
439
- "description": "",
440
- "description_tooltip": null,
441
- "layout": "IPY_MODEL_a2a210635b0a479d837de6312410032c",
442
- "placeholder": "​",
443
- "style": "IPY_MODEL_5162637d8a9d4fc0824c3cd6dd19cf83",
444
- "value": " 68/68 [00:04&lt;00:00, 14.34ba/s]"
445
- }
446
- },
447
- "5bc4c971d82b47eaad865379fa9c381c": {
448
- "model_module": "@jupyter-widgets/base",
449
- "model_name": "LayoutModel",
450
- "model_module_version": "1.2.0",
451
- "state": {
452
- "_model_module": "@jupyter-widgets/base",
453
- "_model_module_version": "1.2.0",
454
- "_model_name": "LayoutModel",
455
- "_view_count": null,
456
- "_view_module": "@jupyter-widgets/base",
457
- "_view_module_version": "1.2.0",
458
- "_view_name": "LayoutView",
459
- "align_content": null,
460
- "align_items": null,
461
- "align_self": null,
462
- "border": null,
463
- "bottom": null,
464
- "display": null,
465
- "flex": null,
466
- "flex_flow": null,
467
- "grid_area": null,
468
- "grid_auto_columns": null,
469
- "grid_auto_flow": null,
470
- "grid_auto_rows": null,
471
- "grid_column": null,
472
- "grid_gap": null,
473
- "grid_row": null,
474
- "grid_template_areas": null,
475
- "grid_template_columns": null,
476
- "grid_template_rows": null,
477
- "height": null,
478
- "justify_content": null,
479
- "justify_items": null,
480
- "left": null,
481
- "margin": null,
482
- "max_height": null,
483
- "max_width": null,
484
- "min_height": null,
485
- "min_width": null,
486
- "object_fit": null,
487
- "object_position": null,
488
- "order": null,
489
- "overflow": null,
490
- "overflow_x": null,
491
- "overflow_y": null,
492
- "padding": null,
493
- "right": null,
494
- "top": null,
495
- "visibility": null,
496
- "width": null
497
- }
498
- },
499
- "9469012a76194346b83c438ee64b620e": {
500
- "model_module": "@jupyter-widgets/base",
501
- "model_name": "LayoutModel",
502
- "model_module_version": "1.2.0",
503
- "state": {
504
- "_model_module": "@jupyter-widgets/base",
505
- "_model_module_version": "1.2.0",
506
- "_model_name": "LayoutModel",
507
- "_view_count": null,
508
- "_view_module": "@jupyter-widgets/base",
509
- "_view_module_version": "1.2.0",
510
- "_view_name": "LayoutView",
511
- "align_content": null,
512
- "align_items": null,
513
- "align_self": null,
514
- "border": null,
515
- "bottom": null,
516
- "display": null,
517
- "flex": null,
518
- "flex_flow": null,
519
- "grid_area": null,
520
- "grid_auto_columns": null,
521
- "grid_auto_flow": null,
522
- "grid_auto_rows": null,
523
- "grid_column": null,
524
- "grid_gap": null,
525
- "grid_row": null,
526
- "grid_template_areas": null,
527
- "grid_template_columns": null,
528
- "grid_template_rows": null,
529
- "height": null,
530
- "justify_content": null,
531
- "justify_items": null,
532
- "left": null,
533
- "margin": null,
534
- "max_height": null,
535
- "max_width": null,
536
- "min_height": null,
537
- "min_width": null,
538
- "object_fit": null,
539
- "object_position": null,
540
- "order": null,
541
- "overflow": null,
542
- "overflow_x": null,
543
- "overflow_y": null,
544
- "padding": null,
545
- "right": null,
546
- "top": null,
547
- "visibility": null,
548
- "width": null
549
- }
550
- },
551
- "874e1e2f9f5341a4bed55ea0ae4b8cc1": {
552
- "model_module": "@jupyter-widgets/controls",
553
- "model_name": "DescriptionStyleModel",
554
- "model_module_version": "1.5.0",
555
- "state": {
556
- "_model_module": "@jupyter-widgets/controls",
557
- "_model_module_version": "1.5.0",
558
- "_model_name": "DescriptionStyleModel",
559
- "_view_count": null,
560
- "_view_module": "@jupyter-widgets/base",
561
- "_view_module_version": "1.2.0",
562
- "_view_name": "StyleView",
563
- "description_width": ""
564
- }
565
- },
566
- "038876ce0b0d456ab5c4f30f8f498dbe": {
567
- "model_module": "@jupyter-widgets/base",
568
- "model_name": "LayoutModel",
569
- "model_module_version": "1.2.0",
570
- "state": {
571
- "_model_module": "@jupyter-widgets/base",
572
- "_model_module_version": "1.2.0",
573
- "_model_name": "LayoutModel",
574
- "_view_count": null,
575
- "_view_module": "@jupyter-widgets/base",
576
- "_view_module_version": "1.2.0",
577
- "_view_name": "LayoutView",
578
- "align_content": null,
579
- "align_items": null,
580
- "align_self": null,
581
- "border": null,
582
- "bottom": null,
583
- "display": null,
584
- "flex": null,
585
- "flex_flow": null,
586
- "grid_area": null,
587
- "grid_auto_columns": null,
588
- "grid_auto_flow": null,
589
- "grid_auto_rows": null,
590
- "grid_column": null,
591
- "grid_gap": null,
592
- "grid_row": null,
593
- "grid_template_areas": null,
594
- "grid_template_columns": null,
595
- "grid_template_rows": null,
596
- "height": null,
597
- "justify_content": null,
598
- "justify_items": null,
599
- "left": null,
600
- "margin": null,
601
- "max_height": null,
602
- "max_width": null,
603
- "min_height": null,
604
- "min_width": null,
605
- "object_fit": null,
606
- "object_position": null,
607
- "order": null,
608
- "overflow": null,
609
- "overflow_x": null,
610
- "overflow_y": null,
611
- "padding": null,
612
- "right": null,
613
- "top": null,
614
- "visibility": null,
615
- "width": null
616
- }
617
- },
618
- "5102475328e84e15b3d178dc599cc93a": {
619
- "model_module": "@jupyter-widgets/controls",
620
- "model_name": "ProgressStyleModel",
621
- "model_module_version": "1.5.0",
622
- "state": {
623
- "_model_module": "@jupyter-widgets/controls",
624
- "_model_module_version": "1.5.0",
625
- "_model_name": "ProgressStyleModel",
626
- "_view_count": null,
627
- "_view_module": "@jupyter-widgets/base",
628
- "_view_module_version": "1.2.0",
629
- "_view_name": "StyleView",
630
- "bar_color": null,
631
- "description_width": ""
632
- }
633
- },
634
- "a2a210635b0a479d837de6312410032c": {
635
- "model_module": "@jupyter-widgets/base",
636
- "model_name": "LayoutModel",
637
- "model_module_version": "1.2.0",
638
- "state": {
639
- "_model_module": "@jupyter-widgets/base",
640
- "_model_module_version": "1.2.0",
641
- "_model_name": "LayoutModel",
642
- "_view_count": null,
643
- "_view_module": "@jupyter-widgets/base",
644
- "_view_module_version": "1.2.0",
645
- "_view_name": "LayoutView",
646
- "align_content": null,
647
- "align_items": null,
648
- "align_self": null,
649
- "border": null,
650
- "bottom": null,
651
- "display": null,
652
- "flex": null,
653
- "flex_flow": null,
654
- "grid_area": null,
655
- "grid_auto_columns": null,
656
- "grid_auto_flow": null,
657
- "grid_auto_rows": null,
658
- "grid_column": null,
659
- "grid_gap": null,
660
- "grid_row": null,
661
- "grid_template_areas": null,
662
- "grid_template_columns": null,
663
- "grid_template_rows": null,
664
- "height": null,
665
- "justify_content": null,
666
- "justify_items": null,
667
- "left": null,
668
- "margin": null,
669
- "max_height": null,
670
- "max_width": null,
671
- "min_height": null,
672
- "min_width": null,
673
- "object_fit": null,
674
- "object_position": null,
675
- "order": null,
676
- "overflow": null,
677
- "overflow_x": null,
678
- "overflow_y": null,
679
- "padding": null,
680
- "right": null,
681
- "top": null,
682
- "visibility": null,
683
- "width": null
684
- }
685
- },
686
- "5162637d8a9d4fc0824c3cd6dd19cf83": {
687
- "model_module": "@jupyter-widgets/controls",
688
- "model_name": "DescriptionStyleModel",
689
- "model_module_version": "1.5.0",
690
- "state": {
691
- "_model_module": "@jupyter-widgets/controls",
692
- "_model_module_version": "1.5.0",
693
- "_model_name": "DescriptionStyleModel",
694
- "_view_count": null,
695
- "_view_module": "@jupyter-widgets/base",
696
- "_view_module_version": "1.2.0",
697
- "_view_name": "StyleView",
698
- "description_width": ""
699
- }
700
- }
701
- }
702
- }
703
- },
704
- "cells": [
705
- {
706
- "cell_type": "markdown",
707
- "source": [
708
- "I am planning to work on **SST-2 (Stanford Sentiment Treebank)** dataset. <br>\n",
709
- "https://nlp.stanford.edu/sentiment/index.html <br>\n",
710
- "https://paperswithcode.com/dataset/sst <br>\n",
711
- "https://paperswithcode.com/sota/sentiment-analysis-on-sst-2-binary"
712
- ],
713
- "metadata": {
714
- "id": "dZXodUszVbwl"
715
- }
716
- },
717
- {
718
- "cell_type": "markdown",
719
- "source": [
720
- "In this dataset each phrase is labelled as either negative or positive. There is a SST-5 dataset as well in which each phrase is labelled as negative, somewhat negative, neutral, somewhat positive or positive. "
721
- ],
722
- "metadata": {
723
- "id": "2XpoSGi03q3v"
724
- }
725
- },
726
- {
727
- "cell_type": "code",
728
- "source": [
729
- "!pip install datasets\n",
730
- "!pip install transformers"
731
- ],
732
- "metadata": {
733
- "colab": {
734
- "base_uri": "https://localhost:8080/"
735
- },
736
- "id": "99CDEisB8zlD",
737
- "outputId": "139321a9-de14-4002-9463-700783940f6c"
738
- },
739
- "execution_count": null,
740
- "outputs": [
741
- {
742
- "output_type": "stream",
743
- "name": "stdout",
744
- "text": [
745
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
746
- "Requirement already satisfied: datasets in /usr/local/lib/python3.7/dist-packages (2.5.2)\n",
747
- "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.7/dist-packages (from datasets) (4.64.1)\n",
748
- "Requirement already satisfied: dill<0.3.6 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.3.5.1)\n",
749
- "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from datasets) (5.0.0)\n",
750
- "Requirement already satisfied: xxhash in /usr/local/lib/python3.7/dist-packages (from datasets) (3.0.0)\n",
751
- "Requirement already satisfied: huggingface-hub<1.0.0,>=0.2.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.10.0)\n",
752
- "Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.18.0)\n",
753
- "Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from datasets) (1.3.5)\n",
754
- "Requirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from datasets) (3.8.3)\n",
755
- "Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from datasets) (21.3)\n",
756
- "Requirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (6.0.1)\n",
757
- "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (2.23.0)\n",
758
- "Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.7/dist-packages (from datasets) (2022.8.2)\n",
759
- "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from datasets) (1.21.6)\n",
760
- "Requirement already satisfied: multiprocess in /usr/local/lib/python3.7/dist-packages (from datasets) (0.70.13)\n",
761
- "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (2.1.1)\n",
762
- "Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (4.1.1)\n",
763
- "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (22.1.0)\n",
764
- "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.8.1)\n",
765
- "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (4.0.2)\n",
766
- "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.2.0)\n",
767
- "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (6.0.2)\n",
768
- "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.3.1)\n",
769
- "Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (0.13.0)\n",
770
- "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.2.0->datasets) (3.8.0)\n",
771
- "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.2.0->datasets) (6.0)\n",
772
- "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->datasets) (3.0.9)\n",
773
- "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (2.10)\n",
774
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (1.25.11)\n",
775
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (3.0.4)\n",
776
- "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (2022.9.24)\n",
777
- "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->datasets) (3.8.1)\n",
778
- "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2022.4)\n",
779
- "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2.8.2)\n",
780
- "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n",
781
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
782
- "Requirement already satisfied: transformers in /usr/local/lib/python3.7/dist-packages (4.22.2)\n",
783
- "Requirement already satisfied: tokenizers!=0.11.3,<0.13,>=0.11.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (0.12.1)\n",
784
- "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n",
785
- "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (1.21.6)\n",
786
- "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.8.0)\n",
787
- "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (21.3)\n",
788
- "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers) (5.0.0)\n",
789
- "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (6.0)\n",
790
- "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2022.6.2)\n",
791
- "Requirement already satisfied: huggingface-hub<1.0,>=0.9.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (0.10.0)\n",
792
- "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.64.1)\n",
793
- "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.9.0->transformers) (4.1.1)\n",
794
- "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers) (3.0.9)\n",
795
- "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers) (3.8.1)\n",
796
- "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n",
797
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n",
798
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.25.11)\n",
799
- "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2022.9.24)\n"
800
- ]
801
- }
802
- ]
803
- },
804
- {
805
- "cell_type": "code",
806
- "source": [
807
- "import pandas as pd\n",
808
- "from datasets import load_dataset\n",
809
- "from transformers import DistilBertTokenizerFast, TFAutoModelForSequenceClassification"
810
- ],
811
- "metadata": {
812
- "id": "9Y_5TS7i8bdN"
813
- },
814
- "execution_count": null,
815
- "outputs": []
816
- },
817
- {
818
- "cell_type": "markdown",
819
- "source": [
820
- "There are many ways to load the dataset, for example using tensorflow_datasets (https://www.tensorflow.org/datasets/api_docs/python/tfds/load), but I am planning to use datasets package"
821
- ],
822
- "metadata": {
823
- "id": "mVILRmQeU7zH"
824
- }
825
- },
826
- {
827
- "cell_type": "code",
828
- "source": [
829
- "data_sst2 = load_dataset(\"glue\", \"sst2\")"
830
- ],
831
- "metadata": {
832
- "colab": {
833
- "base_uri": "https://localhost:8080/",
834
- "height": 87,
835
- "referenced_widgets": [
836
- "fbbc510b0e1548748409b6c016bdaa24",
837
- "5b95f4951d0b44bb99d2b76f54556511",
838
- "031b30d2c7d7402f8c63dd11c83bc690",
839
- "38b1d5d5328249e2b830e9847cf407e1",
840
- "30e4917df33c4f4fbd7813ab864f6b76",
841
- "b470b1d8fb274a6fb933ecab0c18fa12",
842
- "6eba305524bb4ea08d36eff08f34fa75",
843
- "57519ea679234aa18d9cb7e44b8181a9",
844
- "ae126db234f34079a2bf79dbabd624a3",
845
- "3fce668226424a70bd0afcc725d68739",
846
- "b810c87d8aec4c96acb20f4563777ddc"
847
- ]
848
- },
849
- "id": "zA2dObmZJYNc",
850
- "outputId": "7beb9f22-344a-4319-be19-3cd905672da1"
851
- },
852
- "execution_count": null,
853
- "outputs": [
854
- {
855
- "output_type": "stream",
856
- "name": "stderr",
857
- "text": [
858
- "WARNING:datasets.builder:Found cached dataset glue (/root/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)\n"
859
- ]
860
- },
861
- {
862
- "output_type": "display_data",
863
- "data": {
864
- "text/plain": [
865
- " 0%| | 0/3 [00:00<?, ?it/s]"
866
- ],
867
- "application/vnd.jupyter.widget-view+json": {
868
- "version_major": 2,
869
- "version_minor": 0,
870
- "model_id": "fbbc510b0e1548748409b6c016bdaa24"
871
- }
872
- },
873
- "metadata": {}
874
- }
875
- ]
876
- },
877
- {
878
- "cell_type": "code",
879
- "source": [
880
- "data_sst2"
881
- ],
882
- "metadata": {
883
- "colab": {
884
- "base_uri": "https://localhost:8080/"
885
- },
886
- "id": "opKFVLJeJqlM",
887
- "outputId": "85fa6285-d54a-4f66-a265-f70e41d95117"
888
- },
889
- "execution_count": null,
890
- "outputs": [
891
- {
892
- "output_type": "execute_result",
893
- "data": {
894
- "text/plain": [
895
- "DatasetDict({\n",
896
- " train: Dataset({\n",
897
- " features: ['sentence', 'label', 'idx'],\n",
898
- " num_rows: 67349\n",
899
- " })\n",
900
- " validation: Dataset({\n",
901
- " features: ['sentence', 'label', 'idx'],\n",
902
- " num_rows: 872\n",
903
- " })\n",
904
- " test: Dataset({\n",
905
- " features: ['sentence', 'label', 'idx'],\n",
906
- " num_rows: 1821\n",
907
- " })\n",
908
- "})"
909
- ]
910
- },
911
- "metadata": {},
912
- "execution_count": 19
913
- }
914
- ]
915
- },
916
- {
917
- "cell_type": "code",
918
- "source": [
919
- "data_sst2['train'][0]"
920
- ],
921
- "metadata": {
922
- "colab": {
923
- "base_uri": "https://localhost:8080/"
924
- },
925
- "id": "wgODW_Y9JusF",
926
- "outputId": "fc9e22a0-0a10-468b-a33e-a90629669723"
927
- },
928
- "execution_count": null,
929
- "outputs": [
930
- {
931
- "output_type": "execute_result",
932
- "data": {
933
- "text/plain": [
934
- "{'sentence': 'hide new secretions from the parental units ',\n",
935
- " 'label': 0,\n",
936
- " 'idx': 0}"
937
- ]
938
- },
939
- "metadata": {},
940
- "execution_count": 20
941
- }
942
- ]
943
- },
944
- {
945
- "cell_type": "code",
946
- "source": [
947
- "data_sst2['train'].features"
948
- ],
949
- "metadata": {
950
- "colab": {
951
- "base_uri": "https://localhost:8080/"
952
- },
953
- "id": "oA0i0XHoSYlN",
954
- "outputId": "4fa68594-f67c-43ee-dbdc-35de92056176"
955
- },
956
- "execution_count": null,
957
- "outputs": [
958
- {
959
- "output_type": "execute_result",
960
- "data": {
961
- "text/plain": [
962
- "{'sentence': Value(dtype='string', id=None),\n",
963
- " 'label': ClassLabel(num_classes=2, names=['negative', 'positive'], id=None),\n",
964
- " 'idx': Value(dtype='int32', id=None)}"
965
- ]
966
- },
967
- "metadata": {},
968
- "execution_count": 21
969
- }
970
- ]
971
- },
972
- {
973
- "cell_type": "markdown",
974
- "source": [
975
- "Refrence: https://huggingface.co/docs/transformers/index, \n",
976
- "https://github.com/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb\n",
977
- "\n",
978
- "we need to preprocess our text. Tokenization and preprocessing is generally based on the model architecture you use. \n",
979
- "\n",
980
- "Let's use pretrained distilbert. We can use huggingface transformer library. We can also train our tokenizer from scratch.\n",
981
- "\n",
982
- "we can use AutoTokenizer.from_pretrained as well instead of below function"
983
- ],
984
- "metadata": {
985
- "id": "74nHWqmVMdrj"
986
- }
987
- },
988
- {
989
- "cell_type": "code",
990
- "source": [
991
- "tokenizer = DistilBertTokenizerFast.from_pretrained('distilbert-base-uncased')"
992
- ],
993
- "metadata": {
994
- "id": "nAIQlwoaLaVn"
995
- },
996
- "execution_count": null,
997
- "outputs": []
998
- },
999
- {
1000
- "cell_type": "code",
1001
- "source": [
1002
- "def preprocess(data):\n",
1003
- " return tokenizer(data['sentence'], truncation=True)"
1004
- ],
1005
- "metadata": {
1006
- "id": "8yFKkFimRe92"
1007
- },
1008
- "execution_count": null,
1009
- "outputs": []
1010
- },
1011
- {
1012
- "cell_type": "markdown",
1013
- "source": [
1014
- "we can use the map method of our dataset object to apply above function on all datapoints of all splits.\n",
1015
- "\n",
1016
- "Note that we passed batched=True to encode the texts by batches together. This is to leverage the full benefit of the fast tokenizer we loaded earlier, which will use multi-threading to treat the texts in a batch concurrently."
1017
- ],
1018
- "metadata": {
1019
- "id": "xCorwRwbS_y_"
1020
- }
1021
- },
1022
- {
1023
- "cell_type": "code",
1024
- "source": [
1025
- "dataset_enc = data_sst2.map(preprocess, batched=True)"
1026
- ],
1027
- "metadata": {
1028
- "colab": {
1029
- "base_uri": "https://localhost:8080/",
1030
- "height": 106,
1031
- "referenced_widgets": [
1032
- "2691abf9765e4cf18a142cfc10ee5d2f",
1033
- "2d8281fc5bc6411a898e4c31687462d9",
1034
- "831f795de5d54f32bbd821bcafb16675",
1035
- "fc06fd3b96124f498f041cff507fe00a",
1036
- "5bc4c971d82b47eaad865379fa9c381c",
1037
- "9469012a76194346b83c438ee64b620e",
1038
- "874e1e2f9f5341a4bed55ea0ae4b8cc1",
1039
- "038876ce0b0d456ab5c4f30f8f498dbe",
1040
- "5102475328e84e15b3d178dc599cc93a",
1041
- "a2a210635b0a479d837de6312410032c",
1042
- "5162637d8a9d4fc0824c3cd6dd19cf83"
1043
- ]
1044
- },
1045
- "id": "CniAzqtmRvV6",
1046
- "outputId": "22a98839-c74e-4697-f87a-0221b976b807"
1047
- },
1048
- "execution_count": null,
1049
- "outputs": [
1050
- {
1051
- "output_type": "display_data",
1052
- "data": {
1053
- "text/plain": [
1054
- " 0%| | 0/68 [00:00<?, ?ba/s]"
1055
- ],
1056
- "application/vnd.jupyter.widget-view+json": {
1057
- "version_major": 2,
1058
- "version_minor": 0,
1059
- "model_id": "2691abf9765e4cf18a142cfc10ee5d2f"
1060
- }
1061
- },
1062
- "metadata": {}
1063
- },
1064
- {
1065
- "output_type": "stream",
1066
- "name": "stderr",
1067
- "text": [
1068
- "WARNING:datasets.arrow_dataset:Loading cached processed dataset at /root/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad/cache-7ab0de81d13d7bdc.arrow\n",
1069
- "WARNING:datasets.arrow_dataset:Loading cached processed dataset at /root/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad/cache-b7cf8f8990ed6f2f.arrow\n"
1070
- ]
1071
- }
1072
- ]
1073
- },
1074
- {
1075
- "cell_type": "code",
1076
- "source": [
1077
- "dataset_enc[\"train\"].features"
1078
- ],
1079
- "metadata": {
1080
- "colab": {
1081
- "base_uri": "https://localhost:8080/"
1082
- },
1083
- "id": "9ARVOUICRNh2",
1084
- "outputId": "b14ae1a4-7821-4f89-f429-d19aa6e30b08"
1085
- },
1086
- "execution_count": null,
1087
- "outputs": [
1088
- {
1089
- "output_type": "execute_result",
1090
- "data": {
1091
- "text/plain": [
1092
- "{'sentence': Value(dtype='string', id=None),\n",
1093
- " 'label': ClassLabel(num_classes=2, names=['negative', 'positive'], id=None),\n",
1094
- " 'idx': Value(dtype='int32', id=None),\n",
1095
- " 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None),\n",
1096
- " 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}"
1097
- ]
1098
- },
1099
- "metadata": {},
1100
- "execution_count": 26
1101
- }
1102
- ]
1103
- },
1104
- {
1105
- "cell_type": "code",
1106
- "source": [
1107
- "dataset_enc[\"train\"][0]"
1108
- ],
1109
- "metadata": {
1110
- "colab": {
1111
- "base_uri": "https://localhost:8080/"
1112
- },
1113
- "id": "nAb1QG1QgD7j",
1114
- "outputId": "e7811016-8db1-44a9-f446-3eb49fbbc3c2"
1115
- },
1116
- "execution_count": null,
1117
- "outputs": [
1118
- {
1119
- "output_type": "execute_result",
1120
- "data": {
1121
- "text/plain": [
1122
- "{'sentence': 'hide new secretions from the parental units ',\n",
1123
- " 'label': 0,\n",
1124
- " 'idx': 0,\n",
1125
- " 'input_ids': [101, 5342, 2047, 3595, 8496, 2013, 1996, 18643, 3197, 102],\n",
1126
- " 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}"
1127
- ]
1128
- },
1129
- "metadata": {},
1130
- "execution_count": 27
1131
- }
1132
- ]
1133
- },
1134
- {
1135
- "cell_type": "code",
1136
- "source": [
1137
- "dataset_enc[\"train\"].features[\"label\"]"
1138
- ],
1139
- "metadata": {
1140
- "colab": {
1141
- "base_uri": "https://localhost:8080/"
1142
- },
1143
- "id": "bkSac7FpTWZb",
1144
- "outputId": "905d1a9f-3eec-4940-8702-f9578a6b3256"
1145
- },
1146
- "execution_count": null,
1147
- "outputs": [
1148
- {
1149
- "output_type": "execute_result",
1150
- "data": {
1151
- "text/plain": [
1152
- "ClassLabel(num_classes=2, names=['negative', 'positive'], id=None)"
1153
- ]
1154
- },
1155
- "metadata": {},
1156
- "execution_count": 28
1157
- }
1158
- ]
1159
- },
1160
- {
1161
- "cell_type": "markdown",
1162
- "source": [
1163
- "Convert datasets to tf.data.Dataset, so that Keras can understand it."
1164
- ],
1165
- "metadata": {
1166
- "id": "1gcN67-XObot"
1167
- }
1168
- },
1169
- {
1170
- "cell_type": "code",
1171
- "source": [
1172
- "model = TFAutoModelForSequenceClassification.from_pretrained(\"distilbert-base-uncased\", num_labels=2)"
1173
- ],
1174
- "metadata": {
1175
- "colab": {
1176
- "base_uri": "https://localhost:8080/"
1177
- },
1178
- "id": "3NAAESdaUBNX",
1179
- "outputId": "27be4f23-01a2-423b-a79a-5c7fb7882278"
1180
- },
1181
- "execution_count": null,
1182
- "outputs": [
1183
- {
1184
- "output_type": "stream",
1185
- "name": "stderr",
1186
- "text": [
1187
- "Some layers from the model checkpoint at distilbert-base-uncased were not used when initializing TFDistilBertForSequenceClassification: ['vocab_transform', 'vocab_projector', 'vocab_layer_norm', 'activation_13']\n",
1188
- "- This IS expected if you are initializing TFDistilBertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
1189
- "- This IS NOT expected if you are initializing TFDistilBertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
1190
- "Some layers of TFDistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['classifier', 'dropout_39', 'pre_classifier']\n",
1191
- "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
1192
- ]
1193
- }
1194
- ]
1195
- },
1196
- {
1197
- "cell_type": "code",
1198
- "source": [
1199
- "tf_train_dataset = model.prepare_tf_dataset(\n",
1200
- " dataset_enc[\"train\"],\n",
1201
- " shuffle=True,\n",
1202
- " batch_size=64,\n",
1203
- " tokenizer=tokenizer\n",
1204
- ")\n",
1205
- "\n",
1206
- "tf_validation_dataset = model.prepare_tf_dataset(\n",
1207
- " dataset_enc[\"validation\"],\n",
1208
- " shuffle=False,\n",
1209
- " batch_size=64,\n",
1210
- " tokenizer=tokenizer,\n",
1211
- ")\n",
1212
- "\n",
1213
- "tf_validation_test = model.prepare_tf_dataset(\n",
1214
- " dataset_enc[\"test\"],\n",
1215
- " shuffle=False,\n",
1216
- " batch_size=64,\n",
1217
- " tokenizer=tokenizer,\n",
1218
- ")"
1219
- ],
1220
- "metadata": {
1221
- "colab": {
1222
- "base_uri": "https://localhost:8080/"
1223
- },
1224
- "id": "9oW2wFSUOAaF",
1225
- "outputId": "6dedf3f0-5838-4968-a6a6-c6bb25a62a9d"
1226
- },
1227
- "execution_count": null,
1228
- "outputs": [
1229
- {
1230
- "output_type": "stream",
1231
- "name": "stderr",
1232
- "text": [
1233
- "You're using a DistilBertTokenizerFast tokenizer. Please note that with a fast tokenizer, using the `__call__` method is faster than using a method to encode the text followed by a call to the `pad` method to get a padded encoding.\n"
1234
- ]
1235
- }
1236
- ]
1237
- },
1238
- {
1239
- "cell_type": "code",
1240
- "source": [
1241
- "# WE can use tf_train_dataset and tf_validation_dataset in model.fit"
1242
- ],
1243
- "metadata": {
1244
- "id": "VTQQqzGgUp7R"
1245
- },
1246
- "execution_count": null,
1247
- "outputs": []
1248
- },
1249
- {
1250
- "cell_type": "code",
1251
- "source": [],
1252
- "metadata": {
1253
- "id": "AHKEdT-KU1yt"
1254
- },
1255
- "execution_count": null,
1256
- "outputs": []
1257
- }
1258
- ]
1259
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Sentiment Analysis/GUI_SST2.ipynb DELETED
@@ -1,1829 +0,0 @@
1
- {
2
- "nbformat": 4,
3
- "nbformat_minor": 0,
4
- "metadata": {
5
- "colab": {
6
- "provenance": []
7
- },
8
- "kernelspec": {
9
- "name": "python3",
10
- "display_name": "Python 3"
11
- },
12
- "language_info": {
13
- "name": "python"
14
- },
15
- "widgets": {
16
- "application/vnd.jupyter.widget-state+json": {
17
- "e313b0cc4b39472fba5f6b520ab3a6e7": {
18
- "model_module": "@jupyter-widgets/controls",
19
- "model_name": "HBoxModel",
20
- "model_module_version": "1.5.0",
21
- "state": {
22
- "_dom_classes": [],
23
- "_model_module": "@jupyter-widgets/controls",
24
- "_model_module_version": "1.5.0",
25
- "_model_name": "HBoxModel",
26
- "_view_count": null,
27
- "_view_module": "@jupyter-widgets/controls",
28
- "_view_module_version": "1.5.0",
29
- "_view_name": "HBoxView",
30
- "box_style": "",
31
- "children": [
32
- "IPY_MODEL_1ef5aac40bbf4f7bbecbac38caecb2d5",
33
- "IPY_MODEL_aa6b247226bb42e7915dc2758b2d232d",
34
- "IPY_MODEL_7ffe5bb98aa042e2904774e25369b624"
35
- ],
36
- "layout": "IPY_MODEL_f4757a5ec55f42b9a0d66bd46cbbb36e"
37
- }
38
- },
39
- "1ef5aac40bbf4f7bbecbac38caecb2d5": {
40
- "model_module": "@jupyter-widgets/controls",
41
- "model_name": "HTMLModel",
42
- "model_module_version": "1.5.0",
43
- "state": {
44
- "_dom_classes": [],
45
- "_model_module": "@jupyter-widgets/controls",
46
- "_model_module_version": "1.5.0",
47
- "_model_name": "HTMLModel",
48
- "_view_count": null,
49
- "_view_module": "@jupyter-widgets/controls",
50
- "_view_module_version": "1.5.0",
51
- "_view_name": "HTMLView",
52
- "description": "",
53
- "description_tooltip": null,
54
- "layout": "IPY_MODEL_024ecf01ba314b54a306a60e94a1bdd5",
55
- "placeholder": "​",
56
- "style": "IPY_MODEL_1baf9e333dc547ecb53f3ef26ce812b9",
57
- "value": "Downloading: 100%"
58
- }
59
- },
60
- "aa6b247226bb42e7915dc2758b2d232d": {
61
- "model_module": "@jupyter-widgets/controls",
62
- "model_name": "FloatProgressModel",
63
- "model_module_version": "1.5.0",
64
- "state": {
65
- "_dom_classes": [],
66
- "_model_module": "@jupyter-widgets/controls",
67
- "_model_module_version": "1.5.0",
68
- "_model_name": "FloatProgressModel",
69
- "_view_count": null,
70
- "_view_module": "@jupyter-widgets/controls",
71
- "_view_module_version": "1.5.0",
72
- "_view_name": "ProgressView",
73
- "bar_style": "success",
74
- "description": "",
75
- "description_tooltip": null,
76
- "layout": "IPY_MODEL_6866b01d6ba34c4b837466a30e93c07b",
77
- "max": 28,
78
- "min": 0,
79
- "orientation": "horizontal",
80
- "style": "IPY_MODEL_b18cdd1e22654e3098856208349b5f1e",
81
- "value": 28
82
- }
83
- },
84
- "7ffe5bb98aa042e2904774e25369b624": {
85
- "model_module": "@jupyter-widgets/controls",
86
- "model_name": "HTMLModel",
87
- "model_module_version": "1.5.0",
88
- "state": {
89
- "_dom_classes": [],
90
- "_model_module": "@jupyter-widgets/controls",
91
- "_model_module_version": "1.5.0",
92
- "_model_name": "HTMLModel",
93
- "_view_count": null,
94
- "_view_module": "@jupyter-widgets/controls",
95
- "_view_module_version": "1.5.0",
96
- "_view_name": "HTMLView",
97
- "description": "",
98
- "description_tooltip": null,
99
- "layout": "IPY_MODEL_45efed67099e45c4a0364e701f1e32eb",
100
- "placeholder": "​",
101
- "style": "IPY_MODEL_e7fc29787ef84344856a09120389f32d",
102
- "value": " 28.0/28.0 [00:00&lt;00:00, 638B/s]"
103
- }
104
- },
105
- "f4757a5ec55f42b9a0d66bd46cbbb36e": {
106
- "model_module": "@jupyter-widgets/base",
107
- "model_name": "LayoutModel",
108
- "model_module_version": "1.2.0",
109
- "state": {
110
- "_model_module": "@jupyter-widgets/base",
111
- "_model_module_version": "1.2.0",
112
- "_model_name": "LayoutModel",
113
- "_view_count": null,
114
- "_view_module": "@jupyter-widgets/base",
115
- "_view_module_version": "1.2.0",
116
- "_view_name": "LayoutView",
117
- "align_content": null,
118
- "align_items": null,
119
- "align_self": null,
120
- "border": null,
121
- "bottom": null,
122
- "display": null,
123
- "flex": null,
124
- "flex_flow": null,
125
- "grid_area": null,
126
- "grid_auto_columns": null,
127
- "grid_auto_flow": null,
128
- "grid_auto_rows": null,
129
- "grid_column": null,
130
- "grid_gap": null,
131
- "grid_row": null,
132
- "grid_template_areas": null,
133
- "grid_template_columns": null,
134
- "grid_template_rows": null,
135
- "height": null,
136
- "justify_content": null,
137
- "justify_items": null,
138
- "left": null,
139
- "margin": null,
140
- "max_height": null,
141
- "max_width": null,
142
- "min_height": null,
143
- "min_width": null,
144
- "object_fit": null,
145
- "object_position": null,
146
- "order": null,
147
- "overflow": null,
148
- "overflow_x": null,
149
- "overflow_y": null,
150
- "padding": null,
151
- "right": null,
152
- "top": null,
153
- "visibility": null,
154
- "width": null
155
- }
156
- },
157
- "024ecf01ba314b54a306a60e94a1bdd5": {
158
- "model_module": "@jupyter-widgets/base",
159
- "model_name": "LayoutModel",
160
- "model_module_version": "1.2.0",
161
- "state": {
162
- "_model_module": "@jupyter-widgets/base",
163
- "_model_module_version": "1.2.0",
164
- "_model_name": "LayoutModel",
165
- "_view_count": null,
166
- "_view_module": "@jupyter-widgets/base",
167
- "_view_module_version": "1.2.0",
168
- "_view_name": "LayoutView",
169
- "align_content": null,
170
- "align_items": null,
171
- "align_self": null,
172
- "border": null,
173
- "bottom": null,
174
- "display": null,
175
- "flex": null,
176
- "flex_flow": null,
177
- "grid_area": null,
178
- "grid_auto_columns": null,
179
- "grid_auto_flow": null,
180
- "grid_auto_rows": null,
181
- "grid_column": null,
182
- "grid_gap": null,
183
- "grid_row": null,
184
- "grid_template_areas": null,
185
- "grid_template_columns": null,
186
- "grid_template_rows": null,
187
- "height": null,
188
- "justify_content": null,
189
- "justify_items": null,
190
- "left": null,
191
- "margin": null,
192
- "max_height": null,
193
- "max_width": null,
194
- "min_height": null,
195
- "min_width": null,
196
- "object_fit": null,
197
- "object_position": null,
198
- "order": null,
199
- "overflow": null,
200
- "overflow_x": null,
201
- "overflow_y": null,
202
- "padding": null,
203
- "right": null,
204
- "top": null,
205
- "visibility": null,
206
- "width": null
207
- }
208
- },
209
- "1baf9e333dc547ecb53f3ef26ce812b9": {
210
- "model_module": "@jupyter-widgets/controls",
211
- "model_name": "DescriptionStyleModel",
212
- "model_module_version": "1.5.0",
213
- "state": {
214
- "_model_module": "@jupyter-widgets/controls",
215
- "_model_module_version": "1.5.0",
216
- "_model_name": "DescriptionStyleModel",
217
- "_view_count": null,
218
- "_view_module": "@jupyter-widgets/base",
219
- "_view_module_version": "1.2.0",
220
- "_view_name": "StyleView",
221
- "description_width": ""
222
- }
223
- },
224
- "6866b01d6ba34c4b837466a30e93c07b": {
225
- "model_module": "@jupyter-widgets/base",
226
- "model_name": "LayoutModel",
227
- "model_module_version": "1.2.0",
228
- "state": {
229
- "_model_module": "@jupyter-widgets/base",
230
- "_model_module_version": "1.2.0",
231
- "_model_name": "LayoutModel",
232
- "_view_count": null,
233
- "_view_module": "@jupyter-widgets/base",
234
- "_view_module_version": "1.2.0",
235
- "_view_name": "LayoutView",
236
- "align_content": null,
237
- "align_items": null,
238
- "align_self": null,
239
- "border": null,
240
- "bottom": null,
241
- "display": null,
242
- "flex": null,
243
- "flex_flow": null,
244
- "grid_area": null,
245
- "grid_auto_columns": null,
246
- "grid_auto_flow": null,
247
- "grid_auto_rows": null,
248
- "grid_column": null,
249
- "grid_gap": null,
250
- "grid_row": null,
251
- "grid_template_areas": null,
252
- "grid_template_columns": null,
253
- "grid_template_rows": null,
254
- "height": null,
255
- "justify_content": null,
256
- "justify_items": null,
257
- "left": null,
258
- "margin": null,
259
- "max_height": null,
260
- "max_width": null,
261
- "min_height": null,
262
- "min_width": null,
263
- "object_fit": null,
264
- "object_position": null,
265
- "order": null,
266
- "overflow": null,
267
- "overflow_x": null,
268
- "overflow_y": null,
269
- "padding": null,
270
- "right": null,
271
- "top": null,
272
- "visibility": null,
273
- "width": null
274
- }
275
- },
276
- "b18cdd1e22654e3098856208349b5f1e": {
277
- "model_module": "@jupyter-widgets/controls",
278
- "model_name": "ProgressStyleModel",
279
- "model_module_version": "1.5.0",
280
- "state": {
281
- "_model_module": "@jupyter-widgets/controls",
282
- "_model_module_version": "1.5.0",
283
- "_model_name": "ProgressStyleModel",
284
- "_view_count": null,
285
- "_view_module": "@jupyter-widgets/base",
286
- "_view_module_version": "1.2.0",
287
- "_view_name": "StyleView",
288
- "bar_color": null,
289
- "description_width": ""
290
- }
291
- },
292
- "45efed67099e45c4a0364e701f1e32eb": {
293
- "model_module": "@jupyter-widgets/base",
294
- "model_name": "LayoutModel",
295
- "model_module_version": "1.2.0",
296
- "state": {
297
- "_model_module": "@jupyter-widgets/base",
298
- "_model_module_version": "1.2.0",
299
- "_model_name": "LayoutModel",
300
- "_view_count": null,
301
- "_view_module": "@jupyter-widgets/base",
302
- "_view_module_version": "1.2.0",
303
- "_view_name": "LayoutView",
304
- "align_content": null,
305
- "align_items": null,
306
- "align_self": null,
307
- "border": null,
308
- "bottom": null,
309
- "display": null,
310
- "flex": null,
311
- "flex_flow": null,
312
- "grid_area": null,
313
- "grid_auto_columns": null,
314
- "grid_auto_flow": null,
315
- "grid_auto_rows": null,
316
- "grid_column": null,
317
- "grid_gap": null,
318
- "grid_row": null,
319
- "grid_template_areas": null,
320
- "grid_template_columns": null,
321
- "grid_template_rows": null,
322
- "height": null,
323
- "justify_content": null,
324
- "justify_items": null,
325
- "left": null,
326
- "margin": null,
327
- "max_height": null,
328
- "max_width": null,
329
- "min_height": null,
330
- "min_width": null,
331
- "object_fit": null,
332
- "object_position": null,
333
- "order": null,
334
- "overflow": null,
335
- "overflow_x": null,
336
- "overflow_y": null,
337
- "padding": null,
338
- "right": null,
339
- "top": null,
340
- "visibility": null,
341
- "width": null
342
- }
343
- },
344
- "e7fc29787ef84344856a09120389f32d": {
345
- "model_module": "@jupyter-widgets/controls",
346
- "model_name": "DescriptionStyleModel",
347
- "model_module_version": "1.5.0",
348
- "state": {
349
- "_model_module": "@jupyter-widgets/controls",
350
- "_model_module_version": "1.5.0",
351
- "_model_name": "DescriptionStyleModel",
352
- "_view_count": null,
353
- "_view_module": "@jupyter-widgets/base",
354
- "_view_module_version": "1.2.0",
355
- "_view_name": "StyleView",
356
- "description_width": ""
357
- }
358
- },
359
- "4edbc95f10a24b189a0e79241ff85b32": {
360
- "model_module": "@jupyter-widgets/controls",
361
- "model_name": "HBoxModel",
362
- "model_module_version": "1.5.0",
363
- "state": {
364
- "_dom_classes": [],
365
- "_model_module": "@jupyter-widgets/controls",
366
- "_model_module_version": "1.5.0",
367
- "_model_name": "HBoxModel",
368
- "_view_count": null,
369
- "_view_module": "@jupyter-widgets/controls",
370
- "_view_module_version": "1.5.0",
371
- "_view_name": "HBoxView",
372
- "box_style": "",
373
- "children": [
374
- "IPY_MODEL_6f2c58bad2dd46c6b8467f5104b610a3",
375
- "IPY_MODEL_7e6f63c2efe04a63999a03d6131ce56a",
376
- "IPY_MODEL_77ae90d7e92b48a9b36ff7db470b836a"
377
- ],
378
- "layout": "IPY_MODEL_e493f8f5498a4a939a0c66a85eaf191f"
379
- }
380
- },
381
- "6f2c58bad2dd46c6b8467f5104b610a3": {
382
- "model_module": "@jupyter-widgets/controls",
383
- "model_name": "HTMLModel",
384
- "model_module_version": "1.5.0",
385
- "state": {
386
- "_dom_classes": [],
387
- "_model_module": "@jupyter-widgets/controls",
388
- "_model_module_version": "1.5.0",
389
- "_model_name": "HTMLModel",
390
- "_view_count": null,
391
- "_view_module": "@jupyter-widgets/controls",
392
- "_view_module_version": "1.5.0",
393
- "_view_name": "HTMLView",
394
- "description": "",
395
- "description_tooltip": null,
396
- "layout": "IPY_MODEL_c5898fa156ff49cb8c33e74ef61fd25a",
397
- "placeholder": "​",
398
- "style": "IPY_MODEL_f5bf429ff4c844b7aee2a9e8288cb3f8",
399
- "value": "Downloading: 100%"
400
- }
401
- },
402
- "7e6f63c2efe04a63999a03d6131ce56a": {
403
- "model_module": "@jupyter-widgets/controls",
404
- "model_name": "FloatProgressModel",
405
- "model_module_version": "1.5.0",
406
- "state": {
407
- "_dom_classes": [],
408
- "_model_module": "@jupyter-widgets/controls",
409
- "_model_module_version": "1.5.0",
410
- "_model_name": "FloatProgressModel",
411
- "_view_count": null,
412
- "_view_module": "@jupyter-widgets/controls",
413
- "_view_module_version": "1.5.0",
414
- "_view_name": "ProgressView",
415
- "bar_style": "success",
416
- "description": "",
417
- "description_tooltip": null,
418
- "layout": "IPY_MODEL_fb591b16c0e044dbb6b2647b805dbf23",
419
- "max": 483,
420
- "min": 0,
421
- "orientation": "horizontal",
422
- "style": "IPY_MODEL_f4d427594da34c3baf5a33570d4f870b",
423
- "value": 483
424
- }
425
- },
426
- "77ae90d7e92b48a9b36ff7db470b836a": {
427
- "model_module": "@jupyter-widgets/controls",
428
- "model_name": "HTMLModel",
429
- "model_module_version": "1.5.0",
430
- "state": {
431
- "_dom_classes": [],
432
- "_model_module": "@jupyter-widgets/controls",
433
- "_model_module_version": "1.5.0",
434
- "_model_name": "HTMLModel",
435
- "_view_count": null,
436
- "_view_module": "@jupyter-widgets/controls",
437
- "_view_module_version": "1.5.0",
438
- "_view_name": "HTMLView",
439
- "description": "",
440
- "description_tooltip": null,
441
- "layout": "IPY_MODEL_a77fcb33e2fe402eb6ea3049f371ef13",
442
- "placeholder": "​",
443
- "style": "IPY_MODEL_c485b291ec58479786edd351044103ce",
444
- "value": " 483/483 [00:00&lt;00:00, 8.76kB/s]"
445
- }
446
- },
447
- "e493f8f5498a4a939a0c66a85eaf191f": {
448
- "model_module": "@jupyter-widgets/base",
449
- "model_name": "LayoutModel",
450
- "model_module_version": "1.2.0",
451
- "state": {
452
- "_model_module": "@jupyter-widgets/base",
453
- "_model_module_version": "1.2.0",
454
- "_model_name": "LayoutModel",
455
- "_view_count": null,
456
- "_view_module": "@jupyter-widgets/base",
457
- "_view_module_version": "1.2.0",
458
- "_view_name": "LayoutView",
459
- "align_content": null,
460
- "align_items": null,
461
- "align_self": null,
462
- "border": null,
463
- "bottom": null,
464
- "display": null,
465
- "flex": null,
466
- "flex_flow": null,
467
- "grid_area": null,
468
- "grid_auto_columns": null,
469
- "grid_auto_flow": null,
470
- "grid_auto_rows": null,
471
- "grid_column": null,
472
- "grid_gap": null,
473
- "grid_row": null,
474
- "grid_template_areas": null,
475
- "grid_template_columns": null,
476
- "grid_template_rows": null,
477
- "height": null,
478
- "justify_content": null,
479
- "justify_items": null,
480
- "left": null,
481
- "margin": null,
482
- "max_height": null,
483
- "max_width": null,
484
- "min_height": null,
485
- "min_width": null,
486
- "object_fit": null,
487
- "object_position": null,
488
- "order": null,
489
- "overflow": null,
490
- "overflow_x": null,
491
- "overflow_y": null,
492
- "padding": null,
493
- "right": null,
494
- "top": null,
495
- "visibility": null,
496
- "width": null
497
- }
498
- },
499
- "c5898fa156ff49cb8c33e74ef61fd25a": {
500
- "model_module": "@jupyter-widgets/base",
501
- "model_name": "LayoutModel",
502
- "model_module_version": "1.2.0",
503
- "state": {
504
- "_model_module": "@jupyter-widgets/base",
505
- "_model_module_version": "1.2.0",
506
- "_model_name": "LayoutModel",
507
- "_view_count": null,
508
- "_view_module": "@jupyter-widgets/base",
509
- "_view_module_version": "1.2.0",
510
- "_view_name": "LayoutView",
511
- "align_content": null,
512
- "align_items": null,
513
- "align_self": null,
514
- "border": null,
515
- "bottom": null,
516
- "display": null,
517
- "flex": null,
518
- "flex_flow": null,
519
- "grid_area": null,
520
- "grid_auto_columns": null,
521
- "grid_auto_flow": null,
522
- "grid_auto_rows": null,
523
- "grid_column": null,
524
- "grid_gap": null,
525
- "grid_row": null,
526
- "grid_template_areas": null,
527
- "grid_template_columns": null,
528
- "grid_template_rows": null,
529
- "height": null,
530
- "justify_content": null,
531
- "justify_items": null,
532
- "left": null,
533
- "margin": null,
534
- "max_height": null,
535
- "max_width": null,
536
- "min_height": null,
537
- "min_width": null,
538
- "object_fit": null,
539
- "object_position": null,
540
- "order": null,
541
- "overflow": null,
542
- "overflow_x": null,
543
- "overflow_y": null,
544
- "padding": null,
545
- "right": null,
546
- "top": null,
547
- "visibility": null,
548
- "width": null
549
- }
550
- },
551
- "f5bf429ff4c844b7aee2a9e8288cb3f8": {
552
- "model_module": "@jupyter-widgets/controls",
553
- "model_name": "DescriptionStyleModel",
554
- "model_module_version": "1.5.0",
555
- "state": {
556
- "_model_module": "@jupyter-widgets/controls",
557
- "_model_module_version": "1.5.0",
558
- "_model_name": "DescriptionStyleModel",
559
- "_view_count": null,
560
- "_view_module": "@jupyter-widgets/base",
561
- "_view_module_version": "1.2.0",
562
- "_view_name": "StyleView",
563
- "description_width": ""
564
- }
565
- },
566
- "fb591b16c0e044dbb6b2647b805dbf23": {
567
- "model_module": "@jupyter-widgets/base",
568
- "model_name": "LayoutModel",
569
- "model_module_version": "1.2.0",
570
- "state": {
571
- "_model_module": "@jupyter-widgets/base",
572
- "_model_module_version": "1.2.0",
573
- "_model_name": "LayoutModel",
574
- "_view_count": null,
575
- "_view_module": "@jupyter-widgets/base",
576
- "_view_module_version": "1.2.0",
577
- "_view_name": "LayoutView",
578
- "align_content": null,
579
- "align_items": null,
580
- "align_self": null,
581
- "border": null,
582
- "bottom": null,
583
- "display": null,
584
- "flex": null,
585
- "flex_flow": null,
586
- "grid_area": null,
587
- "grid_auto_columns": null,
588
- "grid_auto_flow": null,
589
- "grid_auto_rows": null,
590
- "grid_column": null,
591
- "grid_gap": null,
592
- "grid_row": null,
593
- "grid_template_areas": null,
594
- "grid_template_columns": null,
595
- "grid_template_rows": null,
596
- "height": null,
597
- "justify_content": null,
598
- "justify_items": null,
599
- "left": null,
600
- "margin": null,
601
- "max_height": null,
602
- "max_width": null,
603
- "min_height": null,
604
- "min_width": null,
605
- "object_fit": null,
606
- "object_position": null,
607
- "order": null,
608
- "overflow": null,
609
- "overflow_x": null,
610
- "overflow_y": null,
611
- "padding": null,
612
- "right": null,
613
- "top": null,
614
- "visibility": null,
615
- "width": null
616
- }
617
- },
618
- "f4d427594da34c3baf5a33570d4f870b": {
619
- "model_module": "@jupyter-widgets/controls",
620
- "model_name": "ProgressStyleModel",
621
- "model_module_version": "1.5.0",
622
- "state": {
623
- "_model_module": "@jupyter-widgets/controls",
624
- "_model_module_version": "1.5.0",
625
- "_model_name": "ProgressStyleModel",
626
- "_view_count": null,
627
- "_view_module": "@jupyter-widgets/base",
628
- "_view_module_version": "1.2.0",
629
- "_view_name": "StyleView",
630
- "bar_color": null,
631
- "description_width": ""
632
- }
633
- },
634
- "a77fcb33e2fe402eb6ea3049f371ef13": {
635
- "model_module": "@jupyter-widgets/base",
636
- "model_name": "LayoutModel",
637
- "model_module_version": "1.2.0",
638
- "state": {
639
- "_model_module": "@jupyter-widgets/base",
640
- "_model_module_version": "1.2.0",
641
- "_model_name": "LayoutModel",
642
- "_view_count": null,
643
- "_view_module": "@jupyter-widgets/base",
644
- "_view_module_version": "1.2.0",
645
- "_view_name": "LayoutView",
646
- "align_content": null,
647
- "align_items": null,
648
- "align_self": null,
649
- "border": null,
650
- "bottom": null,
651
- "display": null,
652
- "flex": null,
653
- "flex_flow": null,
654
- "grid_area": null,
655
- "grid_auto_columns": null,
656
- "grid_auto_flow": null,
657
- "grid_auto_rows": null,
658
- "grid_column": null,
659
- "grid_gap": null,
660
- "grid_row": null,
661
- "grid_template_areas": null,
662
- "grid_template_columns": null,
663
- "grid_template_rows": null,
664
- "height": null,
665
- "justify_content": null,
666
- "justify_items": null,
667
- "left": null,
668
- "margin": null,
669
- "max_height": null,
670
- "max_width": null,
671
- "min_height": null,
672
- "min_width": null,
673
- "object_fit": null,
674
- "object_position": null,
675
- "order": null,
676
- "overflow": null,
677
- "overflow_x": null,
678
- "overflow_y": null,
679
- "padding": null,
680
- "right": null,
681
- "top": null,
682
- "visibility": null,
683
- "width": null
684
- }
685
- },
686
- "c485b291ec58479786edd351044103ce": {
687
- "model_module": "@jupyter-widgets/controls",
688
- "model_name": "DescriptionStyleModel",
689
- "model_module_version": "1.5.0",
690
- "state": {
691
- "_model_module": "@jupyter-widgets/controls",
692
- "_model_module_version": "1.5.0",
693
- "_model_name": "DescriptionStyleModel",
694
- "_view_count": null,
695
- "_view_module": "@jupyter-widgets/base",
696
- "_view_module_version": "1.2.0",
697
- "_view_name": "StyleView",
698
- "description_width": ""
699
- }
700
- },
701
- "1b7f96a9d350409d8f4e0118247748e9": {
702
- "model_module": "@jupyter-widgets/controls",
703
- "model_name": "HBoxModel",
704
- "model_module_version": "1.5.0",
705
- "state": {
706
- "_dom_classes": [],
707
- "_model_module": "@jupyter-widgets/controls",
708
- "_model_module_version": "1.5.0",
709
- "_model_name": "HBoxModel",
710
- "_view_count": null,
711
- "_view_module": "@jupyter-widgets/controls",
712
- "_view_module_version": "1.5.0",
713
- "_view_name": "HBoxView",
714
- "box_style": "",
715
- "children": [
716
- "IPY_MODEL_caa73b1c8e73487ab469deb806e70d40",
717
- "IPY_MODEL_d8da27dfaab146a8ab0d3646c216b9be",
718
- "IPY_MODEL_7ea09bd1fca44671a919699e9d1291ab"
719
- ],
720
- "layout": "IPY_MODEL_1352a435d41f4a9d8127fb68baff101e"
721
- }
722
- },
723
- "caa73b1c8e73487ab469deb806e70d40": {
724
- "model_module": "@jupyter-widgets/controls",
725
- "model_name": "HTMLModel",
726
- "model_module_version": "1.5.0",
727
- "state": {
728
- "_dom_classes": [],
729
- "_model_module": "@jupyter-widgets/controls",
730
- "_model_module_version": "1.5.0",
731
- "_model_name": "HTMLModel",
732
- "_view_count": null,
733
- "_view_module": "@jupyter-widgets/controls",
734
- "_view_module_version": "1.5.0",
735
- "_view_name": "HTMLView",
736
- "description": "",
737
- "description_tooltip": null,
738
- "layout": "IPY_MODEL_d62883a081614ddabfc08ae629d27d45",
739
- "placeholder": "​",
740
- "style": "IPY_MODEL_7b3b3cffe30e47689ce071bf79150dbf",
741
- "value": "Downloading: 100%"
742
- }
743
- },
744
- "d8da27dfaab146a8ab0d3646c216b9be": {
745
- "model_module": "@jupyter-widgets/controls",
746
- "model_name": "FloatProgressModel",
747
- "model_module_version": "1.5.0",
748
- "state": {
749
- "_dom_classes": [],
750
- "_model_module": "@jupyter-widgets/controls",
751
- "_model_module_version": "1.5.0",
752
- "_model_name": "FloatProgressModel",
753
- "_view_count": null,
754
- "_view_module": "@jupyter-widgets/controls",
755
- "_view_module_version": "1.5.0",
756
- "_view_name": "ProgressView",
757
- "bar_style": "success",
758
- "description": "",
759
- "description_tooltip": null,
760
- "layout": "IPY_MODEL_447edb84e4b245de90a3ed929f507eb4",
761
- "max": 231508,
762
- "min": 0,
763
- "orientation": "horizontal",
764
- "style": "IPY_MODEL_97fb44af3c3e48c3a3d829573c56055a",
765
- "value": 231508
766
- }
767
- },
768
- "7ea09bd1fca44671a919699e9d1291ab": {
769
- "model_module": "@jupyter-widgets/controls",
770
- "model_name": "HTMLModel",
771
- "model_module_version": "1.5.0",
772
- "state": {
773
- "_dom_classes": [],
774
- "_model_module": "@jupyter-widgets/controls",
775
- "_model_module_version": "1.5.0",
776
- "_model_name": "HTMLModel",
777
- "_view_count": null,
778
- "_view_module": "@jupyter-widgets/controls",
779
- "_view_module_version": "1.5.0",
780
- "_view_name": "HTMLView",
781
- "description": "",
782
- "description_tooltip": null,
783
- "layout": "IPY_MODEL_a4a2776a7a73457abc39a4ed4550da3e",
784
- "placeholder": "​",
785
- "style": "IPY_MODEL_bbbf1bcdd5c74eba80d6457692606476",
786
- "value": " 232k/232k [00:00&lt;00:00, 1.69MB/s]"
787
- }
788
- },
789
- "1352a435d41f4a9d8127fb68baff101e": {
790
- "model_module": "@jupyter-widgets/base",
791
- "model_name": "LayoutModel",
792
- "model_module_version": "1.2.0",
793
- "state": {
794
- "_model_module": "@jupyter-widgets/base",
795
- "_model_module_version": "1.2.0",
796
- "_model_name": "LayoutModel",
797
- "_view_count": null,
798
- "_view_module": "@jupyter-widgets/base",
799
- "_view_module_version": "1.2.0",
800
- "_view_name": "LayoutView",
801
- "align_content": null,
802
- "align_items": null,
803
- "align_self": null,
804
- "border": null,
805
- "bottom": null,
806
- "display": null,
807
- "flex": null,
808
- "flex_flow": null,
809
- "grid_area": null,
810
- "grid_auto_columns": null,
811
- "grid_auto_flow": null,
812
- "grid_auto_rows": null,
813
- "grid_column": null,
814
- "grid_gap": null,
815
- "grid_row": null,
816
- "grid_template_areas": null,
817
- "grid_template_columns": null,
818
- "grid_template_rows": null,
819
- "height": null,
820
- "justify_content": null,
821
- "justify_items": null,
822
- "left": null,
823
- "margin": null,
824
- "max_height": null,
825
- "max_width": null,
826
- "min_height": null,
827
- "min_width": null,
828
- "object_fit": null,
829
- "object_position": null,
830
- "order": null,
831
- "overflow": null,
832
- "overflow_x": null,
833
- "overflow_y": null,
834
- "padding": null,
835
- "right": null,
836
- "top": null,
837
- "visibility": null,
838
- "width": null
839
- }
840
- },
841
- "d62883a081614ddabfc08ae629d27d45": {
842
- "model_module": "@jupyter-widgets/base",
843
- "model_name": "LayoutModel",
844
- "model_module_version": "1.2.0",
845
- "state": {
846
- "_model_module": "@jupyter-widgets/base",
847
- "_model_module_version": "1.2.0",
848
- "_model_name": "LayoutModel",
849
- "_view_count": null,
850
- "_view_module": "@jupyter-widgets/base",
851
- "_view_module_version": "1.2.0",
852
- "_view_name": "LayoutView",
853
- "align_content": null,
854
- "align_items": null,
855
- "align_self": null,
856
- "border": null,
857
- "bottom": null,
858
- "display": null,
859
- "flex": null,
860
- "flex_flow": null,
861
- "grid_area": null,
862
- "grid_auto_columns": null,
863
- "grid_auto_flow": null,
864
- "grid_auto_rows": null,
865
- "grid_column": null,
866
- "grid_gap": null,
867
- "grid_row": null,
868
- "grid_template_areas": null,
869
- "grid_template_columns": null,
870
- "grid_template_rows": null,
871
- "height": null,
872
- "justify_content": null,
873
- "justify_items": null,
874
- "left": null,
875
- "margin": null,
876
- "max_height": null,
877
- "max_width": null,
878
- "min_height": null,
879
- "min_width": null,
880
- "object_fit": null,
881
- "object_position": null,
882
- "order": null,
883
- "overflow": null,
884
- "overflow_x": null,
885
- "overflow_y": null,
886
- "padding": null,
887
- "right": null,
888
- "top": null,
889
- "visibility": null,
890
- "width": null
891
- }
892
- },
893
- "7b3b3cffe30e47689ce071bf79150dbf": {
894
- "model_module": "@jupyter-widgets/controls",
895
- "model_name": "DescriptionStyleModel",
896
- "model_module_version": "1.5.0",
897
- "state": {
898
- "_model_module": "@jupyter-widgets/controls",
899
- "_model_module_version": "1.5.0",
900
- "_model_name": "DescriptionStyleModel",
901
- "_view_count": null,
902
- "_view_module": "@jupyter-widgets/base",
903
- "_view_module_version": "1.2.0",
904
- "_view_name": "StyleView",
905
- "description_width": ""
906
- }
907
- },
908
- "447edb84e4b245de90a3ed929f507eb4": {
909
- "model_module": "@jupyter-widgets/base",
910
- "model_name": "LayoutModel",
911
- "model_module_version": "1.2.0",
912
- "state": {
913
- "_model_module": "@jupyter-widgets/base",
914
- "_model_module_version": "1.2.0",
915
- "_model_name": "LayoutModel",
916
- "_view_count": null,
917
- "_view_module": "@jupyter-widgets/base",
918
- "_view_module_version": "1.2.0",
919
- "_view_name": "LayoutView",
920
- "align_content": null,
921
- "align_items": null,
922
- "align_self": null,
923
- "border": null,
924
- "bottom": null,
925
- "display": null,
926
- "flex": null,
927
- "flex_flow": null,
928
- "grid_area": null,
929
- "grid_auto_columns": null,
930
- "grid_auto_flow": null,
931
- "grid_auto_rows": null,
932
- "grid_column": null,
933
- "grid_gap": null,
934
- "grid_row": null,
935
- "grid_template_areas": null,
936
- "grid_template_columns": null,
937
- "grid_template_rows": null,
938
- "height": null,
939
- "justify_content": null,
940
- "justify_items": null,
941
- "left": null,
942
- "margin": null,
943
- "max_height": null,
944
- "max_width": null,
945
- "min_height": null,
946
- "min_width": null,
947
- "object_fit": null,
948
- "object_position": null,
949
- "order": null,
950
- "overflow": null,
951
- "overflow_x": null,
952
- "overflow_y": null,
953
- "padding": null,
954
- "right": null,
955
- "top": null,
956
- "visibility": null,
957
- "width": null
958
- }
959
- },
960
- "97fb44af3c3e48c3a3d829573c56055a": {
961
- "model_module": "@jupyter-widgets/controls",
962
- "model_name": "ProgressStyleModel",
963
- "model_module_version": "1.5.0",
964
- "state": {
965
- "_model_module": "@jupyter-widgets/controls",
966
- "_model_module_version": "1.5.0",
967
- "_model_name": "ProgressStyleModel",
968
- "_view_count": null,
969
- "_view_module": "@jupyter-widgets/base",
970
- "_view_module_version": "1.2.0",
971
- "_view_name": "StyleView",
972
- "bar_color": null,
973
- "description_width": ""
974
- }
975
- },
976
- "a4a2776a7a73457abc39a4ed4550da3e": {
977
- "model_module": "@jupyter-widgets/base",
978
- "model_name": "LayoutModel",
979
- "model_module_version": "1.2.0",
980
- "state": {
981
- "_model_module": "@jupyter-widgets/base",
982
- "_model_module_version": "1.2.0",
983
- "_model_name": "LayoutModel",
984
- "_view_count": null,
985
- "_view_module": "@jupyter-widgets/base",
986
- "_view_module_version": "1.2.0",
987
- "_view_name": "LayoutView",
988
- "align_content": null,
989
- "align_items": null,
990
- "align_self": null,
991
- "border": null,
992
- "bottom": null,
993
- "display": null,
994
- "flex": null,
995
- "flex_flow": null,
996
- "grid_area": null,
997
- "grid_auto_columns": null,
998
- "grid_auto_flow": null,
999
- "grid_auto_rows": null,
1000
- "grid_column": null,
1001
- "grid_gap": null,
1002
- "grid_row": null,
1003
- "grid_template_areas": null,
1004
- "grid_template_columns": null,
1005
- "grid_template_rows": null,
1006
- "height": null,
1007
- "justify_content": null,
1008
- "justify_items": null,
1009
- "left": null,
1010
- "margin": null,
1011
- "max_height": null,
1012
- "max_width": null,
1013
- "min_height": null,
1014
- "min_width": null,
1015
- "object_fit": null,
1016
- "object_position": null,
1017
- "order": null,
1018
- "overflow": null,
1019
- "overflow_x": null,
1020
- "overflow_y": null,
1021
- "padding": null,
1022
- "right": null,
1023
- "top": null,
1024
- "visibility": null,
1025
- "width": null
1026
- }
1027
- },
1028
- "bbbf1bcdd5c74eba80d6457692606476": {
1029
- "model_module": "@jupyter-widgets/controls",
1030
- "model_name": "DescriptionStyleModel",
1031
- "model_module_version": "1.5.0",
1032
- "state": {
1033
- "_model_module": "@jupyter-widgets/controls",
1034
- "_model_module_version": "1.5.0",
1035
- "_model_name": "DescriptionStyleModel",
1036
- "_view_count": null,
1037
- "_view_module": "@jupyter-widgets/base",
1038
- "_view_module_version": "1.2.0",
1039
- "_view_name": "StyleView",
1040
- "description_width": ""
1041
- }
1042
- },
1043
- "cfa5759e27a64c6c8337939e7834e17b": {
1044
- "model_module": "@jupyter-widgets/controls",
1045
- "model_name": "HBoxModel",
1046
- "model_module_version": "1.5.0",
1047
- "state": {
1048
- "_dom_classes": [],
1049
- "_model_module": "@jupyter-widgets/controls",
1050
- "_model_module_version": "1.5.0",
1051
- "_model_name": "HBoxModel",
1052
- "_view_count": null,
1053
- "_view_module": "@jupyter-widgets/controls",
1054
- "_view_module_version": "1.5.0",
1055
- "_view_name": "HBoxView",
1056
- "box_style": "",
1057
- "children": [
1058
- "IPY_MODEL_3dffb0ec291a4dfdb1d11b5cef1f5ed6",
1059
- "IPY_MODEL_20169058ddfb4231821b16e43e9e032c",
1060
- "IPY_MODEL_0fbfa41014a249588abbf0f4f99c8023"
1061
- ],
1062
- "layout": "IPY_MODEL_2f521b4021874155ad19595d7d3c6b30"
1063
- }
1064
- },
1065
- "3dffb0ec291a4dfdb1d11b5cef1f5ed6": {
1066
- "model_module": "@jupyter-widgets/controls",
1067
- "model_name": "HTMLModel",
1068
- "model_module_version": "1.5.0",
1069
- "state": {
1070
- "_dom_classes": [],
1071
- "_model_module": "@jupyter-widgets/controls",
1072
- "_model_module_version": "1.5.0",
1073
- "_model_name": "HTMLModel",
1074
- "_view_count": null,
1075
- "_view_module": "@jupyter-widgets/controls",
1076
- "_view_module_version": "1.5.0",
1077
- "_view_name": "HTMLView",
1078
- "description": "",
1079
- "description_tooltip": null,
1080
- "layout": "IPY_MODEL_a40fdc3db912487296e2081a053855b6",
1081
- "placeholder": "​",
1082
- "style": "IPY_MODEL_a4aeabc9652447459960f440b737e924",
1083
- "value": "Downloading: 100%"
1084
- }
1085
- },
1086
- "20169058ddfb4231821b16e43e9e032c": {
1087
- "model_module": "@jupyter-widgets/controls",
1088
- "model_name": "FloatProgressModel",
1089
- "model_module_version": "1.5.0",
1090
- "state": {
1091
- "_dom_classes": [],
1092
- "_model_module": "@jupyter-widgets/controls",
1093
- "_model_module_version": "1.5.0",
1094
- "_model_name": "FloatProgressModel",
1095
- "_view_count": null,
1096
- "_view_module": "@jupyter-widgets/controls",
1097
- "_view_module_version": "1.5.0",
1098
- "_view_name": "ProgressView",
1099
- "bar_style": "success",
1100
- "description": "",
1101
- "description_tooltip": null,
1102
- "layout": "IPY_MODEL_5f23d3b89ed94132b03aec776715cb16",
1103
- "max": 466062,
1104
- "min": 0,
1105
- "orientation": "horizontal",
1106
- "style": "IPY_MODEL_6bff741fe7d54ea098eeadddc17ffa77",
1107
- "value": 466062
1108
- }
1109
- },
1110
- "0fbfa41014a249588abbf0f4f99c8023": {
1111
- "model_module": "@jupyter-widgets/controls",
1112
- "model_name": "HTMLModel",
1113
- "model_module_version": "1.5.0",
1114
- "state": {
1115
- "_dom_classes": [],
1116
- "_model_module": "@jupyter-widgets/controls",
1117
- "_model_module_version": "1.5.0",
1118
- "_model_name": "HTMLModel",
1119
- "_view_count": null,
1120
- "_view_module": "@jupyter-widgets/controls",
1121
- "_view_module_version": "1.5.0",
1122
- "_view_name": "HTMLView",
1123
- "description": "",
1124
- "description_tooltip": null,
1125
- "layout": "IPY_MODEL_522e520184c0402d8fc2ce2d1355f7f3",
1126
- "placeholder": "​",
1127
- "style": "IPY_MODEL_10926435277a4040bdbea6fe457968dc",
1128
- "value": " 466k/466k [00:00&lt;00:00, 1.77MB/s]"
1129
- }
1130
- },
1131
- "2f521b4021874155ad19595d7d3c6b30": {
1132
- "model_module": "@jupyter-widgets/base",
1133
- "model_name": "LayoutModel",
1134
- "model_module_version": "1.2.0",
1135
- "state": {
1136
- "_model_module": "@jupyter-widgets/base",
1137
- "_model_module_version": "1.2.0",
1138
- "_model_name": "LayoutModel",
1139
- "_view_count": null,
1140
- "_view_module": "@jupyter-widgets/base",
1141
- "_view_module_version": "1.2.0",
1142
- "_view_name": "LayoutView",
1143
- "align_content": null,
1144
- "align_items": null,
1145
- "align_self": null,
1146
- "border": null,
1147
- "bottom": null,
1148
- "display": null,
1149
- "flex": null,
1150
- "flex_flow": null,
1151
- "grid_area": null,
1152
- "grid_auto_columns": null,
1153
- "grid_auto_flow": null,
1154
- "grid_auto_rows": null,
1155
- "grid_column": null,
1156
- "grid_gap": null,
1157
- "grid_row": null,
1158
- "grid_template_areas": null,
1159
- "grid_template_columns": null,
1160
- "grid_template_rows": null,
1161
- "height": null,
1162
- "justify_content": null,
1163
- "justify_items": null,
1164
- "left": null,
1165
- "margin": null,
1166
- "max_height": null,
1167
- "max_width": null,
1168
- "min_height": null,
1169
- "min_width": null,
1170
- "object_fit": null,
1171
- "object_position": null,
1172
- "order": null,
1173
- "overflow": null,
1174
- "overflow_x": null,
1175
- "overflow_y": null,
1176
- "padding": null,
1177
- "right": null,
1178
- "top": null,
1179
- "visibility": null,
1180
- "width": null
1181
- }
1182
- },
1183
- "a40fdc3db912487296e2081a053855b6": {
1184
- "model_module": "@jupyter-widgets/base",
1185
- "model_name": "LayoutModel",
1186
- "model_module_version": "1.2.0",
1187
- "state": {
1188
- "_model_module": "@jupyter-widgets/base",
1189
- "_model_module_version": "1.2.0",
1190
- "_model_name": "LayoutModel",
1191
- "_view_count": null,
1192
- "_view_module": "@jupyter-widgets/base",
1193
- "_view_module_version": "1.2.0",
1194
- "_view_name": "LayoutView",
1195
- "align_content": null,
1196
- "align_items": null,
1197
- "align_self": null,
1198
- "border": null,
1199
- "bottom": null,
1200
- "display": null,
1201
- "flex": null,
1202
- "flex_flow": null,
1203
- "grid_area": null,
1204
- "grid_auto_columns": null,
1205
- "grid_auto_flow": null,
1206
- "grid_auto_rows": null,
1207
- "grid_column": null,
1208
- "grid_gap": null,
1209
- "grid_row": null,
1210
- "grid_template_areas": null,
1211
- "grid_template_columns": null,
1212
- "grid_template_rows": null,
1213
- "height": null,
1214
- "justify_content": null,
1215
- "justify_items": null,
1216
- "left": null,
1217
- "margin": null,
1218
- "max_height": null,
1219
- "max_width": null,
1220
- "min_height": null,
1221
- "min_width": null,
1222
- "object_fit": null,
1223
- "object_position": null,
1224
- "order": null,
1225
- "overflow": null,
1226
- "overflow_x": null,
1227
- "overflow_y": null,
1228
- "padding": null,
1229
- "right": null,
1230
- "top": null,
1231
- "visibility": null,
1232
- "width": null
1233
- }
1234
- },
1235
- "a4aeabc9652447459960f440b737e924": {
1236
- "model_module": "@jupyter-widgets/controls",
1237
- "model_name": "DescriptionStyleModel",
1238
- "model_module_version": "1.5.0",
1239
- "state": {
1240
- "_model_module": "@jupyter-widgets/controls",
1241
- "_model_module_version": "1.5.0",
1242
- "_model_name": "DescriptionStyleModel",
1243
- "_view_count": null,
1244
- "_view_module": "@jupyter-widgets/base",
1245
- "_view_module_version": "1.2.0",
1246
- "_view_name": "StyleView",
1247
- "description_width": ""
1248
- }
1249
- },
1250
- "5f23d3b89ed94132b03aec776715cb16": {
1251
- "model_module": "@jupyter-widgets/base",
1252
- "model_name": "LayoutModel",
1253
- "model_module_version": "1.2.0",
1254
- "state": {
1255
- "_model_module": "@jupyter-widgets/base",
1256
- "_model_module_version": "1.2.0",
1257
- "_model_name": "LayoutModel",
1258
- "_view_count": null,
1259
- "_view_module": "@jupyter-widgets/base",
1260
- "_view_module_version": "1.2.0",
1261
- "_view_name": "LayoutView",
1262
- "align_content": null,
1263
- "align_items": null,
1264
- "align_self": null,
1265
- "border": null,
1266
- "bottom": null,
1267
- "display": null,
1268
- "flex": null,
1269
- "flex_flow": null,
1270
- "grid_area": null,
1271
- "grid_auto_columns": null,
1272
- "grid_auto_flow": null,
1273
- "grid_auto_rows": null,
1274
- "grid_column": null,
1275
- "grid_gap": null,
1276
- "grid_row": null,
1277
- "grid_template_areas": null,
1278
- "grid_template_columns": null,
1279
- "grid_template_rows": null,
1280
- "height": null,
1281
- "justify_content": null,
1282
- "justify_items": null,
1283
- "left": null,
1284
- "margin": null,
1285
- "max_height": null,
1286
- "max_width": null,
1287
- "min_height": null,
1288
- "min_width": null,
1289
- "object_fit": null,
1290
- "object_position": null,
1291
- "order": null,
1292
- "overflow": null,
1293
- "overflow_x": null,
1294
- "overflow_y": null,
1295
- "padding": null,
1296
- "right": null,
1297
- "top": null,
1298
- "visibility": null,
1299
- "width": null
1300
- }
1301
- },
1302
- "6bff741fe7d54ea098eeadddc17ffa77": {
1303
- "model_module": "@jupyter-widgets/controls",
1304
- "model_name": "ProgressStyleModel",
1305
- "model_module_version": "1.5.0",
1306
- "state": {
1307
- "_model_module": "@jupyter-widgets/controls",
1308
- "_model_module_version": "1.5.0",
1309
- "_model_name": "ProgressStyleModel",
1310
- "_view_count": null,
1311
- "_view_module": "@jupyter-widgets/base",
1312
- "_view_module_version": "1.2.0",
1313
- "_view_name": "StyleView",
1314
- "bar_color": null,
1315
- "description_width": ""
1316
- }
1317
- },
1318
- "522e520184c0402d8fc2ce2d1355f7f3": {
1319
- "model_module": "@jupyter-widgets/base",
1320
- "model_name": "LayoutModel",
1321
- "model_module_version": "1.2.0",
1322
- "state": {
1323
- "_model_module": "@jupyter-widgets/base",
1324
- "_model_module_version": "1.2.0",
1325
- "_model_name": "LayoutModel",
1326
- "_view_count": null,
1327
- "_view_module": "@jupyter-widgets/base",
1328
- "_view_module_version": "1.2.0",
1329
- "_view_name": "LayoutView",
1330
- "align_content": null,
1331
- "align_items": null,
1332
- "align_self": null,
1333
- "border": null,
1334
- "bottom": null,
1335
- "display": null,
1336
- "flex": null,
1337
- "flex_flow": null,
1338
- "grid_area": null,
1339
- "grid_auto_columns": null,
1340
- "grid_auto_flow": null,
1341
- "grid_auto_rows": null,
1342
- "grid_column": null,
1343
- "grid_gap": null,
1344
- "grid_row": null,
1345
- "grid_template_areas": null,
1346
- "grid_template_columns": null,
1347
- "grid_template_rows": null,
1348
- "height": null,
1349
- "justify_content": null,
1350
- "justify_items": null,
1351
- "left": null,
1352
- "margin": null,
1353
- "max_height": null,
1354
- "max_width": null,
1355
- "min_height": null,
1356
- "min_width": null,
1357
- "object_fit": null,
1358
- "object_position": null,
1359
- "order": null,
1360
- "overflow": null,
1361
- "overflow_x": null,
1362
- "overflow_y": null,
1363
- "padding": null,
1364
- "right": null,
1365
- "top": null,
1366
- "visibility": null,
1367
- "width": null
1368
- }
1369
- },
1370
- "10926435277a4040bdbea6fe457968dc": {
1371
- "model_module": "@jupyter-widgets/controls",
1372
- "model_name": "DescriptionStyleModel",
1373
- "model_module_version": "1.5.0",
1374
- "state": {
1375
- "_model_module": "@jupyter-widgets/controls",
1376
- "_model_module_version": "1.5.0",
1377
- "_model_name": "DescriptionStyleModel",
1378
- "_view_count": null,
1379
- "_view_module": "@jupyter-widgets/base",
1380
- "_view_module_version": "1.2.0",
1381
- "_view_name": "StyleView",
1382
- "description_width": ""
1383
- }
1384
- }
1385
- }
1386
- }
1387
- },
1388
- "cells": [
1389
- {
1390
- "cell_type": "code",
1391
- "execution_count": null,
1392
- "metadata": {
1393
- "colab": {
1394
- "base_uri": "https://localhost:8080/"
1395
- },
1396
- "id": "Ov0RXE2Zs2at",
1397
- "outputId": "51eaf6d5-b1db-4f20-a9c9-07adb560da46"
1398
- },
1399
- "outputs": [
1400
- {
1401
- "output_type": "stream",
1402
- "name": "stdout",
1403
- "text": [
1404
- "Mounted at /content/drive\n"
1405
- ]
1406
- }
1407
- ],
1408
- "source": [
1409
- "from google.colab import drive\n",
1410
- "drive.mount('/content/drive')"
1411
- ]
1412
- },
1413
- {
1414
- "cell_type": "code",
1415
- "source": [
1416
- "!pip install gradio\n",
1417
- "!pip install transformers"
1418
- ],
1419
- "metadata": {
1420
- "colab": {
1421
- "base_uri": "https://localhost:8080/"
1422
- },
1423
- "id": "pQAe4Y4Rs_20",
1424
- "outputId": "b5ff1523-a3e8-4ab7-b6cc-f60501270564"
1425
- },
1426
- "execution_count": null,
1427
- "outputs": [
1428
- {
1429
- "output_type": "stream",
1430
- "name": "stdout",
1431
- "text": [
1432
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
1433
- "Collecting gradio\n",
1434
- " Downloading gradio-3.9-py3-none-any.whl (11.6 MB)\n",
1435
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 11.6 MB 4.6 MB/s \n",
1436
- "\u001b[?25hCollecting h11<0.13,>=0.11\n",
1437
- " Downloading h11-0.12.0-py3-none-any.whl (54 kB)\n",
1438
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 54 kB 1.8 MB/s \n",
1439
- "\u001b[?25hCollecting httpx\n",
1440
- " Downloading httpx-0.23.0-py3-none-any.whl (84 kB)\n",
1441
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 2.0 MB/s \n",
1442
- "\u001b[?25hCollecting paramiko\n",
1443
- " Downloading paramiko-2.12.0-py2.py3-none-any.whl (213 kB)\n",
1444
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 213 kB 40.9 MB/s \n",
1445
- "\u001b[?25hRequirement already satisfied: pydantic in /usr/local/lib/python3.7/dist-packages (from gradio) (1.10.2)\n",
1446
- "Collecting ffmpy\n",
1447
- " Downloading ffmpy-0.3.0.tar.gz (4.8 kB)\n",
1448
- "Collecting uvicorn\n",
1449
- " Downloading uvicorn-0.19.0-py3-none-any.whl (56 kB)\n",
1450
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 56 kB 1.2 MB/s \n",
1451
- "\u001b[?25hCollecting pycryptodome\n",
1452
- " Downloading pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl (2.3 MB)\n",
1453
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.3 MB 35.0 MB/s \n",
1454
- "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from gradio) (1.3.5)\n",
1455
- "Collecting python-multipart\n",
1456
- " Downloading python-multipart-0.0.5.tar.gz (32 kB)\n",
1457
- "Collecting websockets\n",
1458
- " Downloading websockets-10.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)\n",
1459
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 106 kB 15.4 MB/s \n",
1460
- "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.7/dist-packages (from gradio) (2022.10.0)\n",
1461
- "Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from gradio) (6.0)\n",
1462
- "Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from gradio) (2.11.3)\n",
1463
- "Collecting orjson\n",
1464
- " Downloading orjson-3.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272 kB)\n",
1465
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 272 kB 42.0 MB/s \n",
1466
- "\u001b[?25hRequirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from gradio) (3.2.2)\n",
1467
- "Collecting pydub\n",
1468
- " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
1469
- "Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (from gradio) (7.1.2)\n",
1470
- "Collecting fastapi\n",
1471
- " Downloading fastapi-0.86.0-py3-none-any.whl (55 kB)\n",
1472
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 55 kB 1.3 MB/s \n",
1473
- "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from gradio) (1.21.6)\n",
1474
- "Collecting markdown-it-py[linkify,plugins]\n",
1475
- " Downloading markdown_it_py-2.1.0-py3-none-any.whl (84 kB)\n",
1476
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 1.6 MB/s \n",
1477
- "\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from gradio) (3.8.3)\n",
1478
- "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from gradio) (2.23.0)\n",
1479
- "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.8.1)\n",
1480
- "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (22.1.0)\n",
1481
- "Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (0.13.0)\n",
1482
- "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.2.0)\n",
1483
- "Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.1.1)\n",
1484
- "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (6.0.2)\n",
1485
- "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (2.1.1)\n",
1486
- "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.0.2)\n",
1487
- "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.3.1)\n",
1488
- "Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.7/dist-packages (from yarl<2.0,>=1.0->aiohttp->gradio) (2.10)\n",
1489
- "Collecting starlette==0.20.4\n",
1490
- " Downloading starlette-0.20.4-py3-none-any.whl (63 kB)\n",
1491
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 63 kB 1.1 MB/s \n",
1492
- "\u001b[?25hCollecting anyio<5,>=3.4.0\n",
1493
- " Downloading anyio-3.6.2-py3-none-any.whl (80 kB)\n",
1494
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 80 kB 4.1 MB/s \n",
1495
- "\u001b[?25hCollecting sniffio>=1.1\n",
1496
- " Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n",
1497
- "Collecting rfc3986[idna2008]<2,>=1.3\n",
1498
- " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
1499
- "Collecting httpcore<0.16.0,>=0.15.0\n",
1500
- " Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)\n",
1501
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 4.0 MB/s \n",
1502
- "\u001b[?25hRequirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from httpx->gradio) (2022.9.24)\n",
1503
- "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->gradio) (2.0.1)\n",
1504
- "Collecting mdurl~=0.1\n",
1505
- " Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
1506
- "Collecting mdit-py-plugins\n",
1507
- " Downloading mdit_py_plugins-0.3.1-py3-none-any.whl (46 kB)\n",
1508
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 46 kB 2.2 MB/s \n",
1509
- "\u001b[?25hCollecting linkify-it-py~=1.0\n",
1510
- " Downloading linkify_it_py-1.0.3-py3-none-any.whl (19 kB)\n",
1511
- "Collecting uc-micro-py\n",
1512
- " Downloading uc_micro_py-1.0.1-py3-none-any.whl (6.2 kB)\n",
1513
- "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (3.0.9)\n",
1514
- "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (2.8.2)\n",
1515
- "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (0.11.0)\n",
1516
- "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (1.4.4)\n",
1517
- "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib->gradio) (1.15.0)\n",
1518
- "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->gradio) (2022.5)\n",
1519
- "Collecting pynacl>=1.0.1\n",
1520
- " Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)\n",
1521
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 856 kB 61.5 MB/s \n",
1522
- "\u001b[?25hCollecting bcrypt>=3.1.3\n",
1523
- " Downloading bcrypt-4.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (593 kB)\n",
1524
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 593 kB 45.3 MB/s \n",
1525
- "\u001b[?25hCollecting cryptography>=2.5\n",
1526
- " Downloading cryptography-38.0.3-cp36-abi3-manylinux_2_24_x86_64.whl (4.1 MB)\n",
1527
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4.1 MB 44.4 MB/s \n",
1528
- "\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=2.5->paramiko->gradio) (1.15.1)\n",
1529
- "Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=2.5->paramiko->gradio) (2.21)\n",
1530
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (1.24.3)\n",
1531
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (3.0.4)\n",
1532
- "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from uvicorn->gradio) (7.1.2)\n",
1533
- "Building wheels for collected packages: ffmpy, python-multipart\n",
1534
- " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
1535
- " Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=4712 sha256=fb67edb59b803dc601cf1cfe223761b36790f09ae36d4a2d8f2b387bab48cf92\n",
1536
- " Stored in directory: /root/.cache/pip/wheels/13/e4/6c/e8059816e86796a597c6e6b0d4c880630f51a1fcfa0befd5e6\n",
1537
- " Building wheel for python-multipart (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
1538
- " Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=f6932c6fcf33320dce99d565a922046c9a7dd765eae1827d46a53d292abcda47\n",
1539
- " Stored in directory: /root/.cache/pip/wheels/2c/41/7c/bfd1c180534ffdcc0972f78c5758f89881602175d48a8bcd2c\n",
1540
- "Successfully built ffmpy python-multipart\n",
1541
- "Installing collected packages: sniffio, mdurl, uc-micro-py, rfc3986, markdown-it-py, h11, anyio, starlette, pynacl, mdit-py-plugins, linkify-it-py, httpcore, cryptography, bcrypt, websockets, uvicorn, python-multipart, pydub, pycryptodome, paramiko, orjson, httpx, ffmpy, fastapi, gradio\n",
1542
- "Successfully installed anyio-3.6.2 bcrypt-4.0.1 cryptography-38.0.3 fastapi-0.86.0 ffmpy-0.3.0 gradio-3.9 h11-0.12.0 httpcore-0.15.0 httpx-0.23.0 linkify-it-py-1.0.3 markdown-it-py-2.1.0 mdit-py-plugins-0.3.1 mdurl-0.1.2 orjson-3.8.1 paramiko-2.12.0 pycryptodome-3.15.0 pydub-0.25.1 pynacl-1.5.0 python-multipart-0.0.5 rfc3986-1.5.0 sniffio-1.3.0 starlette-0.20.4 uc-micro-py-1.0.1 uvicorn-0.19.0 websockets-10.4\n",
1543
- "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
1544
- "Collecting transformers\n",
1545
- " Downloading transformers-4.24.0-py3-none-any.whl (5.5 MB)\n",
1546
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.5 MB 4.3 MB/s \n",
1547
- "\u001b[?25hCollecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
1548
- " Downloading tokenizers-0.13.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
1549
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7.6 MB 54.9 MB/s \n",
1550
- "\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (1.21.6)\n",
1551
- "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n",
1552
- "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.64.1)\n",
1553
- "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.8.0)\n",
1554
- "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers) (4.13.0)\n",
1555
- "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (21.3)\n",
1556
- "Collecting huggingface-hub<1.0,>=0.10.0\n",
1557
- " Downloading huggingface_hub-0.10.1-py3-none-any.whl (163 kB)\n",
1558
- "\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 163 kB 59.5 MB/s \n",
1559
- "\u001b[?25hRequirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2022.6.2)\n",
1560
- "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (6.0)\n",
1561
- "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.10.0->transformers) (4.1.1)\n",
1562
- "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers) (3.0.9)\n",
1563
- "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers) (3.10.0)\n",
1564
- "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2022.9.24)\n",
1565
- "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n",
1566
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.24.3)\n",
1567
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n",
1568
- "Installing collected packages: tokenizers, huggingface-hub, transformers\n",
1569
- "Successfully installed huggingface-hub-0.10.1 tokenizers-0.13.2 transformers-4.24.0\n"
1570
- ]
1571
- }
1572
- ]
1573
- },
1574
- {
1575
- "cell_type": "code",
1576
- "source": [
1577
- "import gradio as gr\n",
1578
- "\n",
1579
- "from transformers import TFAutoModelForSequenceClassification, AutoTokenizer\n",
1580
- "import numpy as np"
1581
- ],
1582
- "metadata": {
1583
- "id": "HMJoAd5MtFTR"
1584
- },
1585
- "execution_count": null,
1586
- "outputs": []
1587
- },
1588
- {
1589
- "cell_type": "code",
1590
- "source": [
1591
- "# load model\n",
1592
- "model_v1 = TFAutoModelForSequenceClassification.from_pretrained('drive/MyDrive/FIRE/OOD/train_on_sst2/bert')\n",
1593
- "base_model = \"distilbert-base-uncased\"\n",
1594
- "tokenizer_v1 = AutoTokenizer.from_pretrained(base_model)"
1595
- ],
1596
- "metadata": {
1597
- "colab": {
1598
- "base_uri": "https://localhost:8080/",
1599
- "height": 236,
1600
- "referenced_widgets": [
1601
- "e313b0cc4b39472fba5f6b520ab3a6e7",
1602
- "1ef5aac40bbf4f7bbecbac38caecb2d5",
1603
- "aa6b247226bb42e7915dc2758b2d232d",
1604
- "7ffe5bb98aa042e2904774e25369b624",
1605
- "f4757a5ec55f42b9a0d66bd46cbbb36e",
1606
- "024ecf01ba314b54a306a60e94a1bdd5",
1607
- "1baf9e333dc547ecb53f3ef26ce812b9",
1608
- "6866b01d6ba34c4b837466a30e93c07b",
1609
- "b18cdd1e22654e3098856208349b5f1e",
1610
- "45efed67099e45c4a0364e701f1e32eb",
1611
- "e7fc29787ef84344856a09120389f32d",
1612
- "4edbc95f10a24b189a0e79241ff85b32",
1613
- "6f2c58bad2dd46c6b8467f5104b610a3",
1614
- "7e6f63c2efe04a63999a03d6131ce56a",
1615
- "77ae90d7e92b48a9b36ff7db470b836a",
1616
- "e493f8f5498a4a939a0c66a85eaf191f",
1617
- "c5898fa156ff49cb8c33e74ef61fd25a",
1618
- "f5bf429ff4c844b7aee2a9e8288cb3f8",
1619
- "fb591b16c0e044dbb6b2647b805dbf23",
1620
- "f4d427594da34c3baf5a33570d4f870b",
1621
- "a77fcb33e2fe402eb6ea3049f371ef13",
1622
- "c485b291ec58479786edd351044103ce",
1623
- "1b7f96a9d350409d8f4e0118247748e9",
1624
- "caa73b1c8e73487ab469deb806e70d40",
1625
- "d8da27dfaab146a8ab0d3646c216b9be",
1626
- "7ea09bd1fca44671a919699e9d1291ab",
1627
- "1352a435d41f4a9d8127fb68baff101e",
1628
- "d62883a081614ddabfc08ae629d27d45",
1629
- "7b3b3cffe30e47689ce071bf79150dbf",
1630
- "447edb84e4b245de90a3ed929f507eb4",
1631
- "97fb44af3c3e48c3a3d829573c56055a",
1632
- "a4a2776a7a73457abc39a4ed4550da3e",
1633
- "bbbf1bcdd5c74eba80d6457692606476",
1634
- "cfa5759e27a64c6c8337939e7834e17b",
1635
- "3dffb0ec291a4dfdb1d11b5cef1f5ed6",
1636
- "20169058ddfb4231821b16e43e9e032c",
1637
- "0fbfa41014a249588abbf0f4f99c8023",
1638
- "2f521b4021874155ad19595d7d3c6b30",
1639
- "a40fdc3db912487296e2081a053855b6",
1640
- "a4aeabc9652447459960f440b737e924",
1641
- "5f23d3b89ed94132b03aec776715cb16",
1642
- "6bff741fe7d54ea098eeadddc17ffa77",
1643
- "522e520184c0402d8fc2ce2d1355f7f3",
1644
- "10926435277a4040bdbea6fe457968dc"
1645
- ]
1646
- },
1647
- "id": "58TcyuIptN2b",
1648
- "outputId": "0ed8cb8d-ea2a-4f7b-f5d7-b0a7e6e7d7be"
1649
- },
1650
- "execution_count": null,
1651
- "outputs": [
1652
- {
1653
- "output_type": "stream",
1654
- "name": "stderr",
1655
- "text": [
1656
- "All model checkpoint layers were used when initializing TFDistilBertForSequenceClassification.\n",
1657
- "\n",
1658
- "All the layers of TFDistilBertForSequenceClassification were initialized from the model checkpoint at drive/MyDrive/FIRE/OOD/train_on_sst2/bert.\n",
1659
- "If your task is similar to the task the model of the checkpoint was trained on, you can already use TFDistilBertForSequenceClassification for predictions without further training.\n"
1660
- ]
1661
- },
1662
- {
1663
- "output_type": "display_data",
1664
- "data": {
1665
- "text/plain": [
1666
- "Downloading: 0%| | 0.00/28.0 [00:00<?, ?B/s]"
1667
- ],
1668
- "application/vnd.jupyter.widget-view+json": {
1669
- "version_major": 2,
1670
- "version_minor": 0,
1671
- "model_id": "e313b0cc4b39472fba5f6b520ab3a6e7"
1672
- }
1673
- },
1674
- "metadata": {}
1675
- },
1676
- {
1677
- "output_type": "display_data",
1678
- "data": {
1679
- "text/plain": [
1680
- "Downloading: 0%| | 0.00/483 [00:00<?, ?B/s]"
1681
- ],
1682
- "application/vnd.jupyter.widget-view+json": {
1683
- "version_major": 2,
1684
- "version_minor": 0,
1685
- "model_id": "4edbc95f10a24b189a0e79241ff85b32"
1686
- }
1687
- },
1688
- "metadata": {}
1689
- },
1690
- {
1691
- "output_type": "display_data",
1692
- "data": {
1693
- "text/plain": [
1694
- "Downloading: 0%| | 0.00/232k [00:00<?, ?B/s]"
1695
- ],
1696
- "application/vnd.jupyter.widget-view+json": {
1697
- "version_major": 2,
1698
- "version_minor": 0,
1699
- "model_id": "1b7f96a9d350409d8f4e0118247748e9"
1700
- }
1701
- },
1702
- "metadata": {}
1703
- },
1704
- {
1705
- "output_type": "display_data",
1706
- "data": {
1707
- "text/plain": [
1708
- "Downloading: 0%| | 0.00/466k [00:00<?, ?B/s]"
1709
- ],
1710
- "application/vnd.jupyter.widget-view+json": {
1711
- "version_major": 2,
1712
- "version_minor": 0,
1713
- "model_id": "cfa5759e27a64c6c8337939e7834e17b"
1714
- }
1715
- },
1716
- "metadata": {}
1717
- }
1718
- ]
1719
- },
1720
- {
1721
- "cell_type": "code",
1722
- "source": [
1723
- "def model_inference(sen):\n",
1724
- " tokenized_v1 = tokenizer_v1([sen], return_tensors=\"np\", padding=\"longest\")\n",
1725
- " outputs_v1 = model_v1(tokenized_v1).logits\n",
1726
- " classifications_v1 = np.argmax(outputs_v1, axis=1)\n",
1727
- " if classifications_v1[0] == 1:\n",
1728
- " res = \"Positive :)\"\n",
1729
- " else:\n",
1730
- " res = \"Negative :(\"\n",
1731
- " return res"
1732
- ],
1733
- "metadata": {
1734
- "id": "j8d9tW3StPmz"
1735
- },
1736
- "execution_count": null,
1737
- "outputs": []
1738
- },
1739
- {
1740
- "cell_type": "code",
1741
- "source": [
1742
- "demo = gr.Interface(\n",
1743
- " fn=model_inference,\n",
1744
- " inputs=gr.Textbox(lines=2, placeholder=\"Enter a Sentence\"),\n",
1745
- " outputs=\"text\",\n",
1746
- ")\n",
1747
- "demo.launch()\n"
1748
- ],
1749
- "metadata": {
1750
- "colab": {
1751
- "base_uri": "https://localhost:8080/",
1752
- "height": 671
1753
- },
1754
- "id": "OT7OuY2ptRS5",
1755
- "outputId": "de3fdb8c-9daf-4648-cf0e-785be9f95cbb"
1756
- },
1757
- "execution_count": null,
1758
- "outputs": [
1759
- {
1760
- "output_type": "stream",
1761
- "name": "stdout",
1762
- "text": [
1763
- "Colab notebook detected. To show errors in colab notebook, set `debug=True` in `launch()`\n",
1764
- "\n",
1765
- "Using Embedded Colab Mode (NEW). If you have issues, please use share=True and file an issue at https://github.com/gradio-app/gradio/\n",
1766
- "Note: opening the browser inspector may crash Embedded Colab Mode.\n",
1767
- "\n",
1768
- "To create a public link, set `share=True` in `launch()`.\n"
1769
- ]
1770
- },
1771
- {
1772
- "output_type": "display_data",
1773
- "data": {
1774
- "text/plain": [
1775
- "<IPython.core.display.Javascript object>"
1776
- ],
1777
- "application/javascript": [
1778
- "(async (port, path, width, height, cache, element) => {\n",
1779
- " if (!google.colab.kernel.accessAllowed && !cache) {\n",
1780
- " return;\n",
1781
- " }\n",
1782
- " element.appendChild(document.createTextNode(''));\n",
1783
- " const url = await google.colab.kernel.proxyPort(port, {cache});\n",
1784
- "\n",
1785
- " const external_link = document.createElement('div');\n",
1786
- " external_link.innerHTML = `\n",
1787
- " <div style=\"font-family: monospace; margin-bottom: 0.5rem\">\n",
1788
- " Running on <a href=${new URL(path, url).toString()} target=\"_blank\">\n",
1789
- " https://localhost:${port}${path}\n",
1790
- " </a>\n",
1791
- " </div>\n",
1792
- " `;\n",
1793
- " element.appendChild(external_link);\n",
1794
- "\n",
1795
- " const iframe = document.createElement('iframe');\n",
1796
- " iframe.src = new URL(path, url).toString();\n",
1797
- " iframe.height = height;\n",
1798
- " iframe.allow = \"autoplay; camera; microphone; clipboard-read; clipboard-write;\"\n",
1799
- " iframe.width = width;\n",
1800
- " iframe.style.border = 0;\n",
1801
- " element.appendChild(iframe);\n",
1802
- " })(7860, \"/\", \"100%\", 500, false, window.element)"
1803
- ]
1804
- },
1805
- "metadata": {}
1806
- },
1807
- {
1808
- "output_type": "execute_result",
1809
- "data": {
1810
- "text/plain": [
1811
- "(<gradio.routes.App at 0x7f43a84d1810>, 'http://127.0.0.1:7860/', None)"
1812
- ]
1813
- },
1814
- "metadata": {},
1815
- "execution_count": 7
1816
- }
1817
- ]
1818
- },
1819
- {
1820
- "cell_type": "code",
1821
- "source": [],
1822
- "metadata": {
1823
- "id": "OHsDVUtRuynd"
1824
- },
1825
- "execution_count": null,
1826
- "outputs": []
1827
- }
1828
- ]
1829
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Sentiment Analysis/trained_models/.DS_Store DELETED
Binary file (6.15 kB)
 
Sentiment Analysis/trained_models/bert/config.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "_name_or_path": "distilbert-base-uncased",
3
- "activation": "gelu",
4
- "architectures": [
5
- "DistilBertForSequenceClassification"
6
- ],
7
- "attention_dropout": 0.1,
8
- "dim": 768,
9
- "dropout": 0.1,
10
- "hidden_dim": 3072,
11
- "initializer_range": 0.02,
12
- "max_position_embeddings": 512,
13
- "model_type": "distilbert",
14
- "n_heads": 12,
15
- "n_layers": 6,
16
- "pad_token_id": 0,
17
- "qa_dropout": 0.1,
18
- "seq_classif_dropout": 0.2,
19
- "sinusoidal_pos_embds": false,
20
- "tie_weights_": true,
21
- "transformers_version": "4.24.0",
22
- "vocab_size": 30522
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ """## Imports"""
4
+ import tensorflow as tf
5
+ config = tf.compat.v1.ConfigProto()
6
+ config.gpu_options.allow_growth = True
7
+ session = tf.compat.v1.Session(config=config)
8
+ import gradio as gr
9
+ from pathlib import Path
10
+ import subprocess
11
+ from transformers import AutoTokenizer
12
+ from transformers import TFAutoModelForCausalLM
13
+ from transformers import TFAutoModelForSequenceClassification, AutoTokenizer
14
+ import numpy as np
15
+ from musicautobot.music_transformer.transform import idxenc2stream, midi2idxenc
16
+ from musicautobot.vocab import MusicVocab
17
+ import keras
18
+
19
+ """## Model Loads"""
20
+
21
+ #load poem generation model
22
+ model_poem_gn = TFAutoModelForCausalLM.from_pretrained('merged-ui/models-misc/peom_gn')
23
+ base_model_poem_gn = "distilgpt2"
24
+ tokenizer_poem_gn = AutoTokenizer.from_pretrained(base_model_poem_gn)
25
+
26
+ #load sentiment analysis
27
+ model_sa = TFAutoModelForSequenceClassification.from_pretrained('merged-ui/models-misc/sen_analysis/bert')
28
+ base_model_sa = "distilbert-base-uncased"
29
+ tokenizer_sa = AutoTokenizer.from_pretrained(base_model_sa)
30
+
31
+ #music generation
32
+ """
33
+ base_path = "/content/drive/MyDrive/FIRE_3rd Sem/music_gn/"
34
+ #path_mid_file -> Replace this with model generated file path
35
+ path_mid_file = base_path + "Comic_Relief.mid"
36
+ path_wav_file = base_path + "output_comic.wav"
37
+ subprocess.call(['timidity', path_mid_file, "-Ow", "-o", path_wav_file])"""
38
+ music_gen_base_path = "merged-ui/music_gen/"
39
+ model_music_gen = keras.models.load_model("transformer-final")
40
+
41
+ """## Music Generation"""
42
+
43
+ def predict_music(model, input_vector, num):
44
+ normalized = input_vector / 311
45
+ for i in range(num):
46
+ predict = model.predict(np.reshape(normalized[-100:], (1,100)), verbose = 0)
47
+ normalized = np.append(normalized, predict)
48
+
49
+ result = np.rint(normalized * 311)
50
+ # edits to prediction
51
+ for i in range(100, len(result)):
52
+ if i % 2 == 0:
53
+ if abs(result[i] - 8) < 5 and result[i] != 8:
54
+ result[i] = 8
55
+ else:
56
+ if result[i] < 137:
57
+ result[i] = 137
58
+ return result
59
+
60
+ # this function takes a 100 length encoded song beginning as an input and
61
+ def midi_predict(model, test, num_notes):
62
+ test_midi = idxenc2stream(test.astype("int"), MusicVocab.create())
63
+ test_midi.write('midi',music_gen_base_path+"input_demo.mid")
64
+
65
+ res = predict_music(model, test, num_notes)
66
+ output = idxenc2stream(res.astype("int"), MusicVocab.create())
67
+ output.write('midi',music_gen_base_path+"output_demo.mid")
68
+ path_mid_file = music_gen_base_path + "output_demo.mid"
69
+ path_wav_file = music_gen_base_path + "output_demo.wav"
70
+ # need timidity for this
71
+ subprocess.call(['timidity', path_mid_file, "-Ow", "-o", path_wav_file])
72
+ return
73
+
74
+ def inference_music_gen(audio, num_notes):
75
+ data_e = midi2idxenc(audio.name, MusicVocab.create())
76
+ midi_predict(model_music_gen, data_e[:100], int(num_notes))
77
+ return
78
+
79
+ music_gen_interface = gr.Interface(
80
+ inference_music_gen,
81
+ inputs = [gr.inputs.File(type="file", label="Input"), gr.Textbox(lines = 1, placeholder = "Enter number of notes here")],
82
+ examples=[[music_gen_base_path + "mid_file/Comic_Relief.mid", 300]],
83
+ outputs = gr.outputs.Audio(type="filepath", label="Output")
84
+ )
85
+
86
+ """## Sentiment Analysis"""
87
+
88
+ def inference_sentiment_analysis(sen):
89
+ tokenized_v1 = tokenizer_sa([sen], return_tensors="np", padding="longest")
90
+ outputs_v1 = model_sa(tokenized_v1).logits
91
+ classifications_v1 = np.argmax(outputs_v1, axis=1)
92
+ if classifications_v1[0] == 1:
93
+ res = "Positive :)"
94
+ else:
95
+ res = "Negative :("
96
+ return res
97
+
98
+ sentiment_analysis_interface = gr.Interface(
99
+ fn=inference_sentiment_analysis,
100
+ inputs=gr.Textbox(lines=2, placeholder="Enter a Sentence"),
101
+ outputs="text",
102
+ )
103
+
104
+ """## Peom Generation"""
105
+
106
+ def inference_poem_gen(start):
107
+ tokenized = tokenizer_poem_gn(start, return_tensors="np")
108
+ outputs = model_poem_gn.generate(**tokenized, max_new_tokens=20)
109
+ res = tokenizer_poem_gn.decode(outputs[0])
110
+ return res.replace("<LINE>", "\n")
111
+
112
+ poem_gen_interface = gr.Interface(
113
+ fn=inference_poem_gen,
114
+ inputs=gr.Textbox(lines=2, placeholder="Start Here..."),
115
+ outputs="text",
116
+ )
117
+
118
+ """## Combine All"""
119
+
120
+ demo = gr.TabbedInterface([music_gen_interface, poem_gen_interface, sentiment_analysis_interface],
121
+ ["Music Generation", "Poem Generation", "Sentiment Analysis"])
122
+ demo.launch(debug=True, share=True)
123
+
music_gen/.DS_Store DELETED
Binary file (6.15 kB)
 
music_gen/UI_midi_file.ipynb DELETED
@@ -1 +0,0 @@
1
- {"cells":[{"cell_type":"code","execution_count":1,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":22492,"status":"ok","timestamp":1669836388167,"user":{"displayName":"Rahul Dagar","userId":"06679238259044443515"},"user_tz":300},"id":"KNRGKEn0EUl5","outputId":"0410fe39-f705-4a78-b8b5-556e71b140c0"},"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}],"source":["from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"code","execution_count":2,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":23597,"status":"ok","timestamp":1669836411747,"user":{"displayName":"Rahul Dagar","userId":"06679238259044443515"},"user_tz":300},"id":"tENqMaj5EZhe","outputId":"2d580757-f02d-4cf1-bd8f-64f7083efef7"},"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Collecting gradio\n"," Downloading gradio-3.12.0-py3-none-any.whl (11.6 MB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 11.6 MB 35.8 MB/s \n","\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.7/dist-packages (from gradio) (2022.11.0)\n","Collecting markdown-it-py[linkify,plugins]\n"," Downloading markdown_it_py-2.1.0-py3-none-any.whl (84 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 3.7 MB/s \n","\u001b[?25hRequirement already satisfied: pydantic in /usr/local/lib/python3.7/dist-packages (from gradio) (1.10.2)\n","Collecting paramiko\n"," Downloading paramiko-2.12.0-py2.py3-none-any.whl (213 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 213 kB 89.1 MB/s \n","\u001b[?25hCollecting httpx\n"," Downloading httpx-0.23.1-py3-none-any.whl (84 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 84 kB 3.7 MB/s \n","\u001b[?25hCollecting h11<0.13,>=0.11\n"," Downloading h11-0.12.0-py3-none-any.whl (54 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 54 kB 3.7 MB/s \n","\u001b[?25hCollecting uvicorn\n"," Downloading uvicorn-0.20.0-py3-none-any.whl (56 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 56 kB 5.6 MB/s \n","\u001b[?25hCollecting fastapi\n"," Downloading fastapi-0.88.0-py3-none-any.whl (55 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 55 kB 4.4 MB/s \n","\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from gradio) (1.3.5)\n","Collecting python-multipart\n"," Downloading python-multipart-0.0.5.tar.gz (32 kB)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from gradio) (1.21.6)\n","Collecting pycryptodome\n"," Downloading pycryptodome-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.3 MB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.3 MB 62.6 MB/s \n","\u001b[?25hRequirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from gradio) (2.11.3)\n","Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from gradio) (3.2.2)\n","Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from gradio) (2.23.0)\n","Collecting websockets>=10.0\n"," Downloading websockets-10.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 106 kB 65.4 MB/s \n","\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from gradio) (3.8.3)\n","Collecting pydub\n"," Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from gradio) (6.0)\n","Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (from gradio) (7.1.2)\n","Collecting orjson\n"," Downloading orjson-3.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 278 kB 74.8 MB/s \n","\u001b[?25hCollecting ffmpy\n"," Downloading ffmpy-0.3.0.tar.gz (4.8 kB)\n","Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (2.1.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (6.0.2)\n","Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (0.13.0)\n","Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.1.1)\n","Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (4.0.2)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (22.1.0)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.8.1)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->gradio) (1.3.3)\n","Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.7/dist-packages (from yarl<2.0,>=1.0->aiohttp->gradio) (2.10)\n","Collecting starlette==0.22.0\n"," Downloading starlette-0.22.0-py3-none-any.whl (64 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 64 kB 3.4 MB/s \n","\u001b[?25hCollecting anyio<5,>=3.4.0\n"," Downloading anyio-3.6.2-py3-none-any.whl (80 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 80 kB 10.2 MB/s \n","\u001b[?25hCollecting sniffio>=1.1\n"," Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n","Collecting httpcore<0.17.0,>=0.15.0\n"," Downloading httpcore-0.16.2-py3-none-any.whl (68 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 7.5 MB/s \n","\u001b[?25hRequirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from httpx->gradio) (2022.9.24)\n","Collecting rfc3986[idna2008]<2,>=1.3\n"," Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n","Collecting httpcore<0.17.0,>=0.15.0\n"," Downloading httpcore-0.16.1-py3-none-any.whl (68 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 8.1 MB/s \n","\u001b[?25h Downloading httpcore-0.16.0-py3-none-any.whl (68 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 7.8 MB/s \n","\u001b[?25h Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 68 kB 8.3 MB/s \n","\u001b[?25hRequirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->gradio) (2.0.1)\n","Collecting mdurl~=0.1\n"," Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n","Collecting linkify-it-py~=1.0\n"," Downloading linkify_it_py-1.0.3-py3-none-any.whl (19 kB)\n","Collecting mdit-py-plugins\n"," Downloading mdit_py_plugins-0.3.1-py3-none-any.whl (46 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 46 kB 4.4 MB/s \n","\u001b[?25hCollecting uc-micro-py\n"," Downloading uc_micro_py-1.0.1-py3-none-any.whl (6.2 kB)\n","Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (2.8.2)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (0.11.0)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (1.4.4)\n","Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->gradio) (3.0.9)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib->gradio) (1.15.0)\n","Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->gradio) (2022.6)\n","Collecting cryptography>=2.5\n"," Downloading cryptography-38.0.4-cp36-abi3-manylinux_2_24_x86_64.whl (4.0 MB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4.0 MB 50.2 MB/s \n","\u001b[?25hCollecting bcrypt>=3.1.3\n"," Downloading bcrypt-4.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (593 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 593 kB 63.7 MB/s \n","\u001b[?25hCollecting pynacl>=1.0.1\n"," Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)\n","\u001b[K |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 856 kB 74.9 MB/s \n","\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=2.5->paramiko->gradio) (1.15.1)\n","Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=2.5->paramiko->gradio) (2.21)\n","Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (3.0.4)\n","Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->gradio) (1.24.3)\n","Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from uvicorn->gradio) (7.1.2)\n","Building wheels for collected packages: ffmpy, python-multipart\n"," Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=4711 sha256=9d7d101507bb4bcde4acaa83a192b6cb544771f7d61e8e193353f1401aa4469d\n"," Stored in directory: /root/.cache/pip/wheels/13/e4/6c/e8059816e86796a597c6e6b0d4c880630f51a1fcfa0befd5e6\n"," Building wheel for python-multipart (setup.py) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=e78918c1797ce35e37a94ddbec7bbf53775d69f255e8cd91b36d45f26f1a7fc9\n"," Stored in directory: /root/.cache/pip/wheels/2c/41/7c/bfd1c180534ffdcc0972f78c5758f89881602175d48a8bcd2c\n","Successfully built ffmpy python-multipart\n","Installing collected packages: sniffio, mdurl, uc-micro-py, rfc3986, markdown-it-py, h11, anyio, starlette, pynacl, mdit-py-plugins, linkify-it-py, httpcore, cryptography, bcrypt, websockets, uvicorn, python-multipart, pydub, pycryptodome, paramiko, orjson, httpx, ffmpy, fastapi, gradio\n","Successfully installed anyio-3.6.2 bcrypt-4.0.1 cryptography-38.0.4 fastapi-0.88.0 ffmpy-0.3.0 gradio-3.12.0 h11-0.12.0 httpcore-0.15.0 httpx-0.23.1 linkify-it-py-1.0.3 markdown-it-py-2.1.0 mdit-py-plugins-0.3.1 mdurl-0.1.2 orjson-3.8.2 paramiko-2.12.0 pycryptodome-3.16.0 pydub-0.25.1 pynacl-1.5.0 python-multipart-0.0.5 rfc3986-1.5.0 sniffio-1.3.0 starlette-0.22.0 uc-micro-py-1.0.1 uvicorn-0.20.0 websockets-10.4\n","Reading package lists... Done\n","Building dependency tree \n","Reading state information... Done\n","The following package was automatically installed and is no longer required:\n"," libnvidia-common-460\n","Use 'apt autoremove' to remove it.\n","The following additional packages will be installed:\n"," freepats libaudio2 timidity-daemon\n","Suggested packages:\n"," nas fluid-soundfont-gm fluid-soundfont-gs pmidi\n","The following NEW packages will be installed:\n"," freepats libaudio2 timidity timidity-daemon\n","0 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.\n","Need to get 29.6 MB of archives.\n","After this operation, 35.7 MB of additional disk space will be used.\n","Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 freepats all 20060219-1 [29.0 MB]\n","Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libaudio2 amd64 1.9.4-6 [50.3 kB]\n","Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 timidity amd64 2.13.2-41 [585 kB]\n","Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 timidity-daemon all 2.13.2-41 [5,984 B]\n","Fetched 29.6 MB in 0s (72.0 MB/s)\n","Selecting previously unselected package freepats.\n","(Reading database ... 123991 files and directories currently installed.)\n","Preparing to unpack .../freepats_20060219-1_all.deb ...\n","Unpacking freepats (20060219-1) ...\n","Selecting previously unselected package libaudio2:amd64.\n","Preparing to unpack .../libaudio2_1.9.4-6_amd64.deb ...\n","Unpacking libaudio2:amd64 (1.9.4-6) ...\n","Selecting previously unselected package timidity.\n","Preparing to unpack .../timidity_2.13.2-41_amd64.deb ...\n","Unpacking timidity (2.13.2-41) ...\n","Selecting previously unselected package timidity-daemon.\n","Preparing to unpack .../timidity-daemon_2.13.2-41_all.deb ...\n","Unpacking timidity-daemon (2.13.2-41) ...\n","Setting up freepats (20060219-1) ...\n","Setting up libaudio2:amd64 (1.9.4-6) ...\n","Setting up timidity (2.13.2-41) ...\n","Setting up timidity-daemon (2.13.2-41) ...\n","Adding group timidity....done\n","Adding system user timidity....done\n","Adding user `timidity' to group `audio' ...\n","Adding user timidity to group audio\n","Done.\n","invoke-rc.d: could not determine current runlevel\n","invoke-rc.d: policy-rc.d denied execution of stop.\n","invoke-rc.d: could not determine current runlevel\n","invoke-rc.d: policy-rc.d denied execution of start.\n","Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n","Processing triggers for libc-bin (2.27-3ubuntu1.6) ...\n","Processing triggers for systemd (237-3ubuntu10.56) ...\n"]}],"source":["!pip install gradio\n","!apt-get install timidity"]},{"cell_type":"code","execution_count":3,"metadata":{"id":"wN-kzFUKEgbe","executionInfo":{"status":"ok","timestamp":1669836413098,"user_tz":300,"elapsed":1359,"user":{"displayName":"Rahul Dagar","userId":"06679238259044443515"}}},"outputs":[],"source":["import gradio as gr\n","from pathlib import Path\n","import subprocess"]},{"cell_type":"code","execution_count":4,"metadata":{"id":"IiiTtEdTJtzD","executionInfo":{"status":"ok","timestamp":1669836413099,"user_tz":300,"elapsed":13,"user":{"displayName":"Rahul Dagar","userId":"06679238259044443515"}}},"outputs":[],"source":["def inference():\n"," base_path = \"/content/drive/MyDrive/FIRE_3rd Sem/music_gn/\"\n"," #path_mid_file -> Replace this with model generated file path\n"," path_mid_file = base_path + \"Comic_Relief.mid\"\n"," path_wav_file = base_path + \"output_comic.wav\"\n"," subprocess.call(['timidity', path_mid_file, \"-Ow\", \"-o\", path_wav_file])\n"," return Path(path_wav_file)"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":898},"id":"ZSGf7iKuj3Qc","outputId":"c76600ef-3b3d-4dc6-b6af-058503ff96e1"},"outputs":[{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["/usr/local/lib/python3.7/dist-packages/gradio/outputs.py:81: UserWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n"," \"Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\",\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. To turn off, set debug=False in launch().\n","Running on public URL: https://d1c7449a9e2180e2.gradio.app\n","\n","This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"]},{"data":{"text/html":["<div><iframe src=\"https://d1c7449a9e2180e2.gradio.app\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["Exception in thread Thread-21:\n","Traceback (most recent call last):\n"," File \"/usr/lib/python3.7/threading.py\", line 926, in _bootstrap_inner\n"," self.run()\n"," File \"/usr/lib/python3.7/threading.py\", line 870, in run\n"," self._target(*self._args, **self._kwargs)\n"," File \"/usr/local/lib/python3.7/dist-packages/gradio/tunneling.py\", line 39, in handler\n"," chan.send(data)\n"," File \"/usr/local/lib/python3.7/dist-packages/paramiko/channel.py\", line 801, in send\n"," return self._send(s, m)\n"," File \"/usr/local/lib/python3.7/dist-packages/paramiko/channel.py\", line 1198, in _send\n"," raise socket.error(\"Socket is closed\")\n","OSError: Socket is closed\n","\n"]}],"source":["title = \"Music Generation\"\n","description = \"Add Project description\"\n","article = \"<p style='text-align: center'><a href='https://github.com/' target='_blank'>Github Repo</a></p>\"\n","#we can add other project related stuff as well\n","\n","gr.Interface(\n"," inference, \n"," inputs = None, \n"," title=title,\n"," description=description,\n"," article=article,\n"," outputs = gr.outputs.Audio(type=\"filepath\", label=\"Output\")\n"," ).launch(debug=True, share=True)"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"eYAysXfiJt8s"},"outputs":[],"source":[]}],"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyN94Rbb2hF1lMEWF6piWIaF"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}
 
 
music_gen/mid_file/Comic_Relief.mid DELETED
Binary file (1.11 kB)
 
music_gen/mid_file/midi_example_ode_to_joy.mid DELETED
Binary file (184 Bytes)
 
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ timidity
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ musicautobot==0.0.1
2
+ gradio==3.12.0
3
+ transformers==4.20.1
4
+ fastai==1.0.58