AMUseBot/ai_talks/AMUseBotBackend/utils/chatbot_prototype.ipynb
2023-06-05 21:23:33 +02:00

5420 lines
214 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"gpuClass": "standard",
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"16362f0d98b64c5795565889f10e0b8c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_4c3632e9677d47978b0e84cf3b59ade1",
"IPY_MODEL_0c537c762db644259239221bb5ed552a",
"IPY_MODEL_f4d578feff814384b5a3156825d9fef6"
],
"layout": "IPY_MODEL_b82d1b601a434414a1845bbba6da2991"
}
},
"4c3632e9677d47978b0e84cf3b59ade1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_f40a17458d704cd2a8fbf68729a4198a",
"placeholder": "",
"style": "IPY_MODEL_49606632a7054f55b2ffa7afbe90a00d",
"value": "Downloading: 100%"
}
},
"0c537c762db644259239221bb5ed552a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_ce3f68b81ed34c5e8bfc41bd2a7ad263",
"max": 28,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_388864342bf0439f8e16639bf53b7efe",
"value": 28
}
},
"f4d578feff814384b5a3156825d9fef6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_c7773a01e08e49ddb45e596726132756",
"placeholder": "",
"style": "IPY_MODEL_da2ff64e5e784bd286ffe2facd29204e",
"value": " 28.0/28.0 [00:00<00:00, 909B/s]"
}
},
"b82d1b601a434414a1845bbba6da2991": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f40a17458d704cd2a8fbf68729a4198a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"49606632a7054f55b2ffa7afbe90a00d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ce3f68b81ed34c5e8bfc41bd2a7ad263": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"388864342bf0439f8e16639bf53b7efe": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"c7773a01e08e49ddb45e596726132756": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"da2ff64e5e784bd286ffe2facd29204e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"c8b4feb673cd4f1bbbdbabf6d37b0686": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_673b0dccf94f472082a3006c35faba52",
"IPY_MODEL_d231efd5a8f54d3cbe985b3a8588242b",
"IPY_MODEL_db874ddc16524189a8e4a6e552b62f52"
],
"layout": "IPY_MODEL_bede7c9024aa4989bb4b7157ef6624ac"
}
},
"673b0dccf94f472082a3006c35faba52": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_ddd2dfc1b7734da2ab93f5edf70e12fa",
"placeholder": "",
"style": "IPY_MODEL_0dbbf79ec8cd4a1ea0a4428b3484fdc7",
"value": "Downloading: 100%"
}
},
"d231efd5a8f54d3cbe985b3a8588242b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d16a8b662678426881b3e9b2d5334a23",
"max": 483,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_34b007b8c9644ae38da3a014e3bfa948",
"value": 483
}
},
"db874ddc16524189a8e4a6e552b62f52": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b5833deeac4042fba6a3b694cc130f9b",
"placeholder": "",
"style": "IPY_MODEL_b3f47c9c5e3241d18dcf4d5d69f909b1",
"value": " 483/483 [00:00<00:00, 24.1kB/s]"
}
},
"bede7c9024aa4989bb4b7157ef6624ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ddd2dfc1b7734da2ab93f5edf70e12fa": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0dbbf79ec8cd4a1ea0a4428b3484fdc7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"d16a8b662678426881b3e9b2d5334a23": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"34b007b8c9644ae38da3a014e3bfa948": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"b5833deeac4042fba6a3b694cc130f9b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b3f47c9c5e3241d18dcf4d5d69f909b1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"0fc939f7fe4a4d13a97b6193966bbcb6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_c6999da9584646cca047c66d7fb29a1c",
"IPY_MODEL_32c2b5e82b804b0ea951ab616dc0c816",
"IPY_MODEL_a83c5449e8d74461b04426af67d84bbd"
],
"layout": "IPY_MODEL_712a0fa0de944866929f7b0e4c72f983"
}
},
"c6999da9584646cca047c66d7fb29a1c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_a6b69b8ebcbc4ce9ac81644760fe803f",
"placeholder": "",
"style": "IPY_MODEL_ccf402ccd11e4bd5a7122140bccf557a",
"value": "Downloading: 100%"
}
},
"32c2b5e82b804b0ea951ab616dc0c816": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8c16b604a3064738b6ad39636bbc631a",
"max": 231508,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_e8ee382869754cba926e6449205a5664",
"value": 231508
}
},
"a83c5449e8d74461b04426af67d84bbd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_f700f2a9f0b243e08a47ed8b63e6c559",
"placeholder": "",
"style": "IPY_MODEL_63b832e3fd544cbbbabe6a6244ac2370",
"value": " 232k/232k [00:03<00:00, 298B/s]"
}
},
"712a0fa0de944866929f7b0e4c72f983": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a6b69b8ebcbc4ce9ac81644760fe803f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ccf402ccd11e4bd5a7122140bccf557a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"8c16b604a3064738b6ad39636bbc631a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e8ee382869754cba926e6449205a5664": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"f700f2a9f0b243e08a47ed8b63e6c559": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"63b832e3fd544cbbbabe6a6244ac2370": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ff55840fe82b43bfa926e023f08b80ba": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_f58cc893695147e9b5846a36989f922e",
"IPY_MODEL_9cc14543b8cf43679ed0f687cb003d5a",
"IPY_MODEL_e739a07d19c64267a31b0cd1e6a719ea"
],
"layout": "IPY_MODEL_0625902116e742d48274242c38ab2fef"
}
},
"f58cc893695147e9b5846a36989f922e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_70916aa418bd4a36ac09e7ad04806dec",
"placeholder": "",
"style": "IPY_MODEL_b4e64b250fbc44aca8ec694804cbaf49",
"value": "Downloading: 100%"
}
},
"9cc14543b8cf43679ed0f687cb003d5a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_71f9ea49ec4c42f08d2ab6e7c28900ee",
"max": 466062,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_ce15c858df694a46b4ec35533447b087",
"value": 466062
}
},
"e739a07d19c64267a31b0cd1e6a719ea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_3eff74ecc5084695920dce706c01511b",
"placeholder": "",
"style": "IPY_MODEL_6a80b108f8af49fdbf504f7c7b305a99",
"value": " 466k/466k [00:00<00:00, 732kB/s]"
}
},
"0625902116e742d48274242c38ab2fef": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"70916aa418bd4a36ac09e7ad04806dec": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b4e64b250fbc44aca8ec694804cbaf49": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"71f9ea49ec4c42f08d2ab6e7c28900ee": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ce15c858df694a46b4ec35533447b087": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"3eff74ecc5084695920dce706c01511b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"6a80b108f8af49fdbf504f7c7b305a99": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"fc3173dcfe2848f2957e3677ffd07f84": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_6e7bbc64b2a1465586ce2a43ba4b22fa",
"IPY_MODEL_134e5052c9da476fba4d6029da3d85db",
"IPY_MODEL_952ed3c3a0094bb5abfea63b43dcaad8"
],
"layout": "IPY_MODEL_6c1d6efa8be14080845e3321e0f0c188"
}
},
"6e7bbc64b2a1465586ce2a43ba4b22fa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_bc8dc1bfa9124c1db3e738e0385cb8b5",
"placeholder": "",
"style": "IPY_MODEL_e3eff38137554e318822ac8973f2f915",
"value": "100%"
}
},
"134e5052c9da476fba4d6029da3d85db": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b8afd916d93142ddb949630bbd382800",
"max": 4,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_97fdc3080b40458c9986ac61bb94a98e",
"value": 4
}
},
"952ed3c3a0094bb5abfea63b43dcaad8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d658a5fcbc60462ebfc383e7003b52ce",
"placeholder": "",
"style": "IPY_MODEL_0acf000f9e384831aa4edca59abbf10e",
"value": " 4/4 [00:01<00:00, 3.73ba/s]"
}
},
"6c1d6efa8be14080845e3321e0f0c188": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"bc8dc1bfa9124c1db3e738e0385cb8b5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e3eff38137554e318822ac8973f2f915": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b8afd916d93142ddb949630bbd382800": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"97fdc3080b40458c9986ac61bb94a98e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"d658a5fcbc60462ebfc383e7003b52ce": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0acf000f9e384831aa4edca59abbf10e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"58883bf03b554d37abd656a35fa86db3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_5bc293602e704324a39df56dd3c3e96e",
"IPY_MODEL_3d9cc746e07c4def8f74158ac94c6063",
"IPY_MODEL_ba077267515f4182bfcbc587fa08aed2"
],
"layout": "IPY_MODEL_2fbeedcd09264f8bb9d9868e79d35370"
}
},
"5bc293602e704324a39df56dd3c3e96e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_735d50fd6d7940bb8cd777b8b81f5b54",
"placeholder": "",
"style": "IPY_MODEL_9d21df9b173247808c912105c15ba8ff",
"value": "100%"
}
},
"3d9cc746e07c4def8f74158ac94c6063": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_2de2842792574204814e9a7b297c68da",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_44670957fddd457a9ae0aa5995fada74",
"value": 1
}
},
"ba077267515f4182bfcbc587fa08aed2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_6958744e38ca4d16a2fa124311702539",
"placeholder": "",
"style": "IPY_MODEL_a3c21cde1af94715a1bd4e0d210f2062",
"value": " 1/1 [00:00<00:00, 2.38ba/s]"
}
},
"2fbeedcd09264f8bb9d9868e79d35370": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"735d50fd6d7940bb8cd777b8b81f5b54": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9d21df9b173247808c912105c15ba8ff": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"2de2842792574204814e9a7b297c68da": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"44670957fddd457a9ae0aa5995fada74": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"6958744e38ca4d16a2fa124311702539": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a3c21cde1af94715a1bd4e0d210f2062": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b4a54a4d93634b91aefa01776c400173": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_637a668c4ff845648d08729e20f8d7f0",
"IPY_MODEL_d0704b2725be49f3a079734173086f85",
"IPY_MODEL_86549aa685e84d39a906ed93742d66f9"
],
"layout": "IPY_MODEL_6c0d510901ec428d8440030c6434839d"
}
},
"637a668c4ff845648d08729e20f8d7f0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_172aa9e4059448e7b6a64e034e1cf171",
"placeholder": "",
"style": "IPY_MODEL_05c7bab10ade4f048b6ff37e17e61238",
"value": "Downloading: 100%"
}
},
"d0704b2725be49f3a079734173086f85": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1de2aaab2df74709a7ddd83deab322a8",
"max": 267967963,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_667bcef6967c4a01850e1c7f3d402848",
"value": 267967963
}
},
"86549aa685e84d39a906ed93742d66f9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d5b5277e37d4467290abb401fc47ae80",
"placeholder": "",
"style": "IPY_MODEL_0922ba7734df437c9a3417d45c5274da",
"value": " 268M/268M [00:07<00:00, 45.6MB/s]"
}
},
"6c0d510901ec428d8440030c6434839d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"172aa9e4059448e7b6a64e034e1cf171": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"05c7bab10ade4f048b6ff37e17e61238": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"1de2aaab2df74709a7ddd83deab322a8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"667bcef6967c4a01850e1c7f3d402848": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"d5b5277e37d4467290abb401fc47ae80": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0922ba7734df437c9a3417d45c5274da": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"c42dd35421e842699a76a38d9b4c6124": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_7ae1af56270b476e9c84ec9381dbfe7f",
"IPY_MODEL_9680cdca7afe4f81a8aa6c1f6ed48f18",
"IPY_MODEL_dbc2571f8320465f8c9860963d8b2290"
],
"layout": "IPY_MODEL_41ae6d24c1f64db890c959634b613f29"
}
},
"7ae1af56270b476e9c84ec9381dbfe7f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_f02ca95e42654721aedc22d5d617e601",
"placeholder": "",
"style": "IPY_MODEL_c1423b8980b64f45b9a815a866ba260c",
"value": "Downloading builder script: "
}
},
"9680cdca7afe4f81a8aa6c1f6ed48f18": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_9117cc650dc04ed68ce67872291f2f6c",
"max": 1652,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_00cf005090ec4a0abc33e683fabb65a0",
"value": 1652
}
},
"dbc2571f8320465f8c9860963d8b2290": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_fa4c644c022a4a99bb9b709bada15f84",
"placeholder": "",
"style": "IPY_MODEL_99588acc00a54035a17790b2e7d18651",
"value": " 4.21k/? [00:00<00:00, 101kB/s]"
}
},
"41ae6d24c1f64db890c959634b613f29": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"f02ca95e42654721aedc22d5d617e601": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c1423b8980b64f45b9a815a866ba260c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9117cc650dc04ed68ce67872291f2f6c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"00cf005090ec4a0abc33e683fabb65a0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"fa4c644c022a4a99bb9b709bada15f84": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"99588acc00a54035a17790b2e7d18651": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"5234189fff004658bc07ba90639eb762": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ce744f6d339e4ffdaf2a5c7d8445a9de",
"IPY_MODEL_3c0679a3691046eda0a0508c55116a7d",
"IPY_MODEL_198aabca329a43b49bb11937be109137"
],
"layout": "IPY_MODEL_65bdd85904ab44ab835eb8d7e28db4ac"
}
},
"ce744f6d339e4ffdaf2a5c7d8445a9de": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1f785cff415b4f81af18b87622eb620a",
"placeholder": "",
"style": "IPY_MODEL_fc4cb3050dc34f7bab7339f3043456c1",
"value": "100%"
}
},
"3c0679a3691046eda0a0508c55116a7d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_628d5b7bfb2449788e54c68093fca6ed",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_165f3401fae843ab9158e6ebbbf58c84",
"value": 1
}
},
"198aabca329a43b49bb11937be109137": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_187067e48e4b41b0844d4e77ff9a5014",
"placeholder": "",
"style": "IPY_MODEL_27daf9a6b18b4e2d86c40ed900fcef09",
"value": " 1/1 [00:00<00:00, 51.08ex/s]"
}
},
"65bdd85904ab44ab835eb8d7e28db4ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"1f785cff415b4f81af18b87622eb620a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"fc4cb3050dc34f7bab7339f3043456c1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"628d5b7bfb2449788e54c68093fca6ed": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"165f3401fae843ab9158e6ebbbf58c84": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"187067e48e4b41b0844d4e77ff9a5014": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"27daf9a6b18b4e2d86c40ed900fcef09": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"e9113237710c4692a4a7ab64a6793220": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ae1ba4d0e7304a93b60e9249bc65e009",
"IPY_MODEL_37f3ac59e9414797a531cbd7ad8a4ee6",
"IPY_MODEL_8cbdc0c1ff074a21b12b65437c6f81e5"
],
"layout": "IPY_MODEL_c1847c02356f4341a91c061ab96313e9"
}
},
"ae1ba4d0e7304a93b60e9249bc65e009": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_5b64f35757df4f70acc6d1a42e3e9083",
"placeholder": "",
"style": "IPY_MODEL_201eea97897649a3ab7ad114ff8c7b6f",
"value": "100%"
}
},
"37f3ac59e9414797a531cbd7ad8a4ee6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_ffdf6b640a1840e491a5ef281d10774a",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_ee3c98646dd6402680287e3fc1086a2b",
"value": 1
}
},
"8cbdc0c1ff074a21b12b65437c6f81e5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_8812dac4c9ce49e8a8e0b90372016262",
"placeholder": "",
"style": "IPY_MODEL_9063989066d24362b0f49189c32b70b9",
"value": " 1/1 [00:00<00:00, 40.80ex/s]"
}
},
"c1847c02356f4341a91c061ab96313e9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"5b64f35757df4f70acc6d1a42e3e9083": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"201eea97897649a3ab7ad114ff8c7b6f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ffdf6b640a1840e491a5ef281d10774a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"ee3c98646dd6402680287e3fc1086a2b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"8812dac4c9ce49e8a8e0b90372016262": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9063989066d24362b0f49189c32b70b9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"source": [
"## Download CookDial from git"
],
"metadata": {
"id": "PXzanHU0dk5B"
}
},
{
"cell_type": "code",
"source": [
"! git clone https://github.com/YiweiJiang2015/CookDial.git"
],
"metadata": {
"id": "7WD7dXWLdohP"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Or download CookDial from Google Drive"
],
"metadata": {
"id": "JcGaYbYZbBiM"
}
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "a7gr9prdwinA",
"outputId": "f3e595eb-0755-47f5-eb34-ba6638fa3450"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/drive\n"
]
}
],
"source": [
"# Load the Drive helper and mount\n",
"from google.colab import drive\n",
"drive.mount('/content/drive')"
]
},
{
"cell_type": "code",
"source": [
"path_to_file = \"/content/CookDial\"\n",
"path_to_output = \"/content/drive/MyDrive/CookDial\""
],
"metadata": {
"id": "n1Gxyyd6wySX"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## CookDial from MyDrive"
],
"metadata": {
"id": "KpwW6KpjdvWs"
}
},
{
"cell_type": "code",
"source": [
"import zipfile\n",
"with zipfile.ZipFile(path_to_output + \".zip\",\"r\") as zip_ref:\n",
" zip_ref.extractall(path_to_file)"
],
"metadata": {
"id": "_wtHpzYcwzE2"
},
"execution_count": 4,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## CookDial to MyDrive"
],
"metadata": {
"id": "J1wZS4UQd12C"
}
},
{
"cell_type": "code",
"source": [
"import shutil\n",
"\n",
"shutil.make_archive(path_to_output, 'zip', path_to_file)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "K-xDfMvidcNK",
"outputId": "ff3aa1b3-443e-4daf-abbe-cb870501ccd0"
},
"execution_count": 71,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'/content/drive/MyDrive/CookDial.zip'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 71
}
]
},
{
"cell_type": "markdown",
"source": [
"## Get dialogues number"
],
"metadata": {
"id": "cF2OEPch0w77"
}
},
{
"cell_type": "code",
"source": [
"import os\n",
"APP_FOLDER = '/content/CookDial/data/dialog'\n",
"totalFiles = 0\n",
"for base, _, files in os.walk(APP_FOLDER):\n",
" print('Searching in : ',base)\n",
" for File in files:\n",
" totalFiles += 1\n",
"\n",
"print('Total number of files',totalFiles)\n"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "LXmFpKPdyMBL",
"outputId": "57aa1d85-1f64-4ed1-f40e-0bb8f858c751"
},
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Searching in : /content/CookDial/data/dialog\n",
"Total number of files 260\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Read content of data"
],
"metadata": {
"id": "hC8lWFZ93puq"
}
},
{
"cell_type": "code",
"source": [
"import re \n",
"\n",
"pattern = re.compile(r\"\\\"intent\\\": \\\"([^\\\"]*)\", re.IGNORECASE)\n",
"\n",
"def parse_annotation(annotation):\n",
" # print(annotation)\n",
" result = re.search(pattern, annotation)\n",
" value = result.group(1)\n",
" value = value.replace(\";\", \"\")\n",
" value = value.replace(\" \", \"#\")\n",
" return value"
],
"metadata": {
"id": "FOhsU_mT7DIh"
},
"execution_count": 6,
"outputs": []
},
{
"cell_type": "code",
"source": [
"import json\n",
"import pandas as pd\n",
"\n",
"utt_dict = {'label': [], 'sentence': []}\n",
"\n",
"for number in range(totalFiles):\n",
" with open(APP_FOLDER + \"/\" + f\"{number:03d}\" + \".1.json\") as f:\n",
"\n",
" data = json.load(f)\n",
" for row in data['messages']:\n",
" if False == row[\"bot\"]:\n",
" parsed_ann = parse_annotation(row[\"annotations\"])\n",
" if \"\" != parsed_ann:\n",
" utt_dict[\"label\"].append(parsed_ann)\n",
" utt_dict[\"sentence\"].append(row[\"utterance\"].lower())\n",
"\n",
"IntentDataFrame = pd.DataFrame(utt_dict)"
],
"metadata": {
"id": "GVRy6RzT3pWz"
},
"execution_count": 8,
"outputs": []
},
{
"cell_type": "code",
"source": [
"IntentDataFrame.sample(n=5)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
},
"id": "Kx_SQpsG--jO",
"outputId": "5c975894-b980-423f-a530-bdcbb66c2819"
},
"execution_count": 43,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" label sentence\n",
"2260 10 ok good! i am ready to start now.\n",
"4431 17 great. the chicken are added back. can i eat it?\n",
"4425 19 ok. done. how long to wait from now?\n",
"2246 29 ok nice, for how long should they cook?\n",
"141 5 ok. i have added the baking powder to the bowl."
],
"text/html": [
"\n",
" <div id=\"df-abbc2732-9289-4ea7-9ff8-fcf63bab7eb5\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>label</th>\n",
" <th>sentence</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2260</th>\n",
" <td>10</td>\n",
" <td>ok good! i am ready to start now.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4431</th>\n",
" <td>17</td>\n",
" <td>great. the chicken are added back. can i eat it?</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4425</th>\n",
" <td>19</td>\n",
" <td>ok. done. how long to wait from now?</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2246</th>\n",
" <td>29</td>\n",
" <td>ok nice, for how long should they cook?</td>\n",
" </tr>\n",
" <tr>\n",
" <th>141</th>\n",
" <td>5</td>\n",
" <td>ok. i have added the baking powder to the bowl.</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-abbc2732-9289-4ea7-9ff8-fcf63bab7eb5')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-abbc2732-9289-4ea7-9ff8-fcf63bab7eb5 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-abbc2732-9289-4ea7-9ff8-fcf63bab7eb5');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 43
}
]
},
{
"cell_type": "code",
"source": [
"print(\"There are {} rows and {} columns\".format(IntentDataFrame.shape[0], IntentDataFrame.shape[1]))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JQTPn9LlGyso",
"outputId": "4336aebe-3a98-4bf5-d365-7ac488393876"
},
"execution_count": 10,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"There are 4610 rows and 2 columns\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# explore unique labels\n",
"print(IntentDataFrame.label.unique())"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hI50lziHG2de",
"outputId": "a673d3d1-929d-4ee6-d4ac-ae10cf6cf7fc"
},
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"['greeting#req_start' 'req_temperature' 'thank#req_instruction'\n",
" 'confirm#req_instruction' 'req_repeat' 'confirm' 'confirm#req_repeat'\n",
" 'negate#thank' 'negate' 'req_amount' 'req_instruction'\n",
" 'confirm#req_parallel_action' 'req_amount#req_ingredient' 'thank#confirm'\n",
" 'req_use_all' 'thank' 'other' 'confirm#req_is_recipe_finished' 'req_tool'\n",
" 'confirm#req_duration' 'confirm#thank' 'affirm#req_instruction'\n",
" 'req_repeat#confirm' 'confirm#req_temperature'\n",
" 'confirm#req_is_recipe_ongoing' 'req_ingredient' 'confirm#req_amount'\n",
" 'thank#confirm#req_instruction' 'thank#req_repeat' 'req_duration'\n",
" 'thank#req_duration' 'confirm#thank#req_instruction'\n",
" 'thank#confirm#req_is_recipe_finished' 'req_repeat#thank'\n",
" 'greeting#req_title' 'req_start' 'confirm#other' 'affirm'\n",
" 'confirm#req_start' 'confirm#req_duration#req_is_recipe_finished'\n",
" 'affirm#req_amount' 'req_ingredient_list' 'thank#goodbye'\n",
" 'req_parallel_action' 'confirm#goodbye' 'affirm#req_ingredient'\n",
" 'thank#req_ingredient' 'thank#confirm#req_ingredient'\n",
" 'req_ingredient_list_length' 'other#req_instruction' 'affirm#req_start'\n",
" 'thank#req_is_recipe_ongoing' 'req_is_recipe_ongoing' 'goodbye'\n",
" 'req_ingredient_list#confirm' 'affirm#thank#other'\n",
" 'req_repeat#req_amount' 'other#req_repeat' 'confirm#req_tool'\n",
" 'req_is_recipe_finished' 'thank#req_parallel_action'\n",
" 'affirm#req_ingredient_list' 'confirm#req_ingredient' 'affirm#confirm'\n",
" 'confirm#req_ingredient_list_ends' 'req_title' 'req_ingredient_list_ends'\n",
" 'req_substitute' 'negate#req_instruction' 'thank#req_is_recipe_finished'\n",
" 'thank#req_ingredient_list' 'affirm#thank' 'thank#req_tool'\n",
" 'affirm#req_ingredient_list_length' 'confirm#req_substitute'\n",
" 'affirm#other' 'confirm#req_instruction#req_duration'\n",
" 'req_ingredient_list#req_ingredient_list_length' 'confirm#affirm'\n",
" 'affirm#thank#req_ingredient' 'confirm#req_use_all'\n",
" 'req_amount#req_substitute' 'req_instruction#req_duration'\n",
" 'negate#confirm#req_instruction' 'thank#other' 'greeting'\n",
" 'other#req_temperature' 'req_ingredient_list_length#confirm'\n",
" 'thank#confirm#req_duration' 'greeting#req_ingredient_list'\n",
" 'thank#req_amount']\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# explore which labels are the most and least common\n",
"IntentDataFrame.label.value_counts()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "psWrXfoiG7FT",
"outputId": "30f87dba-7389-48fe-b2a1-260f49c7dccd"
},
"execution_count": 12,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"confirm#req_instruction 1222\n",
"confirm 407\n",
"req_instruction 320\n",
"thank 225\n",
"greeting#req_title 216\n",
" ... \n",
"other#req_instruction 1\n",
"req_repeat#thank 1\n",
"confirm#req_start 1\n",
"confirm#goodbye 1\n",
"thank#req_amount 1\n",
"Name: label, Length: 91, dtype: int64"
]
},
"metadata": {},
"execution_count": 12
}
]
},
{
"cell_type": "code",
"source": [
"# drop rows with multiple labels\n",
"# df = df[df[\"label\"].str.contains(\"#\")==False]\n",
"# df.label.value_counts()"
],
"metadata": {
"id": "DrWLIe2XG_Lc"
},
"execution_count": 13,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Preprocessing\n"
],
"metadata": {
"id": "NPRJeAp0HMeD"
}
},
{
"cell_type": "code",
"source": [
"!pip install datasets"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hKxs9_1hJAkX",
"outputId": "04df77b3-70ed-4023-dcb9-b78025c2a960"
},
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting datasets\n",
" Downloading datasets-2.8.0-py3-none-any.whl (452 kB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/452.9 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━\u001b[0m \u001b[32m286.7/452.9 KB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m452.9/452.9 KB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.8/dist-packages (from datasets) (2022.11.0)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from datasets) (1.3.5)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.8/dist-packages (from datasets) (6.0)\n",
"Requirement already satisfied: dill<0.3.7 in /usr/local/lib/python3.8/dist-packages (from datasets) (0.3.6)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (from datasets) (3.8.3)\n",
"Collecting xxhash\n",
" Downloading xxhash-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213 kB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/213.0 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.0/213.0 KB\u001b[0m \u001b[31m27.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from datasets) (21.3)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.8/dist-packages (from datasets) (1.21.6)\n",
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.8/dist-packages (from datasets) (2.25.1)\n",
"Collecting responses<0.19\n",
" Downloading responses-0.18.0-py3-none-any.whl (38 kB)\n",
"Requirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.8/dist-packages (from datasets) (9.0.0)\n",
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.8/dist-packages (from datasets) (4.64.1)\n",
"Collecting huggingface-hub<1.0.0,>=0.2.0\n",
" Downloading huggingface_hub-0.11.1-py3-none-any.whl (182 kB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/182.4 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m182.4/182.4 KB\u001b[0m \u001b[31m23.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting multiprocess\n",
" Downloading multiprocess-0.70.14-py38-none-any.whl (132 kB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/132.0 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m132.0/132.0 KB\u001b[0m \u001b[31m18.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.1)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.3.3)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (4.0.2)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (6.0.4)\n",
"Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (2.1.1)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (1.8.2)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->datasets) (22.2.0)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from huggingface-hub<1.0.0,>=0.2.0->datasets) (3.9.0)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub<1.0.0,>=0.2.0->datasets) (4.4.0)\n",
"Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging->datasets) (3.0.9)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.19.0->datasets) (2.10)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests>=2.19.0->datasets) (4.0.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=2.19.0->datasets) (2022.12.7)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.19.0->datasets) (1.24.3)\n",
"Collecting urllib3<1.27,>=1.21.1\n",
" Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/140.6 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m140.6/140.6 KB\u001b[0m \u001b[31m21.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2022.7)\n",
"Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas->datasets) (2.8.2)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n",
"Installing collected packages: xxhash, urllib3, multiprocess, responses, huggingface-hub, datasets\n",
" Attempting uninstall: urllib3\n",
" Found existing installation: urllib3 1.24.3\n",
" Uninstalling urllib3-1.24.3:\n",
" Successfully uninstalled urllib3-1.24.3\n",
"Successfully installed datasets-2.8.0 huggingface-hub-0.11.1 multiprocess-0.70.14 responses-0.18.0 urllib3-1.26.14 xxhash-3.2.0\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install transformers"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "78woLKRZJQuM",
"outputId": "237c4aeb-631e-4192-f9ab-95e07ff0ee79"
},
"execution_count": 15,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting transformers\n",
" Downloading transformers-4.25.1-py3-none-any.whl (5.8 MB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/5.8 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.4/5.8 MB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/5.8 MB\u001b[0m \u001b[31m48.5 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m5.8/5.8 MB\u001b[0m \u001b[31m64.9 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.8/5.8 MB\u001b[0m \u001b[31m46.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.8/dist-packages (from transformers) (6.0)\n",
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.8/dist-packages (from transformers) (4.64.1)\n",
"Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
" Downloading tokenizers-0.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/7.6 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.9/7.6 MB\u001b[0m \u001b[31m120.5 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m137.2 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m86.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from transformers) (3.9.0)\n",
"Requirement already satisfied: huggingface-hub<1.0,>=0.10.0 in /usr/local/lib/python3.8/dist-packages (from transformers) (0.11.1)\n",
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (2022.6.2)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from transformers) (2.25.1)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.8/dist-packages (from transformers) (1.21.6)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from transformers) (21.3)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub<1.0,>=0.10.0->transformers) (4.4.0)\n",
"Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging>=20.0->transformers) (3.0.9)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2022.12.7)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (2.10)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (1.26.14)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->transformers) (4.0.0)\n",
"Installing collected packages: tokenizers, transformers\n",
"Successfully installed tokenizers-0.13.2 transformers-4.25.1\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# This Python 3 environment comes with many helpful analytics libraries installed\n",
"# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n",
"# For example, here's several helpful packages to load\n",
"\n",
"import numpy as np # linear algebra\n",
"import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n",
"import json\n",
"import datasets #Hugging Face library\n",
"from transformers import DataCollatorWithPadding\n",
"from transformers import AutoTokenizer\n",
"from transformers import AutoModelForSequenceClassification, TrainingArguments, Trainer\n",
"# Input data files are available in the read-only \"../input/\" directory\n",
"# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n",
"\n",
"import os\n",
"#for dirname, _, filenames in os.walk(ModelPath):\n",
"# for filename in filenames:\n",
"# print(os.path.join(dirname, filename))\n",
"\n",
"# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n",
"# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session"
],
"metadata": {
"id": "7XuHyqLlItUN"
},
"execution_count": 16,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# replace the labels strings by label numbers \n",
"unique_labels = IntentDataFrame.label.unique()\n",
"LabelToIndex = {}\n",
"\n",
"for i in range(len(unique_labels)):\n",
" LabelToIndex[unique_labels[i]] = i\n",
"\n",
"IntentDataFrame[\"label\"]=IntentDataFrame[\"label\"].map(LabelToIndex)"
],
"metadata": {
"id": "tBSmKYURJ24M"
},
"execution_count": 17,
"outputs": []
},
{
"cell_type": "code",
"source": [
"train_data = IntentDataFrame.sample(frac=0.8, random_state=25)\n",
"test_data = IntentDataFrame.drop(train_data.index)\n",
"\n",
"train_data = datasets.Dataset.from_pandas(train_data)\n",
"test_data = datasets.Dataset.from_pandas(test_data)\n",
"\n",
"print(f\"No. of training examples: {train_data.shape[0]}\")\n",
"print(f\"No. of testing examples: {test_data.shape[0]}\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ui6NutubLmKy",
"outputId": "8eb6adec-63c0-4fdb-a670-8dc29c51569f"
},
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"No. of training examples: 3688\n",
"No. of testing examples: 922\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# Import AutoTokenizer with checkpoint\"distilbert-base-uncased\"\n",
"\n",
"tokenizer = AutoTokenizer.from_pretrained(\"distilbert-base-uncased\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 145,
"referenced_widgets": [
"16362f0d98b64c5795565889f10e0b8c",
"4c3632e9677d47978b0e84cf3b59ade1",
"0c537c762db644259239221bb5ed552a",
"f4d578feff814384b5a3156825d9fef6",
"b82d1b601a434414a1845bbba6da2991",
"f40a17458d704cd2a8fbf68729a4198a",
"49606632a7054f55b2ffa7afbe90a00d",
"ce3f68b81ed34c5e8bfc41bd2a7ad263",
"388864342bf0439f8e16639bf53b7efe",
"c7773a01e08e49ddb45e596726132756",
"da2ff64e5e784bd286ffe2facd29204e",
"c8b4feb673cd4f1bbbdbabf6d37b0686",
"673b0dccf94f472082a3006c35faba52",
"d231efd5a8f54d3cbe985b3a8588242b",
"db874ddc16524189a8e4a6e552b62f52",
"bede7c9024aa4989bb4b7157ef6624ac",
"ddd2dfc1b7734da2ab93f5edf70e12fa",
"0dbbf79ec8cd4a1ea0a4428b3484fdc7",
"d16a8b662678426881b3e9b2d5334a23",
"34b007b8c9644ae38da3a014e3bfa948",
"b5833deeac4042fba6a3b694cc130f9b",
"b3f47c9c5e3241d18dcf4d5d69f909b1",
"0fc939f7fe4a4d13a97b6193966bbcb6",
"c6999da9584646cca047c66d7fb29a1c",
"32c2b5e82b804b0ea951ab616dc0c816",
"a83c5449e8d74461b04426af67d84bbd",
"712a0fa0de944866929f7b0e4c72f983",
"a6b69b8ebcbc4ce9ac81644760fe803f",
"ccf402ccd11e4bd5a7122140bccf557a",
"8c16b604a3064738b6ad39636bbc631a",
"e8ee382869754cba926e6449205a5664",
"f700f2a9f0b243e08a47ed8b63e6c559",
"63b832e3fd544cbbbabe6a6244ac2370",
"ff55840fe82b43bfa926e023f08b80ba",
"f58cc893695147e9b5846a36989f922e",
"9cc14543b8cf43679ed0f687cb003d5a",
"e739a07d19c64267a31b0cd1e6a719ea",
"0625902116e742d48274242c38ab2fef",
"70916aa418bd4a36ac09e7ad04806dec",
"b4e64b250fbc44aca8ec694804cbaf49",
"71f9ea49ec4c42f08d2ab6e7c28900ee",
"ce15c858df694a46b4ec35533447b087",
"3eff74ecc5084695920dce706c01511b",
"6a80b108f8af49fdbf504f7c7b305a99"
]
},
"id": "uNtrv_OjL_tl",
"outputId": "f196dbee-db87-42a6-930d-29fa5092e403"
},
"execution_count": 19,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/28.0 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "16362f0d98b64c5795565889f10e0b8c"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/483 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c8b4feb673cd4f1bbbdbabf6d37b0686"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/232k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "0fc939f7fe4a4d13a97b6193966bbcb6"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/466k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ff55840fe82b43bfa926e023f08b80ba"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"# Tokenization work on train_dataset\n",
"def preprocess_function(examples):\n",
" return tokenizer(examples[\"sentence\"], truncation=True, padding=True)\n",
"tokenize_train=train_data.map(preprocess_function,batched=True)\n",
"tokenize_test=test_data.map(preprocess_function,batched=True)\n"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 81,
"referenced_widgets": [
"fc3173dcfe2848f2957e3677ffd07f84",
"6e7bbc64b2a1465586ce2a43ba4b22fa",
"134e5052c9da476fba4d6029da3d85db",
"952ed3c3a0094bb5abfea63b43dcaad8",
"6c1d6efa8be14080845e3321e0f0c188",
"bc8dc1bfa9124c1db3e738e0385cb8b5",
"e3eff38137554e318822ac8973f2f915",
"b8afd916d93142ddb949630bbd382800",
"97fdc3080b40458c9986ac61bb94a98e",
"d658a5fcbc60462ebfc383e7003b52ce",
"0acf000f9e384831aa4edca59abbf10e",
"58883bf03b554d37abd656a35fa86db3",
"5bc293602e704324a39df56dd3c3e96e",
"3d9cc746e07c4def8f74158ac94c6063",
"ba077267515f4182bfcbc587fa08aed2",
"2fbeedcd09264f8bb9d9868e79d35370",
"735d50fd6d7940bb8cd777b8b81f5b54",
"9d21df9b173247808c912105c15ba8ff",
"2de2842792574204814e9a7b297c68da",
"44670957fddd457a9ae0aa5995fada74",
"6958744e38ca4d16a2fa124311702539",
"a3c21cde1af94715a1bd4e0d210f2062"
]
},
"id": "H7FFIuxuMmSi",
"outputId": "29e5ea78-eb6b-4d13-a13f-736c5fe40126"
},
"execution_count": 20,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/4 [00:00<?, ?ba/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "fc3173dcfe2848f2957e3677ffd07f84"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/1 [00:00<?, ?ba/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "58883bf03b554d37abd656a35fa86db3"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"# data_collator\n",
"\n",
"data_collator = DataCollatorWithPadding(tokenizer=tokenizer)"
],
"metadata": {
"id": "hE_OmfhVM_Hj"
},
"execution_count": 21,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# Build model \n",
"\n",
"model = AutoModelForSequenceClassification.from_pretrained(\"distilbert-base-uncased\", num_labels=len(unique_labels))"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 156,
"referenced_widgets": [
"b4a54a4d93634b91aefa01776c400173",
"637a668c4ff845648d08729e20f8d7f0",
"d0704b2725be49f3a079734173086f85",
"86549aa685e84d39a906ed93742d66f9",
"6c0d510901ec428d8440030c6434839d",
"172aa9e4059448e7b6a64e034e1cf171",
"05c7bab10ade4f048b6ff37e17e61238",
"1de2aaab2df74709a7ddd83deab322a8",
"667bcef6967c4a01850e1c7f3d402848",
"d5b5277e37d4467290abb401fc47ae80",
"0922ba7734df437c9a3417d45c5274da"
]
},
"id": "q9D9XGh3NqOX",
"outputId": "4112990e-769e-43fe-d5bd-ce34fc1be630"
},
"execution_count": 22,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading: 0%| | 0.00/268M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "b4a54a4d93634b91aefa01776c400173"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"Some weights of the model checkpoint at distilbert-base-uncased were not used when initializing DistilBertForSequenceClassification: ['vocab_layer_norm.bias', 'vocab_transform.bias', 'vocab_transform.weight', 'vocab_projector.weight', 'vocab_projector.bias', 'vocab_layer_norm.weight']\n",
"- This IS expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
"- This IS NOT expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
"Some weights of DistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['pre_classifier.bias', 'pre_classifier.weight', 'classifier.weight', 'classifier.bias']\n",
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"from datasets import load_metric\n",
"metric = load_metric('accuracy')\n",
"\n",
"def compute_metrics(eval_pred):\n",
" predictions, labels = eval_pred\n",
" predictions = np.argmax(predictions, axis=1)\n",
" return metric.compute(predictions=predictions, references=labels)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 104,
"referenced_widgets": [
"c42dd35421e842699a76a38d9b4c6124",
"7ae1af56270b476e9c84ec9381dbfe7f",
"9680cdca7afe4f81a8aa6c1f6ed48f18",
"dbc2571f8320465f8c9860963d8b2290",
"41ae6d24c1f64db890c959634b613f29",
"f02ca95e42654721aedc22d5d617e601",
"c1423b8980b64f45b9a815a866ba260c",
"9117cc650dc04ed68ce67872291f2f6c",
"00cf005090ec4a0abc33e683fabb65a0",
"fa4c644c022a4a99bb9b709bada15f84",
"99588acc00a54035a17790b2e7d18651"
]
},
"id": "QdY5KKkIR7w2",
"outputId": "737515f7-3828-479d-cdd9-adcb29c6d243"
},
"execution_count": 30,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"<ipython-input-30-7d137328fd2b>:2: FutureWarning: load_metric is deprecated and will be removed in the next major version of datasets. Use 'evaluate.load' instead, from the new library 🤗 Evaluate: https://huggingface.co/docs/evaluate\n",
" metric = load_metric('accuracy')\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading builder script: 0%| | 0.00/1.65k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c42dd35421e842699a76a38d9b4c6124"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"# Model fine tuning training\n",
"training_args = TrainingArguments(\n",
" output_dir=\"/content/results\",\n",
" learning_rate=2e-5,\n",
" per_device_train_batch_size=8,\n",
" per_device_eval_batch_size=8,\n",
" num_train_epochs=20,\n",
" weight_decay=0.01,\n",
" evaluation_strategy=\"epoch\"\n",
")\n",
"\n",
"trainer = Trainer(\n",
" model=model,\n",
" args=training_args,\n",
" train_dataset=tokenize_train,\n",
" eval_dataset=tokenize_test,\n",
" compute_metrics=compute_metrics,\n",
" tokenizer=tokenizer,\n",
" data_collator=data_collator,\n",
")\n",
"\n",
"\n",
"trainer.train()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "1pi7xo9bN7Zn",
"outputId": "87afae93-1334-48f1-d376-741f9eea4f9c"
},
"execution_count": 33,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"PyTorch: setting up devices\n",
"The default value for the training argument `--report_to` will change in v5 (from all installed integrations to none). In v5, you will need to use `--report_to all` to get the same behavior as now. You should start updating your code and make this info disappear :-).\n",
"The following columns in the training set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
" warnings.warn(\n",
"***** Running training *****\n",
" Num examples = 3688\n",
" Num Epochs = 20\n",
" Instantaneous batch size per device = 8\n",
" Total train batch size (w. parallel, distributed & accumulation) = 8\n",
" Gradient Accumulation steps = 1\n",
" Total optimization steps = 9220\n",
" Number of trainable parameters = 67023451\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.HTML object>"
],
"text/html": [
"\n",
" <div>\n",
" \n",
" <progress value='9220' max='9220' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
" [9220/9220 10:23, Epoch 20/20]\n",
" </div>\n",
" <table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: left;\">\n",
" <th>Epoch</th>\n",
" <th>Training Loss</th>\n",
" <th>Validation Loss</th>\n",
" <th>Accuracy</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <td>1</td>\n",
" <td>No log</td>\n",
" <td>1.174354</td>\n",
" <td>0.822126</td>\n",
" </tr>\n",
" <tr>\n",
" <td>2</td>\n",
" <td>0.066100</td>\n",
" <td>1.392280</td>\n",
" <td>0.784165</td>\n",
" </tr>\n",
" <tr>\n",
" <td>3</td>\n",
" <td>0.061900</td>\n",
" <td>1.246237</td>\n",
" <td>0.823210</td>\n",
" </tr>\n",
" <tr>\n",
" <td>4</td>\n",
" <td>0.056900</td>\n",
" <td>1.324116</td>\n",
" <td>0.813449</td>\n",
" </tr>\n",
" <tr>\n",
" <td>5</td>\n",
" <td>0.089800</td>\n",
" <td>1.304054</td>\n",
" <td>0.819957</td>\n",
" </tr>\n",
" <tr>\n",
" <td>6</td>\n",
" <td>0.103200</td>\n",
" <td>1.212749</td>\n",
" <td>0.818872</td>\n",
" </tr>\n",
" <tr>\n",
" <td>7</td>\n",
" <td>0.093600</td>\n",
" <td>1.229501</td>\n",
" <td>0.819957</td>\n",
" </tr>\n",
" <tr>\n",
" <td>8</td>\n",
" <td>0.098000</td>\n",
" <td>1.279489</td>\n",
" <td>0.817787</td>\n",
" </tr>\n",
" <tr>\n",
" <td>9</td>\n",
" <td>0.083700</td>\n",
" <td>1.188151</td>\n",
" <td>0.821041</td>\n",
" </tr>\n",
" <tr>\n",
" <td>10</td>\n",
" <td>0.068900</td>\n",
" <td>1.274577</td>\n",
" <td>0.816703</td>\n",
" </tr>\n",
" <tr>\n",
" <td>11</td>\n",
" <td>0.063100</td>\n",
" <td>1.275792</td>\n",
" <td>0.824295</td>\n",
" </tr>\n",
" <tr>\n",
" <td>12</td>\n",
" <td>0.063700</td>\n",
" <td>1.263834</td>\n",
" <td>0.825380</td>\n",
" </tr>\n",
" <tr>\n",
" <td>13</td>\n",
" <td>0.063700</td>\n",
" <td>1.323240</td>\n",
" <td>0.812364</td>\n",
" </tr>\n",
" <tr>\n",
" <td>14</td>\n",
" <td>0.055600</td>\n",
" <td>1.266973</td>\n",
" <td>0.825380</td>\n",
" </tr>\n",
" <tr>\n",
" <td>15</td>\n",
" <td>0.049200</td>\n",
" <td>1.295590</td>\n",
" <td>0.824295</td>\n",
" </tr>\n",
" <tr>\n",
" <td>16</td>\n",
" <td>0.049600</td>\n",
" <td>1.288514</td>\n",
" <td>0.829718</td>\n",
" </tr>\n",
" <tr>\n",
" <td>17</td>\n",
" <td>0.044600</td>\n",
" <td>1.282528</td>\n",
" <td>0.824295</td>\n",
" </tr>\n",
" <tr>\n",
" <td>18</td>\n",
" <td>0.041200</td>\n",
" <td>1.285815</td>\n",
" <td>0.823210</td>\n",
" </tr>\n",
" <tr>\n",
" <td>19</td>\n",
" <td>0.050200</td>\n",
" <td>1.290950</td>\n",
" <td>0.821041</td>\n",
" </tr>\n",
" <tr>\n",
" <td>20</td>\n",
" <td>0.042100</td>\n",
" <td>1.288992</td>\n",
" <td>0.819957</td>\n",
" </tr>\n",
" </tbody>\n",
"</table><p>"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-500\n",
"Configuration saved in /content/results/checkpoint-500/config.json\n",
"Model weights saved in /content/results/checkpoint-500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-1000\n",
"Configuration saved in /content/results/checkpoint-1000/config.json\n",
"Model weights saved in /content/results/checkpoint-1000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-1000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-1000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-1500\n",
"Configuration saved in /content/results/checkpoint-1500/config.json\n",
"Model weights saved in /content/results/checkpoint-1500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-1500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-1500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-2000\n",
"Configuration saved in /content/results/checkpoint-2000/config.json\n",
"Model weights saved in /content/results/checkpoint-2000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-2000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-2000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-2500\n",
"Configuration saved in /content/results/checkpoint-2500/config.json\n",
"Model weights saved in /content/results/checkpoint-2500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-2500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-2500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-3000\n",
"Configuration saved in /content/results/checkpoint-3000/config.json\n",
"Model weights saved in /content/results/checkpoint-3000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-3000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-3000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-3500\n",
"Configuration saved in /content/results/checkpoint-3500/config.json\n",
"Model weights saved in /content/results/checkpoint-3500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-3500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-3500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-4000\n",
"Configuration saved in /content/results/checkpoint-4000/config.json\n",
"Model weights saved in /content/results/checkpoint-4000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-4000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-4000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-4500\n",
"Configuration saved in /content/results/checkpoint-4500/config.json\n",
"Model weights saved in /content/results/checkpoint-4500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-4500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-4500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-5000\n",
"Configuration saved in /content/results/checkpoint-5000/config.json\n",
"Model weights saved in /content/results/checkpoint-5000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-5000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-5000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-5500\n",
"Configuration saved in /content/results/checkpoint-5500/config.json\n",
"Model weights saved in /content/results/checkpoint-5500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-5500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-5500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-6000\n",
"Configuration saved in /content/results/checkpoint-6000/config.json\n",
"Model weights saved in /content/results/checkpoint-6000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-6000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-6000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-6500\n",
"Configuration saved in /content/results/checkpoint-6500/config.json\n",
"Model weights saved in /content/results/checkpoint-6500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-6500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-6500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-7000\n",
"Configuration saved in /content/results/checkpoint-7000/config.json\n",
"Model weights saved in /content/results/checkpoint-7000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-7000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-7000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-7500\n",
"Configuration saved in /content/results/checkpoint-7500/config.json\n",
"Model weights saved in /content/results/checkpoint-7500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-7500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-7500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-8000\n",
"Configuration saved in /content/results/checkpoint-8000/config.json\n",
"Model weights saved in /content/results/checkpoint-8000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-8000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-8000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-8500\n",
"Configuration saved in /content/results/checkpoint-8500/config.json\n",
"Model weights saved in /content/results/checkpoint-8500/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-8500/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-8500/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"Saving model checkpoint to /content/results/checkpoint-9000\n",
"Configuration saved in /content/results/checkpoint-9000/config.json\n",
"Model weights saved in /content/results/checkpoint-9000/pytorch_model.bin\n",
"tokenizer config file saved in /content/results/checkpoint-9000/tokenizer_config.json\n",
"Special tokens file saved in /content/results/checkpoint-9000/special_tokens_map.json\n",
"The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: __index_level_0__, sentence. If __index_level_0__, sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Evaluation *****\n",
" Num examples = 922\n",
" Batch size = 8\n",
"\n",
"\n",
"Training completed. Do not forget to share your model on huggingface.co/models =)\n",
"\n",
"\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"TrainOutput(global_step=9220, training_loss=0.06487055326490754, metrics={'train_runtime': 624.1342, 'train_samples_per_second': 118.18, 'train_steps_per_second': 14.772, 'total_flos': 869726868928704.0, 'train_loss': 0.06487055326490754, 'epoch': 20.0})"
]
},
"metadata": {},
"execution_count": 33
}
]
},
{
"cell_type": "code",
"source": [
"def SentenceClassifier(InputSentence):\n",
" \"\"\" Take a sentence as input, return the corresponding label\n",
" \n",
" dependencies : tokenizer, trainer\n",
" \"\"\"\n",
" \n",
" def preprocess_function(examples):\n",
" return tokenizer(examples[\"sentence\"], truncation=True, padding=True)\n",
" \n",
" # here, we are keeping the input as a Dataset, which could allow us to reuse the code\n",
" # to answer many questions at once\n",
" InputSentenceDFData = {'sentence' : [InputSentence]}\n",
" InputSentenceDataFrame = pd.DataFrame(data = InputSentenceDFData)\n",
" InputSentenceDataset = datasets.Dataset.from_pandas(InputSentenceDataFrame)\n",
" Tokenised_InputSentence = InputSentenceDataset.map(preprocess_function,batched=False)\n",
" \n",
" LabelScores = trainer.predict(Tokenised_InputSentence)\n",
" BestLabel = LabelScores.predictions.argmax(1)\n",
" \n",
" OutputLabelName = list(LabelToIndex.keys())[list(LabelToIndex.values()).index(BestLabel[0])]\n",
" \n",
" return OutputLabelName"
],
"metadata": {
"id": "VayZySKQXGA3"
},
"execution_count": 36,
"outputs": []
},
{
"cell_type": "code",
"source": [
"InputSentence = \"yes please\".lower()\n",
"OutputLabel = SentenceClassifier(InputSentence)\n",
"print(f'Your question was : \"{InputSentence}\" it was classified as : \"{OutputLabel}\"')"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 156,
"referenced_widgets": [
"5234189fff004658bc07ba90639eb762",
"ce744f6d339e4ffdaf2a5c7d8445a9de",
"3c0679a3691046eda0a0508c55116a7d",
"198aabca329a43b49bb11937be109137",
"65bdd85904ab44ab835eb8d7e28db4ac",
"1f785cff415b4f81af18b87622eb620a",
"fc4cb3050dc34f7bab7339f3043456c1",
"628d5b7bfb2449788e54c68093fca6ed",
"165f3401fae843ab9158e6ebbbf58c84",
"187067e48e4b41b0844d4e77ff9a5014",
"27daf9a6b18b4e2d86c40ed900fcef09"
]
},
"id": "QUrDRrYoXNZI",
"outputId": "1d0cdec9-63b3-4502-fff2-dd32f00e79b8"
},
"execution_count": 62,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/1 [00:00<?, ?ex/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "5234189fff004658bc07ba90639eb762"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"The following columns in the test set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: sentence. If sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Prediction *****\n",
" Num examples = 1\n",
" Batch size = 8\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.HTML object>"
],
"text/html": []
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Your question was : \"yes please\" it was classified as : \"affirm\"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# Save the model and tokenizer locally\n",
"!mkdir /content/CookDial/working\n",
"!mkdir /content/CookDial/working/model/\n",
"!mkdir /content/CookDial/working/tokenizer/\n",
"\n",
"ModelPath = \"/content/CookDial/working/model/\"\n",
"TokenizerPath = \"/content/CookDial/working/tokenizer/\"\n",
"\n",
"if os.path.isdir(ModelPath):\n",
" model.save_pretrained(ModelPath)\n",
" print(\"model ok\")\n",
"if os.path.isdir(TokenizerPath):\n",
" tokenizer.save_pretrained(TokenizerPath)\n",
" print(\"tokenizer ok\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "7B_sHJY8XQ5r",
"outputId": "bf75ca90-ea8c-4b05-c0bc-f9e14cbaeea7"
},
"execution_count": 65,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"Configuration saved in /content/CookDial/working/model/config.json\n",
"Model weights saved in /content/CookDial/working/model/pytorch_model.bin\n",
"tokenizer config file saved in /content/CookDial/working/tokenizer/tokenizer_config.json\n",
"Special tokens file saved in /content/CookDial/working/tokenizer/special_tokens_map.json\n"
]
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"model ok\n",
"tokenizer ok\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# Load the model and tokenizer from a local path\\\n",
"LocalModel = AutoModelForSequenceClassification.from_pretrained(ModelPath,num_labels=len(unique_labels))\n",
"LocalTokenizer = AutoTokenizer.from_pretrained(TokenizerPath)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "g63HNXuHZhCC",
"outputId": "519f7abc-7bf0-44bb-9b89-d19f252c5a43"
},
"execution_count": 66,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"loading configuration file /content/CookDial/working/model/config.json\n",
"Model config DistilBertConfig {\n",
" \"_name_or_path\": \"/content/CookDial/working/model/\",\n",
" \"activation\": \"gelu\",\n",
" \"architectures\": [\n",
" \"DistilBertForSequenceClassification\"\n",
" ],\n",
" \"attention_dropout\": 0.1,\n",
" \"dim\": 768,\n",
" \"dropout\": 0.1,\n",
" \"hidden_dim\": 3072,\n",
" \"id2label\": {\n",
" \"0\": \"LABEL_0\",\n",
" \"1\": \"LABEL_1\",\n",
" \"2\": \"LABEL_2\",\n",
" \"3\": \"LABEL_3\",\n",
" \"4\": \"LABEL_4\",\n",
" \"5\": \"LABEL_5\",\n",
" \"6\": \"LABEL_6\",\n",
" \"7\": \"LABEL_7\",\n",
" \"8\": \"LABEL_8\",\n",
" \"9\": \"LABEL_9\",\n",
" \"10\": \"LABEL_10\",\n",
" \"11\": \"LABEL_11\",\n",
" \"12\": \"LABEL_12\",\n",
" \"13\": \"LABEL_13\",\n",
" \"14\": \"LABEL_14\",\n",
" \"15\": \"LABEL_15\",\n",
" \"16\": \"LABEL_16\",\n",
" \"17\": \"LABEL_17\",\n",
" \"18\": \"LABEL_18\",\n",
" \"19\": \"LABEL_19\",\n",
" \"20\": \"LABEL_20\",\n",
" \"21\": \"LABEL_21\",\n",
" \"22\": \"LABEL_22\",\n",
" \"23\": \"LABEL_23\",\n",
" \"24\": \"LABEL_24\",\n",
" \"25\": \"LABEL_25\",\n",
" \"26\": \"LABEL_26\",\n",
" \"27\": \"LABEL_27\",\n",
" \"28\": \"LABEL_28\",\n",
" \"29\": \"LABEL_29\",\n",
" \"30\": \"LABEL_30\",\n",
" \"31\": \"LABEL_31\",\n",
" \"32\": \"LABEL_32\",\n",
" \"33\": \"LABEL_33\",\n",
" \"34\": \"LABEL_34\",\n",
" \"35\": \"LABEL_35\",\n",
" \"36\": \"LABEL_36\",\n",
" \"37\": \"LABEL_37\",\n",
" \"38\": \"LABEL_38\",\n",
" \"39\": \"LABEL_39\",\n",
" \"40\": \"LABEL_40\",\n",
" \"41\": \"LABEL_41\",\n",
" \"42\": \"LABEL_42\",\n",
" \"43\": \"LABEL_43\",\n",
" \"44\": \"LABEL_44\",\n",
" \"45\": \"LABEL_45\",\n",
" \"46\": \"LABEL_46\",\n",
" \"47\": \"LABEL_47\",\n",
" \"48\": \"LABEL_48\",\n",
" \"49\": \"LABEL_49\",\n",
" \"50\": \"LABEL_50\",\n",
" \"51\": \"LABEL_51\",\n",
" \"52\": \"LABEL_52\",\n",
" \"53\": \"LABEL_53\",\n",
" \"54\": \"LABEL_54\",\n",
" \"55\": \"LABEL_55\",\n",
" \"56\": \"LABEL_56\",\n",
" \"57\": \"LABEL_57\",\n",
" \"58\": \"LABEL_58\",\n",
" \"59\": \"LABEL_59\",\n",
" \"60\": \"LABEL_60\",\n",
" \"61\": \"LABEL_61\",\n",
" \"62\": \"LABEL_62\",\n",
" \"63\": \"LABEL_63\",\n",
" \"64\": \"LABEL_64\",\n",
" \"65\": \"LABEL_65\",\n",
" \"66\": \"LABEL_66\",\n",
" \"67\": \"LABEL_67\",\n",
" \"68\": \"LABEL_68\",\n",
" \"69\": \"LABEL_69\",\n",
" \"70\": \"LABEL_70\",\n",
" \"71\": \"LABEL_71\",\n",
" \"72\": \"LABEL_72\",\n",
" \"73\": \"LABEL_73\",\n",
" \"74\": \"LABEL_74\",\n",
" \"75\": \"LABEL_75\",\n",
" \"76\": \"LABEL_76\",\n",
" \"77\": \"LABEL_77\",\n",
" \"78\": \"LABEL_78\",\n",
" \"79\": \"LABEL_79\",\n",
" \"80\": \"LABEL_80\",\n",
" \"81\": \"LABEL_81\",\n",
" \"82\": \"LABEL_82\",\n",
" \"83\": \"LABEL_83\",\n",
" \"84\": \"LABEL_84\",\n",
" \"85\": \"LABEL_85\",\n",
" \"86\": \"LABEL_86\",\n",
" \"87\": \"LABEL_87\",\n",
" \"88\": \"LABEL_88\",\n",
" \"89\": \"LABEL_89\",\n",
" \"90\": \"LABEL_90\"\n",
" },\n",
" \"initializer_range\": 0.02,\n",
" \"label2id\": {\n",
" \"LABEL_0\": 0,\n",
" \"LABEL_1\": 1,\n",
" \"LABEL_10\": 10,\n",
" \"LABEL_11\": 11,\n",
" \"LABEL_12\": 12,\n",
" \"LABEL_13\": 13,\n",
" \"LABEL_14\": 14,\n",
" \"LABEL_15\": 15,\n",
" \"LABEL_16\": 16,\n",
" \"LABEL_17\": 17,\n",
" \"LABEL_18\": 18,\n",
" \"LABEL_19\": 19,\n",
" \"LABEL_2\": 2,\n",
" \"LABEL_20\": 20,\n",
" \"LABEL_21\": 21,\n",
" \"LABEL_22\": 22,\n",
" \"LABEL_23\": 23,\n",
" \"LABEL_24\": 24,\n",
" \"LABEL_25\": 25,\n",
" \"LABEL_26\": 26,\n",
" \"LABEL_27\": 27,\n",
" \"LABEL_28\": 28,\n",
" \"LABEL_29\": 29,\n",
" \"LABEL_3\": 3,\n",
" \"LABEL_30\": 30,\n",
" \"LABEL_31\": 31,\n",
" \"LABEL_32\": 32,\n",
" \"LABEL_33\": 33,\n",
" \"LABEL_34\": 34,\n",
" \"LABEL_35\": 35,\n",
" \"LABEL_36\": 36,\n",
" \"LABEL_37\": 37,\n",
" \"LABEL_38\": 38,\n",
" \"LABEL_39\": 39,\n",
" \"LABEL_4\": 4,\n",
" \"LABEL_40\": 40,\n",
" \"LABEL_41\": 41,\n",
" \"LABEL_42\": 42,\n",
" \"LABEL_43\": 43,\n",
" \"LABEL_44\": 44,\n",
" \"LABEL_45\": 45,\n",
" \"LABEL_46\": 46,\n",
" \"LABEL_47\": 47,\n",
" \"LABEL_48\": 48,\n",
" \"LABEL_49\": 49,\n",
" \"LABEL_5\": 5,\n",
" \"LABEL_50\": 50,\n",
" \"LABEL_51\": 51,\n",
" \"LABEL_52\": 52,\n",
" \"LABEL_53\": 53,\n",
" \"LABEL_54\": 54,\n",
" \"LABEL_55\": 55,\n",
" \"LABEL_56\": 56,\n",
" \"LABEL_57\": 57,\n",
" \"LABEL_58\": 58,\n",
" \"LABEL_59\": 59,\n",
" \"LABEL_6\": 6,\n",
" \"LABEL_60\": 60,\n",
" \"LABEL_61\": 61,\n",
" \"LABEL_62\": 62,\n",
" \"LABEL_63\": 63,\n",
" \"LABEL_64\": 64,\n",
" \"LABEL_65\": 65,\n",
" \"LABEL_66\": 66,\n",
" \"LABEL_67\": 67,\n",
" \"LABEL_68\": 68,\n",
" \"LABEL_69\": 69,\n",
" \"LABEL_7\": 7,\n",
" \"LABEL_70\": 70,\n",
" \"LABEL_71\": 71,\n",
" \"LABEL_72\": 72,\n",
" \"LABEL_73\": 73,\n",
" \"LABEL_74\": 74,\n",
" \"LABEL_75\": 75,\n",
" \"LABEL_76\": 76,\n",
" \"LABEL_77\": 77,\n",
" \"LABEL_78\": 78,\n",
" \"LABEL_79\": 79,\n",
" \"LABEL_8\": 8,\n",
" \"LABEL_80\": 80,\n",
" \"LABEL_81\": 81,\n",
" \"LABEL_82\": 82,\n",
" \"LABEL_83\": 83,\n",
" \"LABEL_84\": 84,\n",
" \"LABEL_85\": 85,\n",
" \"LABEL_86\": 86,\n",
" \"LABEL_87\": 87,\n",
" \"LABEL_88\": 88,\n",
" \"LABEL_89\": 89,\n",
" \"LABEL_9\": 9,\n",
" \"LABEL_90\": 90\n",
" },\n",
" \"max_position_embeddings\": 512,\n",
" \"model_type\": \"distilbert\",\n",
" \"n_heads\": 12,\n",
" \"n_layers\": 6,\n",
" \"pad_token_id\": 0,\n",
" \"problem_type\": \"single_label_classification\",\n",
" \"qa_dropout\": 0.1,\n",
" \"seq_classif_dropout\": 0.2,\n",
" \"sinusoidal_pos_embds\": false,\n",
" \"tie_weights_\": true,\n",
" \"torch_dtype\": \"float32\",\n",
" \"transformers_version\": \"4.25.1\",\n",
" \"vocab_size\": 30522\n",
"}\n",
"\n",
"loading weights file /content/CookDial/working/model/pytorch_model.bin\n",
"All model checkpoint weights were used when initializing DistilBertForSequenceClassification.\n",
"\n",
"All the weights of DistilBertForSequenceClassification were initialized from the model checkpoint at /content/CookDial/working/model/.\n",
"If your task is similar to the task the model of the checkpoint was trained on, you can already use DistilBertForSequenceClassification for predictions without further training.\n",
"loading file vocab.txt\n",
"loading file tokenizer.json\n",
"loading file added_tokens.json\n",
"loading file special_tokens_map.json\n",
"loading file tokenizer_config.json\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"def LocalSentenceClassifier(InputSentence):\n",
" \"\"\" Take a sentence as input, return the corresponding label\n",
" \n",
" dependencies : LocalTokenizer, LocalModel\n",
" We use tokenizer2 and trainer2 instead of tokeninzer and trainer\n",
" to be sure that this function works with the data saved and load locally\n",
" \"\"\"\n",
" \n",
" trainer = Trainer(\n",
" model=LocalModel,\n",
" args=training_args,\n",
" train_dataset=tokenize_train,\n",
" #eval_dataset=tokenize_test, Here, we work with the entire dataset as training data\n",
" #compute_metrics=compute_metrics,\n",
" tokenizer=tokenizer,\n",
" data_collator=data_collator,\n",
" )\n",
" \n",
" def preprocess_function(examples):\n",
" return LocalTokenizer(examples[\"sentence\"], truncation=True, padding=True)\n",
" \n",
" # here, we are keeping the input as a Dataset, which could allow us to reuse the code\n",
" # to answer many questions at once\n",
" InputSentenceDFData = {'sentence' : [InputSentence]}\n",
" InputSentenceDataFrame = pd.DataFrame(data = InputSentenceDFData)\n",
" InputSentenceDataset = datasets.Dataset.from_pandas(InputSentenceDataFrame)\n",
" Tokenised_InputSentence = InputSentenceDataset.map(preprocess_function,batched=False)\n",
" \n",
" LabelScores = trainer.predict(Tokenised_InputSentence)\n",
" BestLabel = LabelScores.predictions.argmax(1)\n",
" \n",
" OutputLabelName = list(LabelToIndex.keys())[list(LabelToIndex.values()).index(BestLabel[0])]\n",
" \n",
" return OutputLabelName"
],
"metadata": {
"id": "9Vuln6gdaVGY"
},
"execution_count": 69,
"outputs": []
},
{
"cell_type": "code",
"source": [
"InputSentence = \"ok next step\"\n",
"OutputLabel = LocalSentenceClassifier(InputSentence)\n",
"print(f'Your question was : \"{InputSentence}\" it was classified as : \"{OutputLabel}\"')"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 156,
"referenced_widgets": [
"e9113237710c4692a4a7ab64a6793220",
"ae1ba4d0e7304a93b60e9249bc65e009",
"37f3ac59e9414797a531cbd7ad8a4ee6",
"8cbdc0c1ff074a21b12b65437c6f81e5",
"c1847c02356f4341a91c061ab96313e9",
"5b64f35757df4f70acc6d1a42e3e9083",
"201eea97897649a3ab7ad114ff8c7b6f",
"ffdf6b640a1840e491a5ef281d10774a",
"ee3c98646dd6402680287e3fc1086a2b",
"8812dac4c9ce49e8a8e0b90372016262",
"9063989066d24362b0f49189c32b70b9"
]
},
"id": "WR2fmxg_aXS8",
"outputId": "fa18f374-90e4-4e83-c632-a4d7b139f928"
},
"execution_count": 70,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" 0%| | 0/1 [00:00<?, ?ex/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "e9113237710c4692a4a7ab64a6793220"
}
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"The following columns in the test set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: sentence. If sentence are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n",
"***** Running Prediction *****\n",
" Num examples = 1\n",
" Batch size = 8\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.HTML object>"
],
"text/html": []
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Your question was : \"ok next step\" it was classified as : \"req_instruction\"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# used train script: https://www.kaggle.com/code/philanoe/intent-classifier-training"
],
"metadata": {
"id": "_vGry77OdDyg"
},
"execution_count": null,
"outputs": []
}
]
}