renatk commited on
Commit
6d7223f
1 Parent(s): ec9eb0b

Add example notebook

Browse files
Files changed (2) hide show
  1. Cirtdan.ipynb +1306 -0
  2. README.md +3 -0
Cirtdan.ipynb ADDED
@@ -0,0 +1,1306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "3de99e8d7a5d4cbfab93a6609fadb166": {
18
+ "model_module": "@jupyter-widgets/controls",
19
+ "model_name": "VBoxModel",
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": "VBoxModel",
26
+ "_view_count": null,
27
+ "_view_module": "@jupyter-widgets/controls",
28
+ "_view_module_version": "1.5.0",
29
+ "_view_name": "VBoxView",
30
+ "box_style": "",
31
+ "children": [
32
+ "IPY_MODEL_920b8b5f45d04be3be5f85ceaccd4cf0",
33
+ "IPY_MODEL_ceb10fa240944d23b03856384a4685e7",
34
+ "IPY_MODEL_a25b243626574c7a87b09a60b0eb355f",
35
+ "IPY_MODEL_7da3a37544bc4adf82324109e6d9582e"
36
+ ],
37
+ "layout": "IPY_MODEL_3ef7ef8123884d58b5c222245d84b3de"
38
+ }
39
+ },
40
+ "ac054215310a44edb3f45bf8d257b830": {
41
+ "model_module": "@jupyter-widgets/controls",
42
+ "model_name": "HTMLModel",
43
+ "model_module_version": "1.5.0",
44
+ "state": {
45
+ "_dom_classes": [],
46
+ "_model_module": "@jupyter-widgets/controls",
47
+ "_model_module_version": "1.5.0",
48
+ "_model_name": "HTMLModel",
49
+ "_view_count": null,
50
+ "_view_module": "@jupyter-widgets/controls",
51
+ "_view_module_version": "1.5.0",
52
+ "_view_name": "HTMLView",
53
+ "description": "",
54
+ "description_tooltip": null,
55
+ "layout": "IPY_MODEL_7326f47690464dbb8ff116d951b2c029",
56
+ "placeholder": "​",
57
+ "style": "IPY_MODEL_d230346a0596443f8e2cd0beb90132e0",
58
+ "value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
59
+ }
60
+ },
61
+ "e74bfb50dff24f0d8790f213648f9f11": {
62
+ "model_module": "@jupyter-widgets/controls",
63
+ "model_name": "PasswordModel",
64
+ "model_module_version": "1.5.0",
65
+ "state": {
66
+ "_dom_classes": [],
67
+ "_model_module": "@jupyter-widgets/controls",
68
+ "_model_module_version": "1.5.0",
69
+ "_model_name": "PasswordModel",
70
+ "_view_count": null,
71
+ "_view_module": "@jupyter-widgets/controls",
72
+ "_view_module_version": "1.5.0",
73
+ "_view_name": "PasswordView",
74
+ "continuous_update": true,
75
+ "description": "Token:",
76
+ "description_tooltip": null,
77
+ "disabled": false,
78
+ "layout": "IPY_MODEL_089fcdf6573f4c1a84ac45cc524714b4",
79
+ "placeholder": "​",
80
+ "style": "IPY_MODEL_8e4205306ddd408284260ef13d23a11a",
81
+ "value": ""
82
+ }
83
+ },
84
+ "1aa92ee0539d4187b93e375ec07078c7": {
85
+ "model_module": "@jupyter-widgets/controls",
86
+ "model_name": "CheckboxModel",
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": "CheckboxModel",
93
+ "_view_count": null,
94
+ "_view_module": "@jupyter-widgets/controls",
95
+ "_view_module_version": "1.5.0",
96
+ "_view_name": "CheckboxView",
97
+ "description": "Add token as git credential?",
98
+ "description_tooltip": null,
99
+ "disabled": false,
100
+ "indent": true,
101
+ "layout": "IPY_MODEL_fbb582816c6f4c6b80cea28c03986f54",
102
+ "style": "IPY_MODEL_c5526296e5df4a638c9ea0407fb5fe1f",
103
+ "value": true
104
+ }
105
+ },
106
+ "a746790e9a1144f5b7dd4f239a890a7f": {
107
+ "model_module": "@jupyter-widgets/controls",
108
+ "model_name": "ButtonModel",
109
+ "model_module_version": "1.5.0",
110
+ "state": {
111
+ "_dom_classes": [],
112
+ "_model_module": "@jupyter-widgets/controls",
113
+ "_model_module_version": "1.5.0",
114
+ "_model_name": "ButtonModel",
115
+ "_view_count": null,
116
+ "_view_module": "@jupyter-widgets/controls",
117
+ "_view_module_version": "1.5.0",
118
+ "_view_name": "ButtonView",
119
+ "button_style": "",
120
+ "description": "Login",
121
+ "disabled": false,
122
+ "icon": "",
123
+ "layout": "IPY_MODEL_1b66175f2ab64c1a962587f4ddcf32ab",
124
+ "style": "IPY_MODEL_01a7e38799e349ef9d6e778cc9c20cca",
125
+ "tooltip": ""
126
+ }
127
+ },
128
+ "213610d83c704346bf9ff8d8558ab5c8": {
129
+ "model_module": "@jupyter-widgets/controls",
130
+ "model_name": "HTMLModel",
131
+ "model_module_version": "1.5.0",
132
+ "state": {
133
+ "_dom_classes": [],
134
+ "_model_module": "@jupyter-widgets/controls",
135
+ "_model_module_version": "1.5.0",
136
+ "_model_name": "HTMLModel",
137
+ "_view_count": null,
138
+ "_view_module": "@jupyter-widgets/controls",
139
+ "_view_module_version": "1.5.0",
140
+ "_view_name": "HTMLView",
141
+ "description": "",
142
+ "description_tooltip": null,
143
+ "layout": "IPY_MODEL_04ebfe640ac443c2909a01a746f4f50f",
144
+ "placeholder": "​",
145
+ "style": "IPY_MODEL_206a605c0d8e48818a8bd641b30a41fa",
146
+ "value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
147
+ }
148
+ },
149
+ "3ef7ef8123884d58b5c222245d84b3de": {
150
+ "model_module": "@jupyter-widgets/base",
151
+ "model_name": "LayoutModel",
152
+ "model_module_version": "1.2.0",
153
+ "state": {
154
+ "_model_module": "@jupyter-widgets/base",
155
+ "_model_module_version": "1.2.0",
156
+ "_model_name": "LayoutModel",
157
+ "_view_count": null,
158
+ "_view_module": "@jupyter-widgets/base",
159
+ "_view_module_version": "1.2.0",
160
+ "_view_name": "LayoutView",
161
+ "align_content": null,
162
+ "align_items": "center",
163
+ "align_self": null,
164
+ "border": null,
165
+ "bottom": null,
166
+ "display": "flex",
167
+ "flex": null,
168
+ "flex_flow": "column",
169
+ "grid_area": null,
170
+ "grid_auto_columns": null,
171
+ "grid_auto_flow": null,
172
+ "grid_auto_rows": null,
173
+ "grid_column": null,
174
+ "grid_gap": null,
175
+ "grid_row": null,
176
+ "grid_template_areas": null,
177
+ "grid_template_columns": null,
178
+ "grid_template_rows": null,
179
+ "height": null,
180
+ "justify_content": null,
181
+ "justify_items": null,
182
+ "left": null,
183
+ "margin": null,
184
+ "max_height": null,
185
+ "max_width": null,
186
+ "min_height": null,
187
+ "min_width": null,
188
+ "object_fit": null,
189
+ "object_position": null,
190
+ "order": null,
191
+ "overflow": null,
192
+ "overflow_x": null,
193
+ "overflow_y": null,
194
+ "padding": null,
195
+ "right": null,
196
+ "top": null,
197
+ "visibility": null,
198
+ "width": "50%"
199
+ }
200
+ },
201
+ "7326f47690464dbb8ff116d951b2c029": {
202
+ "model_module": "@jupyter-widgets/base",
203
+ "model_name": "LayoutModel",
204
+ "model_module_version": "1.2.0",
205
+ "state": {
206
+ "_model_module": "@jupyter-widgets/base",
207
+ "_model_module_version": "1.2.0",
208
+ "_model_name": "LayoutModel",
209
+ "_view_count": null,
210
+ "_view_module": "@jupyter-widgets/base",
211
+ "_view_module_version": "1.2.0",
212
+ "_view_name": "LayoutView",
213
+ "align_content": null,
214
+ "align_items": null,
215
+ "align_self": null,
216
+ "border": null,
217
+ "bottom": null,
218
+ "display": null,
219
+ "flex": null,
220
+ "flex_flow": null,
221
+ "grid_area": null,
222
+ "grid_auto_columns": null,
223
+ "grid_auto_flow": null,
224
+ "grid_auto_rows": null,
225
+ "grid_column": null,
226
+ "grid_gap": null,
227
+ "grid_row": null,
228
+ "grid_template_areas": null,
229
+ "grid_template_columns": null,
230
+ "grid_template_rows": null,
231
+ "height": null,
232
+ "justify_content": null,
233
+ "justify_items": null,
234
+ "left": null,
235
+ "margin": null,
236
+ "max_height": null,
237
+ "max_width": null,
238
+ "min_height": null,
239
+ "min_width": null,
240
+ "object_fit": null,
241
+ "object_position": null,
242
+ "order": null,
243
+ "overflow": null,
244
+ "overflow_x": null,
245
+ "overflow_y": null,
246
+ "padding": null,
247
+ "right": null,
248
+ "top": null,
249
+ "visibility": null,
250
+ "width": null
251
+ }
252
+ },
253
+ "d230346a0596443f8e2cd0beb90132e0": {
254
+ "model_module": "@jupyter-widgets/controls",
255
+ "model_name": "DescriptionStyleModel",
256
+ "model_module_version": "1.5.0",
257
+ "state": {
258
+ "_model_module": "@jupyter-widgets/controls",
259
+ "_model_module_version": "1.5.0",
260
+ "_model_name": "DescriptionStyleModel",
261
+ "_view_count": null,
262
+ "_view_module": "@jupyter-widgets/base",
263
+ "_view_module_version": "1.2.0",
264
+ "_view_name": "StyleView",
265
+ "description_width": ""
266
+ }
267
+ },
268
+ "089fcdf6573f4c1a84ac45cc524714b4": {
269
+ "model_module": "@jupyter-widgets/base",
270
+ "model_name": "LayoutModel",
271
+ "model_module_version": "1.2.0",
272
+ "state": {
273
+ "_model_module": "@jupyter-widgets/base",
274
+ "_model_module_version": "1.2.0",
275
+ "_model_name": "LayoutModel",
276
+ "_view_count": null,
277
+ "_view_module": "@jupyter-widgets/base",
278
+ "_view_module_version": "1.2.0",
279
+ "_view_name": "LayoutView",
280
+ "align_content": null,
281
+ "align_items": null,
282
+ "align_self": null,
283
+ "border": null,
284
+ "bottom": null,
285
+ "display": null,
286
+ "flex": null,
287
+ "flex_flow": null,
288
+ "grid_area": null,
289
+ "grid_auto_columns": null,
290
+ "grid_auto_flow": null,
291
+ "grid_auto_rows": null,
292
+ "grid_column": null,
293
+ "grid_gap": null,
294
+ "grid_row": null,
295
+ "grid_template_areas": null,
296
+ "grid_template_columns": null,
297
+ "grid_template_rows": null,
298
+ "height": null,
299
+ "justify_content": null,
300
+ "justify_items": null,
301
+ "left": null,
302
+ "margin": null,
303
+ "max_height": null,
304
+ "max_width": null,
305
+ "min_height": null,
306
+ "min_width": null,
307
+ "object_fit": null,
308
+ "object_position": null,
309
+ "order": null,
310
+ "overflow": null,
311
+ "overflow_x": null,
312
+ "overflow_y": null,
313
+ "padding": null,
314
+ "right": null,
315
+ "top": null,
316
+ "visibility": null,
317
+ "width": null
318
+ }
319
+ },
320
+ "8e4205306ddd408284260ef13d23a11a": {
321
+ "model_module": "@jupyter-widgets/controls",
322
+ "model_name": "DescriptionStyleModel",
323
+ "model_module_version": "1.5.0",
324
+ "state": {
325
+ "_model_module": "@jupyter-widgets/controls",
326
+ "_model_module_version": "1.5.0",
327
+ "_model_name": "DescriptionStyleModel",
328
+ "_view_count": null,
329
+ "_view_module": "@jupyter-widgets/base",
330
+ "_view_module_version": "1.2.0",
331
+ "_view_name": "StyleView",
332
+ "description_width": ""
333
+ }
334
+ },
335
+ "fbb582816c6f4c6b80cea28c03986f54": {
336
+ "model_module": "@jupyter-widgets/base",
337
+ "model_name": "LayoutModel",
338
+ "model_module_version": "1.2.0",
339
+ "state": {
340
+ "_model_module": "@jupyter-widgets/base",
341
+ "_model_module_version": "1.2.0",
342
+ "_model_name": "LayoutModel",
343
+ "_view_count": null,
344
+ "_view_module": "@jupyter-widgets/base",
345
+ "_view_module_version": "1.2.0",
346
+ "_view_name": "LayoutView",
347
+ "align_content": null,
348
+ "align_items": null,
349
+ "align_self": null,
350
+ "border": null,
351
+ "bottom": null,
352
+ "display": null,
353
+ "flex": null,
354
+ "flex_flow": null,
355
+ "grid_area": null,
356
+ "grid_auto_columns": null,
357
+ "grid_auto_flow": null,
358
+ "grid_auto_rows": null,
359
+ "grid_column": null,
360
+ "grid_gap": null,
361
+ "grid_row": null,
362
+ "grid_template_areas": null,
363
+ "grid_template_columns": null,
364
+ "grid_template_rows": null,
365
+ "height": null,
366
+ "justify_content": null,
367
+ "justify_items": null,
368
+ "left": null,
369
+ "margin": null,
370
+ "max_height": null,
371
+ "max_width": null,
372
+ "min_height": null,
373
+ "min_width": null,
374
+ "object_fit": null,
375
+ "object_position": null,
376
+ "order": null,
377
+ "overflow": null,
378
+ "overflow_x": null,
379
+ "overflow_y": null,
380
+ "padding": null,
381
+ "right": null,
382
+ "top": null,
383
+ "visibility": null,
384
+ "width": null
385
+ }
386
+ },
387
+ "c5526296e5df4a638c9ea0407fb5fe1f": {
388
+ "model_module": "@jupyter-widgets/controls",
389
+ "model_name": "DescriptionStyleModel",
390
+ "model_module_version": "1.5.0",
391
+ "state": {
392
+ "_model_module": "@jupyter-widgets/controls",
393
+ "_model_module_version": "1.5.0",
394
+ "_model_name": "DescriptionStyleModel",
395
+ "_view_count": null,
396
+ "_view_module": "@jupyter-widgets/base",
397
+ "_view_module_version": "1.2.0",
398
+ "_view_name": "StyleView",
399
+ "description_width": ""
400
+ }
401
+ },
402
+ "1b66175f2ab64c1a962587f4ddcf32ab": {
403
+ "model_module": "@jupyter-widgets/base",
404
+ "model_name": "LayoutModel",
405
+ "model_module_version": "1.2.0",
406
+ "state": {
407
+ "_model_module": "@jupyter-widgets/base",
408
+ "_model_module_version": "1.2.0",
409
+ "_model_name": "LayoutModel",
410
+ "_view_count": null,
411
+ "_view_module": "@jupyter-widgets/base",
412
+ "_view_module_version": "1.2.0",
413
+ "_view_name": "LayoutView",
414
+ "align_content": null,
415
+ "align_items": null,
416
+ "align_self": null,
417
+ "border": null,
418
+ "bottom": null,
419
+ "display": null,
420
+ "flex": null,
421
+ "flex_flow": null,
422
+ "grid_area": null,
423
+ "grid_auto_columns": null,
424
+ "grid_auto_flow": null,
425
+ "grid_auto_rows": null,
426
+ "grid_column": null,
427
+ "grid_gap": null,
428
+ "grid_row": null,
429
+ "grid_template_areas": null,
430
+ "grid_template_columns": null,
431
+ "grid_template_rows": null,
432
+ "height": null,
433
+ "justify_content": null,
434
+ "justify_items": null,
435
+ "left": null,
436
+ "margin": null,
437
+ "max_height": null,
438
+ "max_width": null,
439
+ "min_height": null,
440
+ "min_width": null,
441
+ "object_fit": null,
442
+ "object_position": null,
443
+ "order": null,
444
+ "overflow": null,
445
+ "overflow_x": null,
446
+ "overflow_y": null,
447
+ "padding": null,
448
+ "right": null,
449
+ "top": null,
450
+ "visibility": null,
451
+ "width": null
452
+ }
453
+ },
454
+ "01a7e38799e349ef9d6e778cc9c20cca": {
455
+ "model_module": "@jupyter-widgets/controls",
456
+ "model_name": "ButtonStyleModel",
457
+ "model_module_version": "1.5.0",
458
+ "state": {
459
+ "_model_module": "@jupyter-widgets/controls",
460
+ "_model_module_version": "1.5.0",
461
+ "_model_name": "ButtonStyleModel",
462
+ "_view_count": null,
463
+ "_view_module": "@jupyter-widgets/base",
464
+ "_view_module_version": "1.2.0",
465
+ "_view_name": "StyleView",
466
+ "button_color": null,
467
+ "font_weight": ""
468
+ }
469
+ },
470
+ "04ebfe640ac443c2909a01a746f4f50f": {
471
+ "model_module": "@jupyter-widgets/base",
472
+ "model_name": "LayoutModel",
473
+ "model_module_version": "1.2.0",
474
+ "state": {
475
+ "_model_module": "@jupyter-widgets/base",
476
+ "_model_module_version": "1.2.0",
477
+ "_model_name": "LayoutModel",
478
+ "_view_count": null,
479
+ "_view_module": "@jupyter-widgets/base",
480
+ "_view_module_version": "1.2.0",
481
+ "_view_name": "LayoutView",
482
+ "align_content": null,
483
+ "align_items": null,
484
+ "align_self": null,
485
+ "border": null,
486
+ "bottom": null,
487
+ "display": null,
488
+ "flex": null,
489
+ "flex_flow": null,
490
+ "grid_area": null,
491
+ "grid_auto_columns": null,
492
+ "grid_auto_flow": null,
493
+ "grid_auto_rows": null,
494
+ "grid_column": null,
495
+ "grid_gap": null,
496
+ "grid_row": null,
497
+ "grid_template_areas": null,
498
+ "grid_template_columns": null,
499
+ "grid_template_rows": null,
500
+ "height": null,
501
+ "justify_content": null,
502
+ "justify_items": null,
503
+ "left": null,
504
+ "margin": null,
505
+ "max_height": null,
506
+ "max_width": null,
507
+ "min_height": null,
508
+ "min_width": null,
509
+ "object_fit": null,
510
+ "object_position": null,
511
+ "order": null,
512
+ "overflow": null,
513
+ "overflow_x": null,
514
+ "overflow_y": null,
515
+ "padding": null,
516
+ "right": null,
517
+ "top": null,
518
+ "visibility": null,
519
+ "width": null
520
+ }
521
+ },
522
+ "206a605c0d8e48818a8bd641b30a41fa": {
523
+ "model_module": "@jupyter-widgets/controls",
524
+ "model_name": "DescriptionStyleModel",
525
+ "model_module_version": "1.5.0",
526
+ "state": {
527
+ "_model_module": "@jupyter-widgets/controls",
528
+ "_model_module_version": "1.5.0",
529
+ "_model_name": "DescriptionStyleModel",
530
+ "_view_count": null,
531
+ "_view_module": "@jupyter-widgets/base",
532
+ "_view_module_version": "1.2.0",
533
+ "_view_name": "StyleView",
534
+ "description_width": ""
535
+ }
536
+ },
537
+ "9b2f397e71214030a79736ae79692948": {
538
+ "model_module": "@jupyter-widgets/controls",
539
+ "model_name": "LabelModel",
540
+ "model_module_version": "1.5.0",
541
+ "state": {
542
+ "_dom_classes": [],
543
+ "_model_module": "@jupyter-widgets/controls",
544
+ "_model_module_version": "1.5.0",
545
+ "_model_name": "LabelModel",
546
+ "_view_count": null,
547
+ "_view_module": "@jupyter-widgets/controls",
548
+ "_view_module_version": "1.5.0",
549
+ "_view_name": "LabelView",
550
+ "description": "",
551
+ "description_tooltip": null,
552
+ "layout": "IPY_MODEL_e94d5db988a14d5b9435fc1c8d93ae77",
553
+ "placeholder": "​",
554
+ "style": "IPY_MODEL_de9523dfa5134c1db057696555d45468",
555
+ "value": "Connecting..."
556
+ }
557
+ },
558
+ "e94d5db988a14d5b9435fc1c8d93ae77": {
559
+ "model_module": "@jupyter-widgets/base",
560
+ "model_name": "LayoutModel",
561
+ "model_module_version": "1.2.0",
562
+ "state": {
563
+ "_model_module": "@jupyter-widgets/base",
564
+ "_model_module_version": "1.2.0",
565
+ "_model_name": "LayoutModel",
566
+ "_view_count": null,
567
+ "_view_module": "@jupyter-widgets/base",
568
+ "_view_module_version": "1.2.0",
569
+ "_view_name": "LayoutView",
570
+ "align_content": null,
571
+ "align_items": null,
572
+ "align_self": null,
573
+ "border": null,
574
+ "bottom": null,
575
+ "display": null,
576
+ "flex": null,
577
+ "flex_flow": null,
578
+ "grid_area": null,
579
+ "grid_auto_columns": null,
580
+ "grid_auto_flow": null,
581
+ "grid_auto_rows": null,
582
+ "grid_column": null,
583
+ "grid_gap": null,
584
+ "grid_row": null,
585
+ "grid_template_areas": null,
586
+ "grid_template_columns": null,
587
+ "grid_template_rows": null,
588
+ "height": null,
589
+ "justify_content": null,
590
+ "justify_items": null,
591
+ "left": null,
592
+ "margin": null,
593
+ "max_height": null,
594
+ "max_width": null,
595
+ "min_height": null,
596
+ "min_width": null,
597
+ "object_fit": null,
598
+ "object_position": null,
599
+ "order": null,
600
+ "overflow": null,
601
+ "overflow_x": null,
602
+ "overflow_y": null,
603
+ "padding": null,
604
+ "right": null,
605
+ "top": null,
606
+ "visibility": null,
607
+ "width": null
608
+ }
609
+ },
610
+ "de9523dfa5134c1db057696555d45468": {
611
+ "model_module": "@jupyter-widgets/controls",
612
+ "model_name": "DescriptionStyleModel",
613
+ "model_module_version": "1.5.0",
614
+ "state": {
615
+ "_model_module": "@jupyter-widgets/controls",
616
+ "_model_module_version": "1.5.0",
617
+ "_model_name": "DescriptionStyleModel",
618
+ "_view_count": null,
619
+ "_view_module": "@jupyter-widgets/base",
620
+ "_view_module_version": "1.2.0",
621
+ "_view_name": "StyleView",
622
+ "description_width": ""
623
+ }
624
+ },
625
+ "920b8b5f45d04be3be5f85ceaccd4cf0": {
626
+ "model_module": "@jupyter-widgets/controls",
627
+ "model_name": "LabelModel",
628
+ "model_module_version": "1.5.0",
629
+ "state": {
630
+ "_dom_classes": [],
631
+ "_model_module": "@jupyter-widgets/controls",
632
+ "_model_module_version": "1.5.0",
633
+ "_model_name": "LabelModel",
634
+ "_view_count": null,
635
+ "_view_module": "@jupyter-widgets/controls",
636
+ "_view_module_version": "1.5.0",
637
+ "_view_name": "LabelView",
638
+ "description": "",
639
+ "description_tooltip": null,
640
+ "layout": "IPY_MODEL_587e87d6a61944da941c7cd2368c701e",
641
+ "placeholder": "​",
642
+ "style": "IPY_MODEL_6c24f9d01ee24347a5a1f6a8c1495bf1",
643
+ "value": "Token is valid (permission: read)."
644
+ }
645
+ },
646
+ "ceb10fa240944d23b03856384a4685e7": {
647
+ "model_module": "@jupyter-widgets/controls",
648
+ "model_name": "LabelModel",
649
+ "model_module_version": "1.5.0",
650
+ "state": {
651
+ "_dom_classes": [],
652
+ "_model_module": "@jupyter-widgets/controls",
653
+ "_model_module_version": "1.5.0",
654
+ "_model_name": "LabelModel",
655
+ "_view_count": null,
656
+ "_view_module": "@jupyter-widgets/controls",
657
+ "_view_module_version": "1.5.0",
658
+ "_view_name": "LabelView",
659
+ "description": "",
660
+ "description_tooltip": null,
661
+ "layout": "IPY_MODEL_addbb553c7a04933874b33aadda425dc",
662
+ "placeholder": "​",
663
+ "style": "IPY_MODEL_a2cab6a9a26945e78e30a6df23da8dc2",
664
+ "value": "Your token has been saved in your configured git credential helpers (store)."
665
+ }
666
+ },
667
+ "a25b243626574c7a87b09a60b0eb355f": {
668
+ "model_module": "@jupyter-widgets/controls",
669
+ "model_name": "LabelModel",
670
+ "model_module_version": "1.5.0",
671
+ "state": {
672
+ "_dom_classes": [],
673
+ "_model_module": "@jupyter-widgets/controls",
674
+ "_model_module_version": "1.5.0",
675
+ "_model_name": "LabelModel",
676
+ "_view_count": null,
677
+ "_view_module": "@jupyter-widgets/controls",
678
+ "_view_module_version": "1.5.0",
679
+ "_view_name": "LabelView",
680
+ "description": "",
681
+ "description_tooltip": null,
682
+ "layout": "IPY_MODEL_f4d326dd84a1409c9b75071a70619098",
683
+ "placeholder": "​",
684
+ "style": "IPY_MODEL_3240097357d24d54977bf06239006f44",
685
+ "value": "Your token has been saved to /root/.cache/huggingface/token"
686
+ }
687
+ },
688
+ "7da3a37544bc4adf82324109e6d9582e": {
689
+ "model_module": "@jupyter-widgets/controls",
690
+ "model_name": "LabelModel",
691
+ "model_module_version": "1.5.0",
692
+ "state": {
693
+ "_dom_classes": [],
694
+ "_model_module": "@jupyter-widgets/controls",
695
+ "_model_module_version": "1.5.0",
696
+ "_model_name": "LabelModel",
697
+ "_view_count": null,
698
+ "_view_module": "@jupyter-widgets/controls",
699
+ "_view_module_version": "1.5.0",
700
+ "_view_name": "LabelView",
701
+ "description": "",
702
+ "description_tooltip": null,
703
+ "layout": "IPY_MODEL_f913dbb00eed46b7a3e431d21ae36061",
704
+ "placeholder": "​",
705
+ "style": "IPY_MODEL_57e9878a8e7d4c879a028c23884351a2",
706
+ "value": "Login successful"
707
+ }
708
+ },
709
+ "587e87d6a61944da941c7cd2368c701e": {
710
+ "model_module": "@jupyter-widgets/base",
711
+ "model_name": "LayoutModel",
712
+ "model_module_version": "1.2.0",
713
+ "state": {
714
+ "_model_module": "@jupyter-widgets/base",
715
+ "_model_module_version": "1.2.0",
716
+ "_model_name": "LayoutModel",
717
+ "_view_count": null,
718
+ "_view_module": "@jupyter-widgets/base",
719
+ "_view_module_version": "1.2.0",
720
+ "_view_name": "LayoutView",
721
+ "align_content": null,
722
+ "align_items": null,
723
+ "align_self": null,
724
+ "border": null,
725
+ "bottom": null,
726
+ "display": null,
727
+ "flex": null,
728
+ "flex_flow": null,
729
+ "grid_area": null,
730
+ "grid_auto_columns": null,
731
+ "grid_auto_flow": null,
732
+ "grid_auto_rows": null,
733
+ "grid_column": null,
734
+ "grid_gap": null,
735
+ "grid_row": null,
736
+ "grid_template_areas": null,
737
+ "grid_template_columns": null,
738
+ "grid_template_rows": null,
739
+ "height": null,
740
+ "justify_content": null,
741
+ "justify_items": null,
742
+ "left": null,
743
+ "margin": null,
744
+ "max_height": null,
745
+ "max_width": null,
746
+ "min_height": null,
747
+ "min_width": null,
748
+ "object_fit": null,
749
+ "object_position": null,
750
+ "order": null,
751
+ "overflow": null,
752
+ "overflow_x": null,
753
+ "overflow_y": null,
754
+ "padding": null,
755
+ "right": null,
756
+ "top": null,
757
+ "visibility": null,
758
+ "width": null
759
+ }
760
+ },
761
+ "6c24f9d01ee24347a5a1f6a8c1495bf1": {
762
+ "model_module": "@jupyter-widgets/controls",
763
+ "model_name": "DescriptionStyleModel",
764
+ "model_module_version": "1.5.0",
765
+ "state": {
766
+ "_model_module": "@jupyter-widgets/controls",
767
+ "_model_module_version": "1.5.0",
768
+ "_model_name": "DescriptionStyleModel",
769
+ "_view_count": null,
770
+ "_view_module": "@jupyter-widgets/base",
771
+ "_view_module_version": "1.2.0",
772
+ "_view_name": "StyleView",
773
+ "description_width": ""
774
+ }
775
+ },
776
+ "addbb553c7a04933874b33aadda425dc": {
777
+ "model_module": "@jupyter-widgets/base",
778
+ "model_name": "LayoutModel",
779
+ "model_module_version": "1.2.0",
780
+ "state": {
781
+ "_model_module": "@jupyter-widgets/base",
782
+ "_model_module_version": "1.2.0",
783
+ "_model_name": "LayoutModel",
784
+ "_view_count": null,
785
+ "_view_module": "@jupyter-widgets/base",
786
+ "_view_module_version": "1.2.0",
787
+ "_view_name": "LayoutView",
788
+ "align_content": null,
789
+ "align_items": null,
790
+ "align_self": null,
791
+ "border": null,
792
+ "bottom": null,
793
+ "display": null,
794
+ "flex": null,
795
+ "flex_flow": null,
796
+ "grid_area": null,
797
+ "grid_auto_columns": null,
798
+ "grid_auto_flow": null,
799
+ "grid_auto_rows": null,
800
+ "grid_column": null,
801
+ "grid_gap": null,
802
+ "grid_row": null,
803
+ "grid_template_areas": null,
804
+ "grid_template_columns": null,
805
+ "grid_template_rows": null,
806
+ "height": null,
807
+ "justify_content": null,
808
+ "justify_items": null,
809
+ "left": null,
810
+ "margin": null,
811
+ "max_height": null,
812
+ "max_width": null,
813
+ "min_height": null,
814
+ "min_width": null,
815
+ "object_fit": null,
816
+ "object_position": null,
817
+ "order": null,
818
+ "overflow": null,
819
+ "overflow_x": null,
820
+ "overflow_y": null,
821
+ "padding": null,
822
+ "right": null,
823
+ "top": null,
824
+ "visibility": null,
825
+ "width": null
826
+ }
827
+ },
828
+ "a2cab6a9a26945e78e30a6df23da8dc2": {
829
+ "model_module": "@jupyter-widgets/controls",
830
+ "model_name": "DescriptionStyleModel",
831
+ "model_module_version": "1.5.0",
832
+ "state": {
833
+ "_model_module": "@jupyter-widgets/controls",
834
+ "_model_module_version": "1.5.0",
835
+ "_model_name": "DescriptionStyleModel",
836
+ "_view_count": null,
837
+ "_view_module": "@jupyter-widgets/base",
838
+ "_view_module_version": "1.2.0",
839
+ "_view_name": "StyleView",
840
+ "description_width": ""
841
+ }
842
+ },
843
+ "f4d326dd84a1409c9b75071a70619098": {
844
+ "model_module": "@jupyter-widgets/base",
845
+ "model_name": "LayoutModel",
846
+ "model_module_version": "1.2.0",
847
+ "state": {
848
+ "_model_module": "@jupyter-widgets/base",
849
+ "_model_module_version": "1.2.0",
850
+ "_model_name": "LayoutModel",
851
+ "_view_count": null,
852
+ "_view_module": "@jupyter-widgets/base",
853
+ "_view_module_version": "1.2.0",
854
+ "_view_name": "LayoutView",
855
+ "align_content": null,
856
+ "align_items": null,
857
+ "align_self": null,
858
+ "border": null,
859
+ "bottom": null,
860
+ "display": null,
861
+ "flex": null,
862
+ "flex_flow": null,
863
+ "grid_area": null,
864
+ "grid_auto_columns": null,
865
+ "grid_auto_flow": null,
866
+ "grid_auto_rows": null,
867
+ "grid_column": null,
868
+ "grid_gap": null,
869
+ "grid_row": null,
870
+ "grid_template_areas": null,
871
+ "grid_template_columns": null,
872
+ "grid_template_rows": null,
873
+ "height": null,
874
+ "justify_content": null,
875
+ "justify_items": null,
876
+ "left": null,
877
+ "margin": null,
878
+ "max_height": null,
879
+ "max_width": null,
880
+ "min_height": null,
881
+ "min_width": null,
882
+ "object_fit": null,
883
+ "object_position": null,
884
+ "order": null,
885
+ "overflow": null,
886
+ "overflow_x": null,
887
+ "overflow_y": null,
888
+ "padding": null,
889
+ "right": null,
890
+ "top": null,
891
+ "visibility": null,
892
+ "width": null
893
+ }
894
+ },
895
+ "3240097357d24d54977bf06239006f44": {
896
+ "model_module": "@jupyter-widgets/controls",
897
+ "model_name": "DescriptionStyleModel",
898
+ "model_module_version": "1.5.0",
899
+ "state": {
900
+ "_model_module": "@jupyter-widgets/controls",
901
+ "_model_module_version": "1.5.0",
902
+ "_model_name": "DescriptionStyleModel",
903
+ "_view_count": null,
904
+ "_view_module": "@jupyter-widgets/base",
905
+ "_view_module_version": "1.2.0",
906
+ "_view_name": "StyleView",
907
+ "description_width": ""
908
+ }
909
+ },
910
+ "f913dbb00eed46b7a3e431d21ae36061": {
911
+ "model_module": "@jupyter-widgets/base",
912
+ "model_name": "LayoutModel",
913
+ "model_module_version": "1.2.0",
914
+ "state": {
915
+ "_model_module": "@jupyter-widgets/base",
916
+ "_model_module_version": "1.2.0",
917
+ "_model_name": "LayoutModel",
918
+ "_view_count": null,
919
+ "_view_module": "@jupyter-widgets/base",
920
+ "_view_module_version": "1.2.0",
921
+ "_view_name": "LayoutView",
922
+ "align_content": null,
923
+ "align_items": null,
924
+ "align_self": null,
925
+ "border": null,
926
+ "bottom": null,
927
+ "display": null,
928
+ "flex": null,
929
+ "flex_flow": null,
930
+ "grid_area": null,
931
+ "grid_auto_columns": null,
932
+ "grid_auto_flow": null,
933
+ "grid_auto_rows": null,
934
+ "grid_column": null,
935
+ "grid_gap": null,
936
+ "grid_row": null,
937
+ "grid_template_areas": null,
938
+ "grid_template_columns": null,
939
+ "grid_template_rows": null,
940
+ "height": null,
941
+ "justify_content": null,
942
+ "justify_items": null,
943
+ "left": null,
944
+ "margin": null,
945
+ "max_height": null,
946
+ "max_width": null,
947
+ "min_height": null,
948
+ "min_width": null,
949
+ "object_fit": null,
950
+ "object_position": null,
951
+ "order": null,
952
+ "overflow": null,
953
+ "overflow_x": null,
954
+ "overflow_y": null,
955
+ "padding": null,
956
+ "right": null,
957
+ "top": null,
958
+ "visibility": null,
959
+ "width": null
960
+ }
961
+ },
962
+ "57e9878a8e7d4c879a028c23884351a2": {
963
+ "model_module": "@jupyter-widgets/controls",
964
+ "model_name": "DescriptionStyleModel",
965
+ "model_module_version": "1.5.0",
966
+ "state": {
967
+ "_model_module": "@jupyter-widgets/controls",
968
+ "_model_module_version": "1.5.0",
969
+ "_model_name": "DescriptionStyleModel",
970
+ "_view_count": null,
971
+ "_view_module": "@jupyter-widgets/base",
972
+ "_view_module_version": "1.2.0",
973
+ "_view_name": "StyleView",
974
+ "description_width": ""
975
+ }
976
+ }
977
+ }
978
+ }
979
+ },
980
+ "cells": [
981
+ {
982
+ "cell_type": "code",
983
+ "source": [
984
+ "!pip install huggingface_hub transformers transformers[sentencepiece]"
985
+ ],
986
+ "metadata": {
987
+ "colab": {
988
+ "base_uri": "https://localhost:8080/"
989
+ },
990
+ "id": "_rbUD_747eUJ",
991
+ "outputId": "17e5ae7b-4c79-439d-b651-86b56da00194"
992
+ },
993
+ "execution_count": 1,
994
+ "outputs": [
995
+ {
996
+ "output_type": "stream",
997
+ "name": "stdout",
998
+ "text": [
999
+ "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.19.3)\n",
1000
+ "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.35.2)\n",
1001
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.13.1)\n",
1002
+ "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2023.6.0)\n",
1003
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.31.0)\n",
1004
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.66.1)\n",
1005
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.1)\n",
1006
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.5.0)\n",
1007
+ "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (23.2)\n",
1008
+ "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.23.5)\n",
1009
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2023.6.3)\n",
1010
+ "Requirement already satisfied: tokenizers<0.19,>=0.14 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.15.0)\n",
1011
+ "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.4.0)\n",
1012
+ "Requirement already satisfied: sentencepiece!=0.1.92,>=0.1.91 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.1.99)\n",
1013
+ "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from transformers) (3.20.3)\n",
1014
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.3.2)\n",
1015
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4)\n",
1016
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.0.7)\n",
1017
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2023.7.22)\n"
1018
+ ]
1019
+ }
1020
+ ]
1021
+ },
1022
+ {
1023
+ "cell_type": "code",
1024
+ "source": [
1025
+ "from huggingface_hub import notebook_login\n",
1026
+ "notebook_login()"
1027
+ ],
1028
+ "metadata": {
1029
+ "colab": {
1030
+ "base_uri": "https://localhost:8080/",
1031
+ "height": 145,
1032
+ "referenced_widgets": [
1033
+ "3de99e8d7a5d4cbfab93a6609fadb166",
1034
+ "ac054215310a44edb3f45bf8d257b830",
1035
+ "e74bfb50dff24f0d8790f213648f9f11",
1036
+ "1aa92ee0539d4187b93e375ec07078c7",
1037
+ "a746790e9a1144f5b7dd4f239a890a7f",
1038
+ "213610d83c704346bf9ff8d8558ab5c8",
1039
+ "3ef7ef8123884d58b5c222245d84b3de",
1040
+ "7326f47690464dbb8ff116d951b2c029",
1041
+ "d230346a0596443f8e2cd0beb90132e0",
1042
+ "089fcdf6573f4c1a84ac45cc524714b4",
1043
+ "8e4205306ddd408284260ef13d23a11a",
1044
+ "fbb582816c6f4c6b80cea28c03986f54",
1045
+ "c5526296e5df4a638c9ea0407fb5fe1f",
1046
+ "1b66175f2ab64c1a962587f4ddcf32ab",
1047
+ "01a7e38799e349ef9d6e778cc9c20cca",
1048
+ "04ebfe640ac443c2909a01a746f4f50f",
1049
+ "206a605c0d8e48818a8bd641b30a41fa",
1050
+ "9b2f397e71214030a79736ae79692948",
1051
+ "e94d5db988a14d5b9435fc1c8d93ae77",
1052
+ "de9523dfa5134c1db057696555d45468",
1053
+ "920b8b5f45d04be3be5f85ceaccd4cf0",
1054
+ "ceb10fa240944d23b03856384a4685e7",
1055
+ "a25b243626574c7a87b09a60b0eb355f",
1056
+ "7da3a37544bc4adf82324109e6d9582e",
1057
+ "587e87d6a61944da941c7cd2368c701e",
1058
+ "6c24f9d01ee24347a5a1f6a8c1495bf1",
1059
+ "addbb553c7a04933874b33aadda425dc",
1060
+ "a2cab6a9a26945e78e30a6df23da8dc2",
1061
+ "f4d326dd84a1409c9b75071a70619098",
1062
+ "3240097357d24d54977bf06239006f44",
1063
+ "f913dbb00eed46b7a3e431d21ae36061",
1064
+ "57e9878a8e7d4c879a028c23884351a2"
1065
+ ]
1066
+ },
1067
+ "id": "kgICqyWk7yyS",
1068
+ "outputId": "ba2da87e-8a04-48b1-97c9-1da10a834653"
1069
+ },
1070
+ "execution_count": 2,
1071
+ "outputs": [
1072
+ {
1073
+ "output_type": "display_data",
1074
+ "data": {
1075
+ "text/plain": [
1076
+ "VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
1077
+ ],
1078
+ "application/vnd.jupyter.widget-view+json": {
1079
+ "version_major": 2,
1080
+ "version_minor": 0,
1081
+ "model_id": "3de99e8d7a5d4cbfab93a6609fadb166"
1082
+ }
1083
+ },
1084
+ "metadata": {}
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ "cell_type": "code",
1090
+ "execution_count": 5,
1091
+ "metadata": {
1092
+ "colab": {
1093
+ "base_uri": "https://localhost:8080/"
1094
+ },
1095
+ "id": "gRNML7M21Nmn",
1096
+ "outputId": "0233d826-96a1-406f-b927-98c215e086f2"
1097
+ },
1098
+ "outputs": [
1099
+ {
1100
+ "output_type": "execute_result",
1101
+ "data": {
1102
+ "text/plain": [
1103
+ "MT5ForConditionalGeneration(\n",
1104
+ " (shared): Embedding(250112, 1024)\n",
1105
+ " (encoder): MT5Stack(\n",
1106
+ " (embed_tokens): Embedding(250112, 1024)\n",
1107
+ " (block): ModuleList(\n",
1108
+ " (0): MT5Block(\n",
1109
+ " (layer): ModuleList(\n",
1110
+ " (0): MT5LayerSelfAttention(\n",
1111
+ " (SelfAttention): MT5Attention(\n",
1112
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1113
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1114
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1115
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1116
+ " (relative_attention_bias): Embedding(32, 16)\n",
1117
+ " )\n",
1118
+ " (layer_norm): MT5LayerNorm()\n",
1119
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1120
+ " )\n",
1121
+ " (1): MT5LayerFF(\n",
1122
+ " (DenseReluDense): MT5DenseGatedActDense(\n",
1123
+ " (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
1124
+ " (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
1125
+ " (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
1126
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1127
+ " (act): NewGELUActivation()\n",
1128
+ " )\n",
1129
+ " (layer_norm): MT5LayerNorm()\n",
1130
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1131
+ " )\n",
1132
+ " )\n",
1133
+ " )\n",
1134
+ " (1-23): 23 x MT5Block(\n",
1135
+ " (layer): ModuleList(\n",
1136
+ " (0): MT5LayerSelfAttention(\n",
1137
+ " (SelfAttention): MT5Attention(\n",
1138
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1139
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1140
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1141
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1142
+ " )\n",
1143
+ " (layer_norm): MT5LayerNorm()\n",
1144
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1145
+ " )\n",
1146
+ " (1): MT5LayerFF(\n",
1147
+ " (DenseReluDense): MT5DenseGatedActDense(\n",
1148
+ " (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
1149
+ " (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
1150
+ " (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
1151
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1152
+ " (act): NewGELUActivation()\n",
1153
+ " )\n",
1154
+ " (layer_norm): MT5LayerNorm()\n",
1155
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1156
+ " )\n",
1157
+ " )\n",
1158
+ " )\n",
1159
+ " )\n",
1160
+ " (final_layer_norm): MT5LayerNorm()\n",
1161
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1162
+ " )\n",
1163
+ " (decoder): MT5Stack(\n",
1164
+ " (embed_tokens): Embedding(250112, 1024)\n",
1165
+ " (block): ModuleList(\n",
1166
+ " (0): MT5Block(\n",
1167
+ " (layer): ModuleList(\n",
1168
+ " (0): MT5LayerSelfAttention(\n",
1169
+ " (SelfAttention): MT5Attention(\n",
1170
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1171
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1172
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1173
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1174
+ " (relative_attention_bias): Embedding(32, 16)\n",
1175
+ " )\n",
1176
+ " (layer_norm): MT5LayerNorm()\n",
1177
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1178
+ " )\n",
1179
+ " (1): MT5LayerCrossAttention(\n",
1180
+ " (EncDecAttention): MT5Attention(\n",
1181
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1182
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1183
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1184
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1185
+ " )\n",
1186
+ " (layer_norm): MT5LayerNorm()\n",
1187
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1188
+ " )\n",
1189
+ " (2): MT5LayerFF(\n",
1190
+ " (DenseReluDense): MT5DenseGatedActDense(\n",
1191
+ " (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
1192
+ " (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
1193
+ " (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
1194
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1195
+ " (act): NewGELUActivation()\n",
1196
+ " )\n",
1197
+ " (layer_norm): MT5LayerNorm()\n",
1198
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1199
+ " )\n",
1200
+ " )\n",
1201
+ " )\n",
1202
+ " (1-23): 23 x MT5Block(\n",
1203
+ " (layer): ModuleList(\n",
1204
+ " (0): MT5LayerSelfAttention(\n",
1205
+ " (SelfAttention): MT5Attention(\n",
1206
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1207
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1208
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1209
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1210
+ " )\n",
1211
+ " (layer_norm): MT5LayerNorm()\n",
1212
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1213
+ " )\n",
1214
+ " (1): MT5LayerCrossAttention(\n",
1215
+ " (EncDecAttention): MT5Attention(\n",
1216
+ " (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
1217
+ " (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
1218
+ " (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
1219
+ " (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
1220
+ " )\n",
1221
+ " (layer_norm): MT5LayerNorm()\n",
1222
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1223
+ " )\n",
1224
+ " (2): MT5LayerFF(\n",
1225
+ " (DenseReluDense): MT5DenseGatedActDense(\n",
1226
+ " (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
1227
+ " (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
1228
+ " (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
1229
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1230
+ " (act): NewGELUActivation()\n",
1231
+ " )\n",
1232
+ " (layer_norm): MT5LayerNorm()\n",
1233
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1234
+ " )\n",
1235
+ " )\n",
1236
+ " )\n",
1237
+ " )\n",
1238
+ " (final_layer_norm): MT5LayerNorm()\n",
1239
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
1240
+ " )\n",
1241
+ " (lm_head): Linear(in_features=1024, out_features=250112, bias=False)\n",
1242
+ ")"
1243
+ ]
1244
+ },
1245
+ "metadata": {},
1246
+ "execution_count": 5
1247
+ }
1248
+ ],
1249
+ "source": [
1250
+ "import torch\n",
1251
+ "from transformers import AutoTokenizer, MT5ForConditionalGeneration\n",
1252
+ "\n",
1253
+ "model_name = 'learningmachineaz/cirtdan-azerbaijani-chatbot'\n",
1254
+ "\n",
1255
+ "device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
1256
+ "tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
1257
+ "model = MT5ForConditionalGeneration.from_pretrained(model_name).to(device)\n",
1258
+ "model.eval()"
1259
+ ]
1260
+ },
1261
+ {
1262
+ "cell_type": "code",
1263
+ "source": [
1264
+ "prompt = \"<SC6>Sən bir oğlansan, müxtəlif məsələlər üzrə məsləhətçi. Çox ağıllısan. Həmsöhbətinə kömək etmək istəyirəm. Dialoqu davam et:\\nHəmsöhbət: salam! necəsən?\\nSən: <extra_id_0>\"\n",
1265
+ "\n",
1266
+ "input_ids = tokenizer.encode(prompt, return_tensors='pt').to(device)\n",
1267
+ "\n",
1268
+ "out_ids = model.generate(\n",
1269
+ " input_ids=input_ids,\n",
1270
+ " do_sample=True,\n",
1271
+ " temperature=0.9,\n",
1272
+ " max_new_tokens=128,\n",
1273
+ " top_p=0.85,\n",
1274
+ " top_k=2,\n",
1275
+ " repetition_penalty=1.2\n",
1276
+ ")\n",
1277
+ "\n",
1278
+ "output = tokenizer.decode(out_ids[0][1:])\n",
1279
+ "\n",
1280
+ "if '</s>' in output:\n",
1281
+ " output = output[:output.find('</s>')].strip()\n",
1282
+ "\n",
1283
+ "output = output.replace('<extra_id_0>', '').strip()\n",
1284
+ "output = output.split('Həmsöhbət')[0].strip()\n",
1285
+ "print(output)"
1286
+ ],
1287
+ "metadata": {
1288
+ "colab": {
1289
+ "base_uri": "https://localhost:8080/"
1290
+ },
1291
+ "id": "IVwZ1iRS1TSc",
1292
+ "outputId": "52878039-1719-4284-ec3b-f79df04629ea"
1293
+ },
1294
+ "execution_count": 7,
1295
+ "outputs": [
1296
+ {
1297
+ "output_type": "stream",
1298
+ "name": "stdout",
1299
+ "text": [
1300
+ "Salam.\n"
1301
+ ]
1302
+ }
1303
+ ]
1304
+ }
1305
+ ]
1306
+ }
README.md CHANGED
@@ -68,6 +68,9 @@ Cırtdan: Bəli, yağış yağdı.
68
 
69
  ## INFERENCE EXAMPLE:
70
 
 
 
 
71
  ```python
72
  import torch
73
  from transformers import AutoTokenizer, MT5ForConditionalGeneration
 
68
 
69
  ## INFERENCE EXAMPLE:
70
 
71
+ You need to install sentencepiece.
72
+ > pip install transformers[sentencepiece]
73
+
74
  ```python
75
  import torch
76
  from transformers import AutoTokenizer, MT5ForConditionalGeneration