Spaces:
Sleeping
Sleeping
Delete SynthaticDataNotebook.ipynb
Browse files- SynthaticDataNotebook.ipynb +0 -1279
SynthaticDataNotebook.ipynb
DELETED
|
@@ -1,1279 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"nbformat": 4,
|
| 3 |
-
"nbformat_minor": 0,
|
| 4 |
-
"metadata": {
|
| 5 |
-
"colab": {
|
| 6 |
-
"provenance": [],
|
| 7 |
-
"gpuType": "A100"
|
| 8 |
-
},
|
| 9 |
-
"kernelspec": {
|
| 10 |
-
"name": "python3",
|
| 11 |
-
"display_name": "Python 3"
|
| 12 |
-
},
|
| 13 |
-
"language_info": {
|
| 14 |
-
"name": "python"
|
| 15 |
-
},
|
| 16 |
-
"accelerator": "GPU",
|
| 17 |
-
"widgets": {
|
| 18 |
-
"application/vnd.jupyter.widget-state+json": {
|
| 19 |
-
"021dfb73b06b49409eb665f99e6d68b8": {
|
| 20 |
-
"model_module": "@jupyter-widgets/controls",
|
| 21 |
-
"model_name": "HBoxModel",
|
| 22 |
-
"model_module_version": "1.5.0",
|
| 23 |
-
"state": {
|
| 24 |
-
"_dom_classes": [],
|
| 25 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 26 |
-
"_model_module_version": "1.5.0",
|
| 27 |
-
"_model_name": "HBoxModel",
|
| 28 |
-
"_view_count": null,
|
| 29 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 30 |
-
"_view_module_version": "1.5.0",
|
| 31 |
-
"_view_name": "HBoxView",
|
| 32 |
-
"box_style": "",
|
| 33 |
-
"children": [
|
| 34 |
-
"IPY_MODEL_28d682aa64274020a5c324c8275271c7",
|
| 35 |
-
"IPY_MODEL_163254837483463bb398c20cac164338",
|
| 36 |
-
"IPY_MODEL_1a8f7d65f8a84f9ca4ab64a462fa532c"
|
| 37 |
-
],
|
| 38 |
-
"layout": "IPY_MODEL_02125d455ac54cd7b4aed904d5727e72"
|
| 39 |
-
}
|
| 40 |
-
},
|
| 41 |
-
"28d682aa64274020a5c324c8275271c7": {
|
| 42 |
-
"model_module": "@jupyter-widgets/controls",
|
| 43 |
-
"model_name": "HTMLModel",
|
| 44 |
-
"model_module_version": "1.5.0",
|
| 45 |
-
"state": {
|
| 46 |
-
"_dom_classes": [],
|
| 47 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 48 |
-
"_model_module_version": "1.5.0",
|
| 49 |
-
"_model_name": "HTMLModel",
|
| 50 |
-
"_view_count": null,
|
| 51 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 52 |
-
"_view_module_version": "1.5.0",
|
| 53 |
-
"_view_name": "HTMLView",
|
| 54 |
-
"description": "",
|
| 55 |
-
"description_tooltip": null,
|
| 56 |
-
"layout": "IPY_MODEL_addaf7abd9094a9eb268d7f26e356087",
|
| 57 |
-
"placeholder": "",
|
| 58 |
-
"style": "IPY_MODEL_62873a225be74d8ca6b7f415316c9f59",
|
| 59 |
-
"value": "Loading checkpoint shards: 100%"
|
| 60 |
-
}
|
| 61 |
-
},
|
| 62 |
-
"163254837483463bb398c20cac164338": {
|
| 63 |
-
"model_module": "@jupyter-widgets/controls",
|
| 64 |
-
"model_name": "FloatProgressModel",
|
| 65 |
-
"model_module_version": "1.5.0",
|
| 66 |
-
"state": {
|
| 67 |
-
"_dom_classes": [],
|
| 68 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 69 |
-
"_model_module_version": "1.5.0",
|
| 70 |
-
"_model_name": "FloatProgressModel",
|
| 71 |
-
"_view_count": null,
|
| 72 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 73 |
-
"_view_module_version": "1.5.0",
|
| 74 |
-
"_view_name": "ProgressView",
|
| 75 |
-
"bar_style": "success",
|
| 76 |
-
"description": "",
|
| 77 |
-
"description_tooltip": null,
|
| 78 |
-
"layout": "IPY_MODEL_42dca9f690824e499ab88331e983ed37",
|
| 79 |
-
"max": 2,
|
| 80 |
-
"min": 0,
|
| 81 |
-
"orientation": "horizontal",
|
| 82 |
-
"style": "IPY_MODEL_14f38a7619754a7092b7fdc0e4567ee5",
|
| 83 |
-
"value": 2
|
| 84 |
-
}
|
| 85 |
-
},
|
| 86 |
-
"1a8f7d65f8a84f9ca4ab64a462fa532c": {
|
| 87 |
-
"model_module": "@jupyter-widgets/controls",
|
| 88 |
-
"model_name": "HTMLModel",
|
| 89 |
-
"model_module_version": "1.5.0",
|
| 90 |
-
"state": {
|
| 91 |
-
"_dom_classes": [],
|
| 92 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 93 |
-
"_model_module_version": "1.5.0",
|
| 94 |
-
"_model_name": "HTMLModel",
|
| 95 |
-
"_view_count": null,
|
| 96 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 97 |
-
"_view_module_version": "1.5.0",
|
| 98 |
-
"_view_name": "HTMLView",
|
| 99 |
-
"description": "",
|
| 100 |
-
"description_tooltip": null,
|
| 101 |
-
"layout": "IPY_MODEL_3597c6f32455478e85fd1176903d969d",
|
| 102 |
-
"placeholder": "",
|
| 103 |
-
"style": "IPY_MODEL_ffc859a7d8ad440e9aaf5899476aa5c3",
|
| 104 |
-
"value": " 2/2 [00:01<00:00, 1.09it/s]"
|
| 105 |
-
}
|
| 106 |
-
},
|
| 107 |
-
"02125d455ac54cd7b4aed904d5727e72": {
|
| 108 |
-
"model_module": "@jupyter-widgets/base",
|
| 109 |
-
"model_name": "LayoutModel",
|
| 110 |
-
"model_module_version": "1.2.0",
|
| 111 |
-
"state": {
|
| 112 |
-
"_model_module": "@jupyter-widgets/base",
|
| 113 |
-
"_model_module_version": "1.2.0",
|
| 114 |
-
"_model_name": "LayoutModel",
|
| 115 |
-
"_view_count": null,
|
| 116 |
-
"_view_module": "@jupyter-widgets/base",
|
| 117 |
-
"_view_module_version": "1.2.0",
|
| 118 |
-
"_view_name": "LayoutView",
|
| 119 |
-
"align_content": null,
|
| 120 |
-
"align_items": null,
|
| 121 |
-
"align_self": null,
|
| 122 |
-
"border": null,
|
| 123 |
-
"bottom": null,
|
| 124 |
-
"display": null,
|
| 125 |
-
"flex": null,
|
| 126 |
-
"flex_flow": null,
|
| 127 |
-
"grid_area": null,
|
| 128 |
-
"grid_auto_columns": null,
|
| 129 |
-
"grid_auto_flow": null,
|
| 130 |
-
"grid_auto_rows": null,
|
| 131 |
-
"grid_column": null,
|
| 132 |
-
"grid_gap": null,
|
| 133 |
-
"grid_row": null,
|
| 134 |
-
"grid_template_areas": null,
|
| 135 |
-
"grid_template_columns": null,
|
| 136 |
-
"grid_template_rows": null,
|
| 137 |
-
"height": null,
|
| 138 |
-
"justify_content": null,
|
| 139 |
-
"justify_items": null,
|
| 140 |
-
"left": null,
|
| 141 |
-
"margin": null,
|
| 142 |
-
"max_height": null,
|
| 143 |
-
"max_width": null,
|
| 144 |
-
"min_height": null,
|
| 145 |
-
"min_width": null,
|
| 146 |
-
"object_fit": null,
|
| 147 |
-
"object_position": null,
|
| 148 |
-
"order": null,
|
| 149 |
-
"overflow": null,
|
| 150 |
-
"overflow_x": null,
|
| 151 |
-
"overflow_y": null,
|
| 152 |
-
"padding": null,
|
| 153 |
-
"right": null,
|
| 154 |
-
"top": null,
|
| 155 |
-
"visibility": null,
|
| 156 |
-
"width": null
|
| 157 |
-
}
|
| 158 |
-
},
|
| 159 |
-
"addaf7abd9094a9eb268d7f26e356087": {
|
| 160 |
-
"model_module": "@jupyter-widgets/base",
|
| 161 |
-
"model_name": "LayoutModel",
|
| 162 |
-
"model_module_version": "1.2.0",
|
| 163 |
-
"state": {
|
| 164 |
-
"_model_module": "@jupyter-widgets/base",
|
| 165 |
-
"_model_module_version": "1.2.0",
|
| 166 |
-
"_model_name": "LayoutModel",
|
| 167 |
-
"_view_count": null,
|
| 168 |
-
"_view_module": "@jupyter-widgets/base",
|
| 169 |
-
"_view_module_version": "1.2.0",
|
| 170 |
-
"_view_name": "LayoutView",
|
| 171 |
-
"align_content": null,
|
| 172 |
-
"align_items": null,
|
| 173 |
-
"align_self": null,
|
| 174 |
-
"border": null,
|
| 175 |
-
"bottom": null,
|
| 176 |
-
"display": null,
|
| 177 |
-
"flex": null,
|
| 178 |
-
"flex_flow": null,
|
| 179 |
-
"grid_area": null,
|
| 180 |
-
"grid_auto_columns": null,
|
| 181 |
-
"grid_auto_flow": null,
|
| 182 |
-
"grid_auto_rows": null,
|
| 183 |
-
"grid_column": null,
|
| 184 |
-
"grid_gap": null,
|
| 185 |
-
"grid_row": null,
|
| 186 |
-
"grid_template_areas": null,
|
| 187 |
-
"grid_template_columns": null,
|
| 188 |
-
"grid_template_rows": null,
|
| 189 |
-
"height": null,
|
| 190 |
-
"justify_content": null,
|
| 191 |
-
"justify_items": null,
|
| 192 |
-
"left": null,
|
| 193 |
-
"margin": null,
|
| 194 |
-
"max_height": null,
|
| 195 |
-
"max_width": null,
|
| 196 |
-
"min_height": null,
|
| 197 |
-
"min_width": null,
|
| 198 |
-
"object_fit": null,
|
| 199 |
-
"object_position": null,
|
| 200 |
-
"order": null,
|
| 201 |
-
"overflow": null,
|
| 202 |
-
"overflow_x": null,
|
| 203 |
-
"overflow_y": null,
|
| 204 |
-
"padding": null,
|
| 205 |
-
"right": null,
|
| 206 |
-
"top": null,
|
| 207 |
-
"visibility": null,
|
| 208 |
-
"width": null
|
| 209 |
-
}
|
| 210 |
-
},
|
| 211 |
-
"62873a225be74d8ca6b7f415316c9f59": {
|
| 212 |
-
"model_module": "@jupyter-widgets/controls",
|
| 213 |
-
"model_name": "DescriptionStyleModel",
|
| 214 |
-
"model_module_version": "1.5.0",
|
| 215 |
-
"state": {
|
| 216 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 217 |
-
"_model_module_version": "1.5.0",
|
| 218 |
-
"_model_name": "DescriptionStyleModel",
|
| 219 |
-
"_view_count": null,
|
| 220 |
-
"_view_module": "@jupyter-widgets/base",
|
| 221 |
-
"_view_module_version": "1.2.0",
|
| 222 |
-
"_view_name": "StyleView",
|
| 223 |
-
"description_width": ""
|
| 224 |
-
}
|
| 225 |
-
},
|
| 226 |
-
"42dca9f690824e499ab88331e983ed37": {
|
| 227 |
-
"model_module": "@jupyter-widgets/base",
|
| 228 |
-
"model_name": "LayoutModel",
|
| 229 |
-
"model_module_version": "1.2.0",
|
| 230 |
-
"state": {
|
| 231 |
-
"_model_module": "@jupyter-widgets/base",
|
| 232 |
-
"_model_module_version": "1.2.0",
|
| 233 |
-
"_model_name": "LayoutModel",
|
| 234 |
-
"_view_count": null,
|
| 235 |
-
"_view_module": "@jupyter-widgets/base",
|
| 236 |
-
"_view_module_version": "1.2.0",
|
| 237 |
-
"_view_name": "LayoutView",
|
| 238 |
-
"align_content": null,
|
| 239 |
-
"align_items": null,
|
| 240 |
-
"align_self": null,
|
| 241 |
-
"border": null,
|
| 242 |
-
"bottom": null,
|
| 243 |
-
"display": null,
|
| 244 |
-
"flex": null,
|
| 245 |
-
"flex_flow": null,
|
| 246 |
-
"grid_area": null,
|
| 247 |
-
"grid_auto_columns": null,
|
| 248 |
-
"grid_auto_flow": null,
|
| 249 |
-
"grid_auto_rows": null,
|
| 250 |
-
"grid_column": null,
|
| 251 |
-
"grid_gap": null,
|
| 252 |
-
"grid_row": null,
|
| 253 |
-
"grid_template_areas": null,
|
| 254 |
-
"grid_template_columns": null,
|
| 255 |
-
"grid_template_rows": null,
|
| 256 |
-
"height": null,
|
| 257 |
-
"justify_content": null,
|
| 258 |
-
"justify_items": null,
|
| 259 |
-
"left": null,
|
| 260 |
-
"margin": null,
|
| 261 |
-
"max_height": null,
|
| 262 |
-
"max_width": null,
|
| 263 |
-
"min_height": null,
|
| 264 |
-
"min_width": null,
|
| 265 |
-
"object_fit": null,
|
| 266 |
-
"object_position": null,
|
| 267 |
-
"order": null,
|
| 268 |
-
"overflow": null,
|
| 269 |
-
"overflow_x": null,
|
| 270 |
-
"overflow_y": null,
|
| 271 |
-
"padding": null,
|
| 272 |
-
"right": null,
|
| 273 |
-
"top": null,
|
| 274 |
-
"visibility": null,
|
| 275 |
-
"width": null
|
| 276 |
-
}
|
| 277 |
-
},
|
| 278 |
-
"14f38a7619754a7092b7fdc0e4567ee5": {
|
| 279 |
-
"model_module": "@jupyter-widgets/controls",
|
| 280 |
-
"model_name": "ProgressStyleModel",
|
| 281 |
-
"model_module_version": "1.5.0",
|
| 282 |
-
"state": {
|
| 283 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 284 |
-
"_model_module_version": "1.5.0",
|
| 285 |
-
"_model_name": "ProgressStyleModel",
|
| 286 |
-
"_view_count": null,
|
| 287 |
-
"_view_module": "@jupyter-widgets/base",
|
| 288 |
-
"_view_module_version": "1.2.0",
|
| 289 |
-
"_view_name": "StyleView",
|
| 290 |
-
"bar_color": null,
|
| 291 |
-
"description_width": ""
|
| 292 |
-
}
|
| 293 |
-
},
|
| 294 |
-
"3597c6f32455478e85fd1176903d969d": {
|
| 295 |
-
"model_module": "@jupyter-widgets/base",
|
| 296 |
-
"model_name": "LayoutModel",
|
| 297 |
-
"model_module_version": "1.2.0",
|
| 298 |
-
"state": {
|
| 299 |
-
"_model_module": "@jupyter-widgets/base",
|
| 300 |
-
"_model_module_version": "1.2.0",
|
| 301 |
-
"_model_name": "LayoutModel",
|
| 302 |
-
"_view_count": null,
|
| 303 |
-
"_view_module": "@jupyter-widgets/base",
|
| 304 |
-
"_view_module_version": "1.2.0",
|
| 305 |
-
"_view_name": "LayoutView",
|
| 306 |
-
"align_content": null,
|
| 307 |
-
"align_items": null,
|
| 308 |
-
"align_self": null,
|
| 309 |
-
"border": null,
|
| 310 |
-
"bottom": null,
|
| 311 |
-
"display": null,
|
| 312 |
-
"flex": null,
|
| 313 |
-
"flex_flow": null,
|
| 314 |
-
"grid_area": null,
|
| 315 |
-
"grid_auto_columns": null,
|
| 316 |
-
"grid_auto_flow": null,
|
| 317 |
-
"grid_auto_rows": null,
|
| 318 |
-
"grid_column": null,
|
| 319 |
-
"grid_gap": null,
|
| 320 |
-
"grid_row": null,
|
| 321 |
-
"grid_template_areas": null,
|
| 322 |
-
"grid_template_columns": null,
|
| 323 |
-
"grid_template_rows": null,
|
| 324 |
-
"height": null,
|
| 325 |
-
"justify_content": null,
|
| 326 |
-
"justify_items": null,
|
| 327 |
-
"left": null,
|
| 328 |
-
"margin": null,
|
| 329 |
-
"max_height": null,
|
| 330 |
-
"max_width": null,
|
| 331 |
-
"min_height": null,
|
| 332 |
-
"min_width": null,
|
| 333 |
-
"object_fit": null,
|
| 334 |
-
"object_position": null,
|
| 335 |
-
"order": null,
|
| 336 |
-
"overflow": null,
|
| 337 |
-
"overflow_x": null,
|
| 338 |
-
"overflow_y": null,
|
| 339 |
-
"padding": null,
|
| 340 |
-
"right": null,
|
| 341 |
-
"top": null,
|
| 342 |
-
"visibility": null,
|
| 343 |
-
"width": null
|
| 344 |
-
}
|
| 345 |
-
},
|
| 346 |
-
"ffc859a7d8ad440e9aaf5899476aa5c3": {
|
| 347 |
-
"model_module": "@jupyter-widgets/controls",
|
| 348 |
-
"model_name": "DescriptionStyleModel",
|
| 349 |
-
"model_module_version": "1.5.0",
|
| 350 |
-
"state": {
|
| 351 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 352 |
-
"_model_module_version": "1.5.0",
|
| 353 |
-
"_model_name": "DescriptionStyleModel",
|
| 354 |
-
"_view_count": null,
|
| 355 |
-
"_view_module": "@jupyter-widgets/base",
|
| 356 |
-
"_view_module_version": "1.2.0",
|
| 357 |
-
"_view_name": "StyleView",
|
| 358 |
-
"description_width": ""
|
| 359 |
-
}
|
| 360 |
-
},
|
| 361 |
-
"435cb436d78c49ca980dd95a3cebe421": {
|
| 362 |
-
"model_module": "@jupyter-widgets/controls",
|
| 363 |
-
"model_name": "HBoxModel",
|
| 364 |
-
"model_module_version": "1.5.0",
|
| 365 |
-
"state": {
|
| 366 |
-
"_dom_classes": [],
|
| 367 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 368 |
-
"_model_module_version": "1.5.0",
|
| 369 |
-
"_model_name": "HBoxModel",
|
| 370 |
-
"_view_count": null,
|
| 371 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 372 |
-
"_view_module_version": "1.5.0",
|
| 373 |
-
"_view_name": "HBoxView",
|
| 374 |
-
"box_style": "",
|
| 375 |
-
"children": [
|
| 376 |
-
"IPY_MODEL_d40ca3c01e8f4fb1a392a3f216a44bb2",
|
| 377 |
-
"IPY_MODEL_ead9762dbbe94cb2bafe4642fb9c6f0a",
|
| 378 |
-
"IPY_MODEL_c1fdaafb686942e0ac3c19ad65b9e821"
|
| 379 |
-
],
|
| 380 |
-
"layout": "IPY_MODEL_d1861cf5cbd44e03a222c08f8746e9aa"
|
| 381 |
-
}
|
| 382 |
-
},
|
| 383 |
-
"d40ca3c01e8f4fb1a392a3f216a44bb2": {
|
| 384 |
-
"model_module": "@jupyter-widgets/controls",
|
| 385 |
-
"model_name": "HTMLModel",
|
| 386 |
-
"model_module_version": "1.5.0",
|
| 387 |
-
"state": {
|
| 388 |
-
"_dom_classes": [],
|
| 389 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 390 |
-
"_model_module_version": "1.5.0",
|
| 391 |
-
"_model_name": "HTMLModel",
|
| 392 |
-
"_view_count": null,
|
| 393 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 394 |
-
"_view_module_version": "1.5.0",
|
| 395 |
-
"_view_name": "HTMLView",
|
| 396 |
-
"description": "",
|
| 397 |
-
"description_tooltip": null,
|
| 398 |
-
"layout": "IPY_MODEL_21ccc63b38744bcab0365e8f331198e2",
|
| 399 |
-
"placeholder": "",
|
| 400 |
-
"style": "IPY_MODEL_df44b0e0d95047a4948b12e601b6b308",
|
| 401 |
-
"value": "Generating chunks: 100%"
|
| 402 |
-
}
|
| 403 |
-
},
|
| 404 |
-
"ead9762dbbe94cb2bafe4642fb9c6f0a": {
|
| 405 |
-
"model_module": "@jupyter-widgets/controls",
|
| 406 |
-
"model_name": "FloatProgressModel",
|
| 407 |
-
"model_module_version": "1.5.0",
|
| 408 |
-
"state": {
|
| 409 |
-
"_dom_classes": [],
|
| 410 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 411 |
-
"_model_module_version": "1.5.0",
|
| 412 |
-
"_model_name": "FloatProgressModel",
|
| 413 |
-
"_view_count": null,
|
| 414 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 415 |
-
"_view_module_version": "1.5.0",
|
| 416 |
-
"_view_name": "ProgressView",
|
| 417 |
-
"bar_style": "success",
|
| 418 |
-
"description": "",
|
| 419 |
-
"description_tooltip": null,
|
| 420 |
-
"layout": "IPY_MODEL_5f06170477f647d58afc6bc6e56b06c2",
|
| 421 |
-
"max": 19,
|
| 422 |
-
"min": 0,
|
| 423 |
-
"orientation": "horizontal",
|
| 424 |
-
"style": "IPY_MODEL_892367ccca2b4bfea0375d96c4cd4529",
|
| 425 |
-
"value": 19
|
| 426 |
-
}
|
| 427 |
-
},
|
| 428 |
-
"c1fdaafb686942e0ac3c19ad65b9e821": {
|
| 429 |
-
"model_module": "@jupyter-widgets/controls",
|
| 430 |
-
"model_name": "HTMLModel",
|
| 431 |
-
"model_module_version": "1.5.0",
|
| 432 |
-
"state": {
|
| 433 |
-
"_dom_classes": [],
|
| 434 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 435 |
-
"_model_module_version": "1.5.0",
|
| 436 |
-
"_model_name": "HTMLModel",
|
| 437 |
-
"_view_count": null,
|
| 438 |
-
"_view_module": "@jupyter-widgets/controls",
|
| 439 |
-
"_view_module_version": "1.5.0",
|
| 440 |
-
"_view_name": "HTMLView",
|
| 441 |
-
"description": "",
|
| 442 |
-
"description_tooltip": null,
|
| 443 |
-
"layout": "IPY_MODEL_674c3b03b1c745049afa94a99925c350",
|
| 444 |
-
"placeholder": "",
|
| 445 |
-
"style": "IPY_MODEL_5382034d7d96491bb5e7762b5b326c58",
|
| 446 |
-
"value": " 19/19 [20:49<00:00, 65.81s/it]"
|
| 447 |
-
}
|
| 448 |
-
},
|
| 449 |
-
"d1861cf5cbd44e03a222c08f8746e9aa": {
|
| 450 |
-
"model_module": "@jupyter-widgets/base",
|
| 451 |
-
"model_name": "LayoutModel",
|
| 452 |
-
"model_module_version": "1.2.0",
|
| 453 |
-
"state": {
|
| 454 |
-
"_model_module": "@jupyter-widgets/base",
|
| 455 |
-
"_model_module_version": "1.2.0",
|
| 456 |
-
"_model_name": "LayoutModel",
|
| 457 |
-
"_view_count": null,
|
| 458 |
-
"_view_module": "@jupyter-widgets/base",
|
| 459 |
-
"_view_module_version": "1.2.0",
|
| 460 |
-
"_view_name": "LayoutView",
|
| 461 |
-
"align_content": null,
|
| 462 |
-
"align_items": null,
|
| 463 |
-
"align_self": null,
|
| 464 |
-
"border": null,
|
| 465 |
-
"bottom": null,
|
| 466 |
-
"display": null,
|
| 467 |
-
"flex": null,
|
| 468 |
-
"flex_flow": null,
|
| 469 |
-
"grid_area": null,
|
| 470 |
-
"grid_auto_columns": null,
|
| 471 |
-
"grid_auto_flow": null,
|
| 472 |
-
"grid_auto_rows": null,
|
| 473 |
-
"grid_column": null,
|
| 474 |
-
"grid_gap": null,
|
| 475 |
-
"grid_row": null,
|
| 476 |
-
"grid_template_areas": null,
|
| 477 |
-
"grid_template_columns": null,
|
| 478 |
-
"grid_template_rows": null,
|
| 479 |
-
"height": null,
|
| 480 |
-
"justify_content": null,
|
| 481 |
-
"justify_items": null,
|
| 482 |
-
"left": null,
|
| 483 |
-
"margin": null,
|
| 484 |
-
"max_height": null,
|
| 485 |
-
"max_width": null,
|
| 486 |
-
"min_height": null,
|
| 487 |
-
"min_width": null,
|
| 488 |
-
"object_fit": null,
|
| 489 |
-
"object_position": null,
|
| 490 |
-
"order": null,
|
| 491 |
-
"overflow": null,
|
| 492 |
-
"overflow_x": null,
|
| 493 |
-
"overflow_y": null,
|
| 494 |
-
"padding": null,
|
| 495 |
-
"right": null,
|
| 496 |
-
"top": null,
|
| 497 |
-
"visibility": null,
|
| 498 |
-
"width": null
|
| 499 |
-
}
|
| 500 |
-
},
|
| 501 |
-
"21ccc63b38744bcab0365e8f331198e2": {
|
| 502 |
-
"model_module": "@jupyter-widgets/base",
|
| 503 |
-
"model_name": "LayoutModel",
|
| 504 |
-
"model_module_version": "1.2.0",
|
| 505 |
-
"state": {
|
| 506 |
-
"_model_module": "@jupyter-widgets/base",
|
| 507 |
-
"_model_module_version": "1.2.0",
|
| 508 |
-
"_model_name": "LayoutModel",
|
| 509 |
-
"_view_count": null,
|
| 510 |
-
"_view_module": "@jupyter-widgets/base",
|
| 511 |
-
"_view_module_version": "1.2.0",
|
| 512 |
-
"_view_name": "LayoutView",
|
| 513 |
-
"align_content": null,
|
| 514 |
-
"align_items": null,
|
| 515 |
-
"align_self": null,
|
| 516 |
-
"border": null,
|
| 517 |
-
"bottom": null,
|
| 518 |
-
"display": null,
|
| 519 |
-
"flex": null,
|
| 520 |
-
"flex_flow": null,
|
| 521 |
-
"grid_area": null,
|
| 522 |
-
"grid_auto_columns": null,
|
| 523 |
-
"grid_auto_flow": null,
|
| 524 |
-
"grid_auto_rows": null,
|
| 525 |
-
"grid_column": null,
|
| 526 |
-
"grid_gap": null,
|
| 527 |
-
"grid_row": null,
|
| 528 |
-
"grid_template_areas": null,
|
| 529 |
-
"grid_template_columns": null,
|
| 530 |
-
"grid_template_rows": null,
|
| 531 |
-
"height": null,
|
| 532 |
-
"justify_content": null,
|
| 533 |
-
"justify_items": null,
|
| 534 |
-
"left": null,
|
| 535 |
-
"margin": null,
|
| 536 |
-
"max_height": null,
|
| 537 |
-
"max_width": null,
|
| 538 |
-
"min_height": null,
|
| 539 |
-
"min_width": null,
|
| 540 |
-
"object_fit": null,
|
| 541 |
-
"object_position": null,
|
| 542 |
-
"order": null,
|
| 543 |
-
"overflow": null,
|
| 544 |
-
"overflow_x": null,
|
| 545 |
-
"overflow_y": null,
|
| 546 |
-
"padding": null,
|
| 547 |
-
"right": null,
|
| 548 |
-
"top": null,
|
| 549 |
-
"visibility": null,
|
| 550 |
-
"width": null
|
| 551 |
-
}
|
| 552 |
-
},
|
| 553 |
-
"df44b0e0d95047a4948b12e601b6b308": {
|
| 554 |
-
"model_module": "@jupyter-widgets/controls",
|
| 555 |
-
"model_name": "DescriptionStyleModel",
|
| 556 |
-
"model_module_version": "1.5.0",
|
| 557 |
-
"state": {
|
| 558 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 559 |
-
"_model_module_version": "1.5.0",
|
| 560 |
-
"_model_name": "DescriptionStyleModel",
|
| 561 |
-
"_view_count": null,
|
| 562 |
-
"_view_module": "@jupyter-widgets/base",
|
| 563 |
-
"_view_module_version": "1.2.0",
|
| 564 |
-
"_view_name": "StyleView",
|
| 565 |
-
"description_width": ""
|
| 566 |
-
}
|
| 567 |
-
},
|
| 568 |
-
"5f06170477f647d58afc6bc6e56b06c2": {
|
| 569 |
-
"model_module": "@jupyter-widgets/base",
|
| 570 |
-
"model_name": "LayoutModel",
|
| 571 |
-
"model_module_version": "1.2.0",
|
| 572 |
-
"state": {
|
| 573 |
-
"_model_module": "@jupyter-widgets/base",
|
| 574 |
-
"_model_module_version": "1.2.0",
|
| 575 |
-
"_model_name": "LayoutModel",
|
| 576 |
-
"_view_count": null,
|
| 577 |
-
"_view_module": "@jupyter-widgets/base",
|
| 578 |
-
"_view_module_version": "1.2.0",
|
| 579 |
-
"_view_name": "LayoutView",
|
| 580 |
-
"align_content": null,
|
| 581 |
-
"align_items": null,
|
| 582 |
-
"align_self": null,
|
| 583 |
-
"border": null,
|
| 584 |
-
"bottom": null,
|
| 585 |
-
"display": null,
|
| 586 |
-
"flex": null,
|
| 587 |
-
"flex_flow": null,
|
| 588 |
-
"grid_area": null,
|
| 589 |
-
"grid_auto_columns": null,
|
| 590 |
-
"grid_auto_flow": null,
|
| 591 |
-
"grid_auto_rows": null,
|
| 592 |
-
"grid_column": null,
|
| 593 |
-
"grid_gap": null,
|
| 594 |
-
"grid_row": null,
|
| 595 |
-
"grid_template_areas": null,
|
| 596 |
-
"grid_template_columns": null,
|
| 597 |
-
"grid_template_rows": null,
|
| 598 |
-
"height": null,
|
| 599 |
-
"justify_content": null,
|
| 600 |
-
"justify_items": null,
|
| 601 |
-
"left": null,
|
| 602 |
-
"margin": null,
|
| 603 |
-
"max_height": null,
|
| 604 |
-
"max_width": null,
|
| 605 |
-
"min_height": null,
|
| 606 |
-
"min_width": null,
|
| 607 |
-
"object_fit": null,
|
| 608 |
-
"object_position": null,
|
| 609 |
-
"order": null,
|
| 610 |
-
"overflow": null,
|
| 611 |
-
"overflow_x": null,
|
| 612 |
-
"overflow_y": null,
|
| 613 |
-
"padding": null,
|
| 614 |
-
"right": null,
|
| 615 |
-
"top": null,
|
| 616 |
-
"visibility": null,
|
| 617 |
-
"width": null
|
| 618 |
-
}
|
| 619 |
-
},
|
| 620 |
-
"892367ccca2b4bfea0375d96c4cd4529": {
|
| 621 |
-
"model_module": "@jupyter-widgets/controls",
|
| 622 |
-
"model_name": "ProgressStyleModel",
|
| 623 |
-
"model_module_version": "1.5.0",
|
| 624 |
-
"state": {
|
| 625 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 626 |
-
"_model_module_version": "1.5.0",
|
| 627 |
-
"_model_name": "ProgressStyleModel",
|
| 628 |
-
"_view_count": null,
|
| 629 |
-
"_view_module": "@jupyter-widgets/base",
|
| 630 |
-
"_view_module_version": "1.2.0",
|
| 631 |
-
"_view_name": "StyleView",
|
| 632 |
-
"bar_color": null,
|
| 633 |
-
"description_width": ""
|
| 634 |
-
}
|
| 635 |
-
},
|
| 636 |
-
"674c3b03b1c745049afa94a99925c350": {
|
| 637 |
-
"model_module": "@jupyter-widgets/base",
|
| 638 |
-
"model_name": "LayoutModel",
|
| 639 |
-
"model_module_version": "1.2.0",
|
| 640 |
-
"state": {
|
| 641 |
-
"_model_module": "@jupyter-widgets/base",
|
| 642 |
-
"_model_module_version": "1.2.0",
|
| 643 |
-
"_model_name": "LayoutModel",
|
| 644 |
-
"_view_count": null,
|
| 645 |
-
"_view_module": "@jupyter-widgets/base",
|
| 646 |
-
"_view_module_version": "1.2.0",
|
| 647 |
-
"_view_name": "LayoutView",
|
| 648 |
-
"align_content": null,
|
| 649 |
-
"align_items": null,
|
| 650 |
-
"align_self": null,
|
| 651 |
-
"border": null,
|
| 652 |
-
"bottom": null,
|
| 653 |
-
"display": null,
|
| 654 |
-
"flex": null,
|
| 655 |
-
"flex_flow": null,
|
| 656 |
-
"grid_area": null,
|
| 657 |
-
"grid_auto_columns": null,
|
| 658 |
-
"grid_auto_flow": null,
|
| 659 |
-
"grid_auto_rows": null,
|
| 660 |
-
"grid_column": null,
|
| 661 |
-
"grid_gap": null,
|
| 662 |
-
"grid_row": null,
|
| 663 |
-
"grid_template_areas": null,
|
| 664 |
-
"grid_template_columns": null,
|
| 665 |
-
"grid_template_rows": null,
|
| 666 |
-
"height": null,
|
| 667 |
-
"justify_content": null,
|
| 668 |
-
"justify_items": null,
|
| 669 |
-
"left": null,
|
| 670 |
-
"margin": null,
|
| 671 |
-
"max_height": null,
|
| 672 |
-
"max_width": null,
|
| 673 |
-
"min_height": null,
|
| 674 |
-
"min_width": null,
|
| 675 |
-
"object_fit": null,
|
| 676 |
-
"object_position": null,
|
| 677 |
-
"order": null,
|
| 678 |
-
"overflow": null,
|
| 679 |
-
"overflow_x": null,
|
| 680 |
-
"overflow_y": null,
|
| 681 |
-
"padding": null,
|
| 682 |
-
"right": null,
|
| 683 |
-
"top": null,
|
| 684 |
-
"visibility": null,
|
| 685 |
-
"width": null
|
| 686 |
-
}
|
| 687 |
-
},
|
| 688 |
-
"5382034d7d96491bb5e7762b5b326c58": {
|
| 689 |
-
"model_module": "@jupyter-widgets/controls",
|
| 690 |
-
"model_name": "DescriptionStyleModel",
|
| 691 |
-
"model_module_version": "1.5.0",
|
| 692 |
-
"state": {
|
| 693 |
-
"_model_module": "@jupyter-widgets/controls",
|
| 694 |
-
"_model_module_version": "1.5.0",
|
| 695 |
-
"_model_name": "DescriptionStyleModel",
|
| 696 |
-
"_view_count": null,
|
| 697 |
-
"_view_module": "@jupyter-widgets/base",
|
| 698 |
-
"_view_module_version": "1.2.0",
|
| 699 |
-
"_view_name": "StyleView",
|
| 700 |
-
"description_width": ""
|
| 701 |
-
}
|
| 702 |
-
}
|
| 703 |
-
}
|
| 704 |
-
}
|
| 705 |
-
},
|
| 706 |
-
"cells": [
|
| 707 |
-
{
|
| 708 |
-
"cell_type": "markdown",
|
| 709 |
-
"source": [
|
| 710 |
-
"# Final Project DS Course"
|
| 711 |
-
],
|
| 712 |
-
"metadata": {
|
| 713 |
-
"id": "_64vlsYnLasu"
|
| 714 |
-
}
|
| 715 |
-
},
|
| 716 |
-
{
|
| 717 |
-
"cell_type": "markdown",
|
| 718 |
-
"source": [
|
| 719 |
-
"## Part 1: Synthetic Data Generation"
|
| 720 |
-
],
|
| 721 |
-
"metadata": {
|
| 722 |
-
"id": "JkWTOu9TMGHS"
|
| 723 |
-
}
|
| 724 |
-
},
|
| 725 |
-
{
|
| 726 |
-
"cell_type": "markdown",
|
| 727 |
-
"source": [
|
| 728 |
-
"**Project Overview:**\n",
|
| 729 |
-
"This project involves building an AI-powered application that digitizes handwritten recipes from images using Optical Character Recognition (OCR) and Natural Language Processing. By generating vector embeddings of the extracted text, the system identifies and retrieves three semantically similar recipes from a synthetically generated dataset of 10,000 entries. The final solution is deployed as an interactive web interface on Hugging Face Spaces, bridging the gap between physical archives and digital accessibility."
|
| 730 |
-
],
|
| 731 |
-
"metadata": {
|
| 732 |
-
"id": "IgUr5Or9L_0y"
|
| 733 |
-
}
|
| 734 |
-
},
|
| 735 |
-
{
|
| 736 |
-
"cell_type": "code",
|
| 737 |
-
"source": [
|
| 738 |
-
"!pip install -q -U transformers torch accelerate pandas tqdm\n",
|
| 739 |
-
"print(\"✅ Installations complete.\")"
|
| 740 |
-
],
|
| 741 |
-
"metadata": {
|
| 742 |
-
"colab": {
|
| 743 |
-
"base_uri": "https://localhost:8080/"
|
| 744 |
-
},
|
| 745 |
-
"id": "j8Ws9fnAZGEb",
|
| 746 |
-
"outputId": "9556a8c4-d980-4366-d4bc-d18218ad33bf"
|
| 747 |
-
},
|
| 748 |
-
"execution_count": 10,
|
| 749 |
-
"outputs": [
|
| 750 |
-
{
|
| 751 |
-
"output_type": "stream",
|
| 752 |
-
"name": "stdout",
|
| 753 |
-
"text": [
|
| 754 |
-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m91.2/91.2 kB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 755 |
-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.4/12.4 MB\u001b[0m \u001b[31m137.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 756 |
-
"\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
|
| 757 |
-
"google-colab 1.0.0 requires pandas==2.2.2, but you have pandas 2.3.3 which is incompatible.\u001b[0m\u001b[31m\n",
|
| 758 |
-
"\u001b[0m✅ Installations complete.\n"
|
| 759 |
-
]
|
| 760 |
-
}
|
| 761 |
-
]
|
| 762 |
-
},
|
| 763 |
-
{
|
| 764 |
-
"cell_type": "code",
|
| 765 |
-
"source": [
|
| 766 |
-
"# ================================\n",
|
| 767 |
-
"# ONE-SHOT: FAST + STABLE 10K RECIPE GENERATION (A100 OPTIMIZED)\n",
|
| 768 |
-
"# Saves JSONL incrementally + exports CSV at end\n",
|
| 769 |
-
"# ================================\n",
|
| 770 |
-
"\n",
|
| 771 |
-
"import os, json, random, re, time\n",
|
| 772 |
-
"import pandas as pd\n",
|
| 773 |
-
"from tqdm.auto import tqdm\n",
|
| 774 |
-
"\n",
|
| 775 |
-
"import torch\n",
|
| 776 |
-
"from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM\n",
|
| 777 |
-
"\n",
|
| 778 |
-
"# ----------------\n",
|
| 779 |
-
"# 1) SETTINGS\n",
|
| 780 |
-
"# ----------------\n",
|
| 781 |
-
"TARGET_COUNT = 10_000\n",
|
| 782 |
-
"SAVE_EVERY = 500 # Chunk size saved to disk each loop\n",
|
| 783 |
-
"BATCH_SIZE = 64 # Optimized for A100 (High throughput)\n",
|
| 784 |
-
"MAX_NEW_TOKENS = 150 # Keeps recipes concise but complete\n",
|
| 785 |
-
"OUT_JSONL = \"RecipeData_10K.jsonl\"\n",
|
| 786 |
-
"OUT_CSV = \"RecipeData_10K.csv\"\n",
|
| 787 |
-
"\n",
|
| 788 |
-
"# Model: Qwen 2.5 3B (Fast, smart, excellent instruction following)\n",
|
| 789 |
-
"MODEL_ID = \"Qwen/Qwen2.5-3B-Instruct\"\n",
|
| 790 |
-
"\n",
|
| 791 |
-
"# ----------------\n",
|
| 792 |
-
"# 2) EXAMPLE TEMPLATE\n",
|
| 793 |
-
"# ----------------\n",
|
| 794 |
-
"grandma_template = \"\"\"\n",
|
| 795 |
-
"Title: Granma's Meatballs\n",
|
| 796 |
-
"Ingredients:\n",
|
| 797 |
-
"- Meat 1kg\n",
|
| 798 |
-
"- Tomatos 8\n",
|
| 799 |
-
"- Onion (as much as you like)\n",
|
| 800 |
-
"- Spices: salt, pepper, chili\n",
|
| 801 |
-
"- Parsley\n",
|
| 802 |
-
"- Bread crumbs (2 spoons)\n",
|
| 803 |
-
"Instructions:\n",
|
| 804 |
-
"In one bowl mix it all, eventually create the meat balls, put in a pot, and cook it all for 40 minutes approximately.\n",
|
| 805 |
-
"<END_RECIPE>\n",
|
| 806 |
-
"\"\"\".strip()\n",
|
| 807 |
-
"\n",
|
| 808 |
-
"# ----------------\n",
|
| 809 |
-
"# 3) MENU GENERATOR\n",
|
| 810 |
-
"# ----------------\n",
|
| 811 |
-
"cuisine_profiles = {\n",
|
| 812 |
-
" \"Italian\": {\n",
|
| 813 |
-
" \"adjs\": [\"Classic\",\"Rustic\",\"Creamy\",\"Baked\",\"Cheesy\",\"Tomato-Basil\",\"Garlic\",\"Sicilian\",\"Tuscan\",\"Spicy\",\"Homemade\",\"Nonna's\"],\n",
|
| 814 |
-
" \"mains\": [\"Pasta\",\"Risotto\",\"Lasagna\",\"Chicken Parmesan\",\"Gnocchi\",\"Polenta\",\"Ravioli\",\"Meatballs\",\"Ziti\",\"Alfredo\"],\n",
|
| 815 |
-
" \"extras\": [\"with Mushrooms\",\"with Spinach\",\"Al Forno\",\"Primavera\",\"Supremo\",\"Rustica\",\"Delight\",\"Special\"]\n",
|
| 816 |
-
" },\n",
|
| 817 |
-
" \"Mediterranean\": {\n",
|
| 818 |
-
" \"adjs\": [\"Spicy\",\"Fresh\",\"Roasted\",\"Grandma's\",\"Tahini-Drizzled\",\"Zesty\",\"Lemon\",\"Grilled\",\"Golden\",\"Herbed\"],\n",
|
| 819 |
-
" \"mains\": [\"Shakshuka\",\"Eggplant\",\"Falafel\",\"Hummus Plate\",\"Kebab\",\"Couscous\",\"Shawarma\",\"Lamb Chops\",\"Fish Fillet\"],\n",
|
| 820 |
-
" \"extras\": [\"with Pita\",\"Bowl\",\"Platter\",\"Salad\",\"Stew\",\"with Yogurt Sauce\",\"Feast\",\"Medley\"]\n",
|
| 821 |
-
" },\n",
|
| 822 |
-
" \"Asian_Fusion\": {\n",
|
| 823 |
-
" \"adjs\": [\"Spicy\",\"Golden\",\"Soy-Glazed\",\"Ginger\",\"Crispy\",\"Steamed\",\"Wok-Fried\",\"Teriyaki\",\"Szechuan\",\"Sweet & Sour\"],\n",
|
| 824 |
-
" \"mains\": [\"Chicken\",\"Tofu\",\"Beef\",\"Rice Bowl\",\"Noodles\",\"Dumplings\",\"Stir-Fry\",\"Duck\",\"Prawns\"],\n",
|
| 825 |
-
" \"extras\": [\"Delight\",\"Surprise\",\"Box\",\"Feast\",\"with Cashews\",\"with Broccoli\",\"Dragon Style\"]\n",
|
| 826 |
-
" },\n",
|
| 827 |
-
" \"Dessert\": {\n",
|
| 828 |
-
" \"adjs\": [\"Sweet\",\"Chocolate\",\"Fluffy\",\"Cinnamon\",\"Glazed\",\"Homemade\",\"Vanilla\",\"Berry\",\"Dark\",\"Creamy\"],\n",
|
| 829 |
-
" \"mains\": [\"Cake\",\"Cookies\",\"Apple Pie\",\"Brownies\",\"Pudding\",\"Rugelach\",\"Muffins\",\"Cheesecake\",\"Tart\"],\n",
|
| 830 |
-
" \"extras\": [\"Swirl\",\"Crumble\",\"Bites\",\"Bars\",\"Supreme\",\"Dream\",\"Celebration\"]\n",
|
| 831 |
-
" }\n",
|
| 832 |
-
"}\n",
|
| 833 |
-
"\n",
|
| 834 |
-
"def build_prompts(target_count: int):\n",
|
| 835 |
-
" prompt_data = []\n",
|
| 836 |
-
" per_cuisine = max(1, target_count // len(cuisine_profiles))\n",
|
| 837 |
-
"\n",
|
| 838 |
-
" for cuisine, data in cuisine_profiles.items():\n",
|
| 839 |
-
" for _ in range(per_cuisine):\n",
|
| 840 |
-
" dish_name = f\"{random.choice(data['adjs'])} {cuisine} {random.choice(data['mains'])} {random.choice(data['extras'])}\"\n",
|
| 841 |
-
"\n",
|
| 842 |
-
" prompt = f\"\"\"<|im_start|>system\n",
|
| 843 |
-
"You are a helpful assistant. Follow the exact format of the example provided. Be brief.\n",
|
| 844 |
-
"Rules:\n",
|
| 845 |
-
"- Keep output short.\n",
|
| 846 |
-
"- MUST include: Title:, Ingredients:, Instructions:\n",
|
| 847 |
-
"- MUST end with: <END_RECIPE>\n",
|
| 848 |
-
"- Output ONLY the recipe (no extra commentary).\n",
|
| 849 |
-
"<|im_end|>\n",
|
| 850 |
-
"<|im_start|>user\n",
|
| 851 |
-
"Example:\n",
|
| 852 |
-
"{grandma_template}\n",
|
| 853 |
-
"\n",
|
| 854 |
-
"Task:\n",
|
| 855 |
-
"Generate a recipe for '{dish_name}' using exactly the same style and format.\n",
|
| 856 |
-
"<|im_end|>\n",
|
| 857 |
-
"<|im_start|>assistant\n",
|
| 858 |
-
"\"\"\"\n",
|
| 859 |
-
" prompt_data.append({\"title\": dish_name, \"prompt\": prompt})\n",
|
| 860 |
-
"\n",
|
| 861 |
-
" # Fill gaps if needed\n",
|
| 862 |
-
" while len(prompt_data) < target_count:\n",
|
| 863 |
-
" prompt_data.append(random.choice(prompt_data))\n",
|
| 864 |
-
"\n",
|
| 865 |
-
" random.shuffle(prompt_data)\n",
|
| 866 |
-
" return prompt_data[:target_count]\n",
|
| 867 |
-
"\n",
|
| 868 |
-
"# ----------------\n",
|
| 869 |
-
"# 4) PARSER\n",
|
| 870 |
-
"# ----------------\n",
|
| 871 |
-
"def parse_recipe(clean_text: str, fallback_title: str):\n",
|
| 872 |
-
" # cut anything after delimiter\n",
|
| 873 |
-
" if \"<END_RECIPE>\" in clean_text:\n",
|
| 874 |
-
" clean_text = clean_text.split(\"<END_RECIPE>\")[0].strip()\n",
|
| 875 |
-
"\n",
|
| 876 |
-
" title = fallback_title\n",
|
| 877 |
-
" ingredients = \"Parse Error\"\n",
|
| 878 |
-
" instructions = clean_text\n",
|
| 879 |
-
"\n",
|
| 880 |
-
" # Title\n",
|
| 881 |
-
" m = re.search(r'(?im)^\\s*Title:\\s*(.+)\\s*$', clean_text)\n",
|
| 882 |
-
" if m:\n",
|
| 883 |
-
" title = m.group(1).strip()\n",
|
| 884 |
-
"\n",
|
| 885 |
-
" # Ingredients / Instructions blocks\n",
|
| 886 |
-
" parts = re.split(r'(?im)^\\s*Ingredients:\\s*$|^\\s*Instructions:\\s*$', clean_text)\n",
|
| 887 |
-
" if len(parts) >= 3:\n",
|
| 888 |
-
" ingredients = parts[1].strip()\n",
|
| 889 |
-
" instructions = parts[2].strip()\n",
|
| 890 |
-
"\n",
|
| 891 |
-
" return title, ingredients, instructions, clean_text\n",
|
| 892 |
-
"\n",
|
| 893 |
-
"# ----------------\n",
|
| 894 |
-
"# 5) PIPELINE SETUP\n",
|
| 895 |
-
"# ----------------\n",
|
| 896 |
-
"print(f\"CUDA Available: {torch.cuda.is_available()}\")\n",
|
| 897 |
-
"dtype = torch.float16 if torch.cuda.is_available() else torch.float32\n",
|
| 898 |
-
"\n",
|
| 899 |
-
"tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, use_fast=True)\n",
|
| 900 |
-
"model = AutoModelForCausalLM.from_pretrained(\n",
|
| 901 |
-
" MODEL_ID,\n",
|
| 902 |
-
" torch_dtype=dtype,\n",
|
| 903 |
-
" device_map=\"auto\"\n",
|
| 904 |
-
")\n",
|
| 905 |
-
"\n",
|
| 906 |
-
"if tokenizer.pad_token_id is None:\n",
|
| 907 |
-
" tokenizer.pad_token = tokenizer.eos_token\n",
|
| 908 |
-
"\n",
|
| 909 |
-
"# Removed 'device=device' argument to prevent conflicts with device_map\n",
|
| 910 |
-
"pipe = pipeline(\n",
|
| 911 |
-
" \"text-generation\",\n",
|
| 912 |
-
" model=model,\n",
|
| 913 |
-
" tokenizer=tokenizer\n",
|
| 914 |
-
")\n",
|
| 915 |
-
"\n",
|
| 916 |
-
"gen_kwargs = dict(\n",
|
| 917 |
-
" max_new_tokens=MAX_NEW_TOKENS,\n",
|
| 918 |
-
" do_sample=True,\n",
|
| 919 |
-
" temperature=0.9,\n",
|
| 920 |
-
" top_p=0.95,\n",
|
| 921 |
-
" repetition_penalty=1.05,\n",
|
| 922 |
-
" return_full_text=False,\n",
|
| 923 |
-
" pad_token_id=tokenizer.pad_token_id,\n",
|
| 924 |
-
" eos_token_id=tokenizer.eos_token_id\n",
|
| 925 |
-
")\n",
|
| 926 |
-
"\n",
|
| 927 |
-
"# ----------------\n",
|
| 928 |
-
"# 6) RESUME SUPPORT & GENERATION\n",
|
| 929 |
-
"# ----------------\n",
|
| 930 |
-
"existing = 0\n",
|
| 931 |
-
"if os.path.exists(OUT_JSONL):\n",
|
| 932 |
-
" with open(OUT_JSONL, \"r\", encoding=\"utf-8\") as f:\n",
|
| 933 |
-
" for _ in f:\n",
|
| 934 |
-
" existing += 1\n",
|
| 935 |
-
" print(f\"Found existing {existing} rows. Resuming...\")\n",
|
| 936 |
-
"\n",
|
| 937 |
-
"need = max(0, TARGET_COUNT - existing)\n",
|
| 938 |
-
"\n",
|
| 939 |
-
"if need > 0:\n",
|
| 940 |
-
" prompt_data = build_prompts(need)\n",
|
| 941 |
-
" print(f\"🚀 Starting generation for {len(prompt_data)} recipes...\")\n",
|
| 942 |
-
"\n",
|
| 943 |
-
" def run_with_batchsize(prompts, batch_size):\n",
|
| 944 |
-
" with torch.inference_mode():\n",
|
| 945 |
-
" return pipe(prompts, batch_size=batch_size, **gen_kwargs)\n",
|
| 946 |
-
"\n",
|
| 947 |
-
" start = time.time()\n",
|
| 948 |
-
" written = 0\n",
|
| 949 |
-
"\n",
|
| 950 |
-
" with open(OUT_JSONL, \"a\", encoding=\"utf-8\") as f_out:\n",
|
| 951 |
-
" for i in tqdm(range(0, len(prompt_data), SAVE_EVERY), desc=\"Generating chunks\"):\n",
|
| 952 |
-
" chunk = prompt_data[i:i+SAVE_EVERY]\n",
|
| 953 |
-
" chunk_prompts = [x[\"prompt\"] for x in chunk]\n",
|
| 954 |
-
"\n",
|
| 955 |
-
" try:\n",
|
| 956 |
-
" # Try preferred batch size\n",
|
| 957 |
-
" results = run_with_batchsize(chunk_prompts, BATCH_SIZE)\n",
|
| 958 |
-
" except RuntimeError as e:\n",
|
| 959 |
-
" # Fallback if OOM happens\n",
|
| 960 |
-
" if \"out of memory\" in str(e).lower():\n",
|
| 961 |
-
" torch.cuda.empty_cache()\n",
|
| 962 |
-
" print(\"⚠️ OOM detected. Retrying with reduced batch size (8)...\")\n",
|
| 963 |
-
" results = run_with_batchsize(chunk_prompts, 8)\n",
|
| 964 |
-
" else:\n",
|
| 965 |
-
" raise\n",
|
| 966 |
-
"\n",
|
| 967 |
-
" for j, out in enumerate(results):\n",
|
| 968 |
-
" gen_text = out[0][\"generated_text\"] if isinstance(out, list) else out.get(\"generated_text\", \"\")\n",
|
| 969 |
-
"\n",
|
| 970 |
-
" clean_text = gen_text.strip()\n",
|
| 971 |
-
" title, ingreds, instrs, raw = parse_recipe(clean_text, chunk[j][\"title\"])\n",
|
| 972 |
-
"\n",
|
| 973 |
-
" row = {\n",
|
| 974 |
-
" \"Title\": title,\n",
|
| 975 |
-
" \"Ingredients\": ingreds,\n",
|
| 976 |
-
" \"Instructions\": instrs,\n",
|
| 977 |
-
" \"Raw_Output\": raw\n",
|
| 978 |
-
" }\n",
|
| 979 |
-
" f_out.write(json.dumps(row, ensure_ascii=False) + \"\\n\")\n",
|
| 980 |
-
" written += 1\n",
|
| 981 |
-
"\n",
|
| 982 |
-
" f_out.flush() # Ensure save to disk\n",
|
| 983 |
-
"\n",
|
| 984 |
-
" elapsed = time.time() - start\n",
|
| 985 |
-
" print(f\"✅ Generation done! {written} recipes in {elapsed/60:.1f} minutes.\")\n",
|
| 986 |
-
"\n",
|
| 987 |
-
"else:\n",
|
| 988 |
-
" print(\"✅ Target reached. No new generation needed.\")\n",
|
| 989 |
-
"\n",
|
| 990 |
-
"# ----------------\n",
|
| 991 |
-
"# 7) EXPORT TO CSV\n",
|
| 992 |
-
"# ----------------\n",
|
| 993 |
-
"print(\"Exporting to CSV...\")\n",
|
| 994 |
-
"rows = []\n",
|
| 995 |
-
"with open(OUT_JSONL, \"r\", encoding=\"utf-8\") as f:\n",
|
| 996 |
-
" for line in f:\n",
|
| 997 |
-
" rows.append(json.loads(line))\n",
|
| 998 |
-
"\n",
|
| 999 |
-
"df = pd.DataFrame(rows)\n",
|
| 1000 |
-
"df.to_csv(OUT_CSV, index=False)\n",
|
| 1001 |
-
"print(f\"🎉 FINAL SUCCESS! Saved '{OUT_CSV}' with {len(df)} recipes.\")\n",
|
| 1002 |
-
"print(df[['Title', 'Ingredients']].head())"
|
| 1003 |
-
],
|
| 1004 |
-
"metadata": {
|
| 1005 |
-
"colab": {
|
| 1006 |
-
"base_uri": "https://localhost:8080/",
|
| 1007 |
-
"height": 1000,
|
| 1008 |
-
"referenced_widgets": [
|
| 1009 |
-
"021dfb73b06b49409eb665f99e6d68b8",
|
| 1010 |
-
"28d682aa64274020a5c324c8275271c7",
|
| 1011 |
-
"163254837483463bb398c20cac164338",
|
| 1012 |
-
"1a8f7d65f8a84f9ca4ab64a462fa532c",
|
| 1013 |
-
"02125d455ac54cd7b4aed904d5727e72",
|
| 1014 |
-
"addaf7abd9094a9eb268d7f26e356087",
|
| 1015 |
-
"62873a225be74d8ca6b7f415316c9f59",
|
| 1016 |
-
"42dca9f690824e499ab88331e983ed37",
|
| 1017 |
-
"14f38a7619754a7092b7fdc0e4567ee5",
|
| 1018 |
-
"3597c6f32455478e85fd1176903d969d",
|
| 1019 |
-
"ffc859a7d8ad440e9aaf5899476aa5c3",
|
| 1020 |
-
"435cb436d78c49ca980dd95a3cebe421",
|
| 1021 |
-
"d40ca3c01e8f4fb1a392a3f216a44bb2",
|
| 1022 |
-
"ead9762dbbe94cb2bafe4642fb9c6f0a",
|
| 1023 |
-
"c1fdaafb686942e0ac3c19ad65b9e821",
|
| 1024 |
-
"d1861cf5cbd44e03a222c08f8746e9aa",
|
| 1025 |
-
"21ccc63b38744bcab0365e8f331198e2",
|
| 1026 |
-
"df44b0e0d95047a4948b12e601b6b308",
|
| 1027 |
-
"5f06170477f647d58afc6bc6e56b06c2",
|
| 1028 |
-
"892367ccca2b4bfea0375d96c4cd4529",
|
| 1029 |
-
"674c3b03b1c745049afa94a99925c350",
|
| 1030 |
-
"5382034d7d96491bb5e7762b5b326c58"
|
| 1031 |
-
]
|
| 1032 |
-
},
|
| 1033 |
-
"id": "WhYOWuJPXLcT",
|
| 1034 |
-
"outputId": "7ce73fd7-f18e-48e7-f89d-f90f861bd54b"
|
| 1035 |
-
},
|
| 1036 |
-
"execution_count": 11,
|
| 1037 |
-
"outputs": [
|
| 1038 |
-
{
|
| 1039 |
-
"output_type": "stream",
|
| 1040 |
-
"name": "stdout",
|
| 1041 |
-
"text": [
|
| 1042 |
-
"CUDA Available: True\n"
|
| 1043 |
-
]
|
| 1044 |
-
},
|
| 1045 |
-
{
|
| 1046 |
-
"output_type": "display_data",
|
| 1047 |
-
"data": {
|
| 1048 |
-
"text/plain": [
|
| 1049 |
-
"Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]"
|
| 1050 |
-
],
|
| 1051 |
-
"application/vnd.jupyter.widget-view+json": {
|
| 1052 |
-
"version_major": 2,
|
| 1053 |
-
"version_minor": 0,
|
| 1054 |
-
"model_id": "021dfb73b06b49409eb665f99e6d68b8"
|
| 1055 |
-
}
|
| 1056 |
-
},
|
| 1057 |
-
"metadata": {}
|
| 1058 |
-
},
|
| 1059 |
-
{
|
| 1060 |
-
"output_type": "stream",
|
| 1061 |
-
"name": "stderr",
|
| 1062 |
-
"text": [
|
| 1063 |
-
"Device set to use cuda:0\n"
|
| 1064 |
-
]
|
| 1065 |
-
},
|
| 1066 |
-
{
|
| 1067 |
-
"output_type": "stream",
|
| 1068 |
-
"name": "stdout",
|
| 1069 |
-
"text": [
|
| 1070 |
-
"Found existing 500 rows. Resuming...\n",
|
| 1071 |
-
"🚀 Starting generation for 9500 recipes...\n"
|
| 1072 |
-
]
|
| 1073 |
-
},
|
| 1074 |
-
{
|
| 1075 |
-
"output_type": "display_data",
|
| 1076 |
-
"data": {
|
| 1077 |
-
"text/plain": [
|
| 1078 |
-
"Generating chunks: 0%| | 0/19 [00:00<?, ?it/s]"
|
| 1079 |
-
],
|
| 1080 |
-
"application/vnd.jupyter.widget-view+json": {
|
| 1081 |
-
"version_major": 2,
|
| 1082 |
-
"version_minor": 0,
|
| 1083 |
-
"model_id": "435cb436d78c49ca980dd95a3cebe421"
|
| 1084 |
-
}
|
| 1085 |
-
},
|
| 1086 |
-
"metadata": {}
|
| 1087 |
-
},
|
| 1088 |
-
{
|
| 1089 |
-
"output_type": "stream",
|
| 1090 |
-
"name": "stderr",
|
| 1091 |
-
"text": [
|
| 1092 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1093 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1094 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1095 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1096 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1097 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1098 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1099 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1100 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1101 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1102 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1103 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1104 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1105 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1106 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1107 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1108 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1109 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1110 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1111 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1112 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1113 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1114 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1115 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1116 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1117 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1118 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1119 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1120 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1121 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1122 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1123 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1124 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1125 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1126 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1127 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1128 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1129 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1130 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1131 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1132 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1133 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1134 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1135 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1136 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1137 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1138 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1139 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1140 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1141 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1142 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1143 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1144 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1145 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1146 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1147 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1148 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1149 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1150 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1151 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1152 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1153 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1154 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1155 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1156 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1157 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1158 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1159 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1160 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1161 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1162 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1163 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1164 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1165 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1166 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1167 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1168 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1169 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1170 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1171 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1172 |
-
"You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset\n",
|
| 1173 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1174 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1175 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1176 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1177 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1178 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1179 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1180 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1181 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1182 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1183 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1184 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1185 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1186 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1187 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1188 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1189 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1190 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1191 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1192 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1193 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1194 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1195 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1196 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1197 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1198 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1199 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1200 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1201 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1202 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1203 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1204 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1205 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1206 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1207 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1208 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1209 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1210 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1211 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1212 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1213 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1214 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1215 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1216 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1217 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1218 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1219 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1220 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1221 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1222 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1223 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1224 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1225 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1226 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1227 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1228 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1229 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1230 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1231 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1232 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1233 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1234 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1235 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1236 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1237 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1238 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1239 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1240 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1241 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1242 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1243 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n",
|
| 1244 |
-
"A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.\n"
|
| 1245 |
-
]
|
| 1246 |
-
},
|
| 1247 |
-
{
|
| 1248 |
-
"output_type": "stream",
|
| 1249 |
-
"name": "stdout",
|
| 1250 |
-
"text": [
|
| 1251 |
-
"✅ Generation done! 9500 recipes in 20.8 minutes.\n",
|
| 1252 |
-
"Exporting to CSV...\n",
|
| 1253 |
-
"🎉 FINAL SUCCESS! Saved 'RecipeData_10K.csv' with 10000 recipes.\n",
|
| 1254 |
-
" Title \\\n",
|
| 1255 |
-
"0 Zesty Mediterranean Lamb Chops Platter \n",
|
| 1256 |
-
"1 Szechuan Asian_Fusion Tofu with Cashews \n",
|
| 1257 |
-
"2 Zesty Mediterranean Hummus Plate Medley \n",
|
| 1258 |
-
"3 Tuscan Italian Ravioli with Mushrooms \n",
|
| 1259 |
-
"4 Lemon Mediterranean Shawarma with Yogurt Sauce \n",
|
| 1260 |
-
"\n",
|
| 1261 |
-
" Ingredients \n",
|
| 1262 |
-
"0 - Lamb Chops 6\\n- Lemon (freshly squeezed) 1\\n... \n",
|
| 1263 |
-
"1 - Tofu 500g\\n- Cashews 100g\\n- Soy Sauce 3 tbs... \n",
|
| 1264 |
-
"2 - Chickpeas 500g\\n- Olive Oil 2 tbsp\\n- Lemon ... \n",
|
| 1265 |
-
"3 - Flour 500g\\n- Eggs 3\\n- Fillings: ricotta ch... \n",
|
| 1266 |
-
"4 - Chicken or lamb (1kg)\\n- Olive oil\\n- Lemon ... \n"
|
| 1267 |
-
]
|
| 1268 |
-
}
|
| 1269 |
-
]
|
| 1270 |
-
},
|
| 1271 |
-
{
|
| 1272 |
-
"cell_type": "markdown",
|
| 1273 |
-
"source": [],
|
| 1274 |
-
"metadata": {
|
| 1275 |
-
"id": "RUYFuxuXqJmB"
|
| 1276 |
-
}
|
| 1277 |
-
}
|
| 1278 |
-
]
|
| 1279 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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