├── README.md
├── Florence-2-Models-Image-Caption
└── Florence2_Models.ipynb
├── LICENSE
├── Megalodon-OCR-Sync-0713-ColabNotebook
└── Megalodon_OCR_Sync_0713_ReportLab.ipynb
├── Qwen2.5-VL-3B-Instruct
└── Qwen2_5_VL_3B_Instruct_ReportLab.ipynb
├── Behemoth-3B-070225-post0.1
└── Behemoth_3B_070225_post0_1_ReportLab.ipynb
└── Qwen2-VL-OCR-2B-Instruct
└── Qwen2_VL_OCR_2B_Instruct.ipynb
/README.md:
--------------------------------------------------------------------------------
1 | # **[OCR-ReportLab-Notebooks](https://huggingface.co/prithivMLmods/OCR-ReportLab-Notebooks/tree/main)**
2 |
3 | 
4 |
5 | > [!note]
6 | **OCR-ReportLab** is a collection of Colab notebooks designed to perform Optical Character Recognition (OCR) on images and generate DOCX or PDF documents containing both the original image and the extracted text. It supports multiple state-of-the-art vision-language models for experimentation and practical use.
7 |
8 | ## Notebooks
9 |
10 | You can launch and run the following notebooks directly in Google Colab:
11 |
12 | - **Nanonets OCR:** [Open in Colab](https://colab.research.google.com/drive/1VvA-amvSVxGdWgIsh4_by6KWOtEs_Iqp)
13 | - **Monkey OCR:** [Open in Colab](https://colab.research.google.com/drive/1vPCojbmlXjDFUt06FJ1tjgnj_zWK4mUo)
14 | - **OCRFlux 3B:** [Open in Colab](https://colab.research.google.com/drive/1TDoCXzWdF2hxVLbISqW6DjXAzOyI7pzf)
15 | - **Typhoon OCR:** [Open in Colab](https://colab.research.google.com/drive/1_59zvLNnn1kvbiSFxzA1WiqhpbW8RKbz)
16 |
17 | ## Features
18 |
19 | - Extracts text from input images using various OCR models
20 | - Embeds the image and extracted text into DOCX or PDF formats
21 | - Designed for quick deployment via Google Colab
22 |
23 | ## Supported Models
24 |
25 | The repository currently supports the following OCR implementations:
26 |
27 | - **Nanonets OCR**
28 | - **Monkey OCR**
29 | - **OCRFlux 3B**
30 | - **Typhoon OCR 3B**
31 |
32 | ## Installation
33 |
34 | No installation is required. Simply click on the links above to run the notebooks in Google Colab. Make sure to upload your image file(s) when prompted and follow the instructions in the notebook.
35 |
36 | ---
37 |
38 | ## Other Images
39 |
40 | ---
41 |
42 |
43 |
44 |
45 |
46 | OCR
47 | |
48 |
49 |
50 | Caption
51 | |
52 |
53 |
54 |
55 | ---
56 |
57 | 
58 |
59 | ---
60 |
61 | ## Dependencies
62 |
63 | The notebooks are built using:
64 |
65 | - Python
66 | - PyTorch
67 | - Hugging Face Transformers
68 | - ReportLab
69 | - Gradio (for UI)
70 | - (Qwen2.5-VL based)
71 |
72 | All dependencies are automatically installed in the Colab environment.
73 |
74 | ## Author
75 |
76 | Created and maintained by [PRITHIVSAKTHIUR](https://github.com/PRITHIVSAKTHIUR)
77 |
--------------------------------------------------------------------------------
/Florence-2-Models-Image-Caption/Florence2_Models.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "source": [
6 | "***Florence-2 Models Image Captions : Image-to-Text***\n",
7 | "\n",
8 | "*notebook by : [prithivMLmods](https://huggingface.co/prithivMLmods)🤗 x ❤️*"
9 | ],
10 | "metadata": {
11 | "id": "0wlBVusvHBDY"
12 | }
13 | },
14 | {
15 | "cell_type": "markdown",
16 | "source": [
17 | "***Installing all necessary packages***"
18 | ],
19 | "metadata": {
20 | "id": "v_lhI9uSHcfX"
21 | }
22 | },
23 | {
24 | "cell_type": "code",
25 | "execution_count": null,
26 | "metadata": {
27 | "id": "d9NXmBEN4-5z"
28 | },
29 | "outputs": [],
30 | "source": [
31 | "%%capture\n",
32 | "!pip install transformers==4.48.0 timm\n",
33 | "!pip install huggingface_hub hf_xet\n",
34 | "#Hold tight, this will take around 3-5 minutes."
35 | ]
36 | },
37 | {
38 | "cell_type": "markdown",
39 | "source": [
40 | "***Run app 💨***"
41 | ],
42 | "metadata": {
43 | "id": "exk2jXyoHdwv"
44 | }
45 | },
46 | {
47 | "cell_type": "code",
48 | "execution_count": null,
49 | "metadata": {
50 | "colab": {
51 | "background_save": true
52 | },
53 | "id": "3Z7bnSM35Sfc"
54 | },
55 | "outputs": [],
56 | "source": [
57 | "import gradio as gr\n",
58 | "import subprocess\n",
59 | "import torch\n",
60 | "from PIL import Image\n",
61 | "from transformers import AutoProcessor, AutoModelForCausalLM\n",
62 | "\n",
63 | "#--------- Hold tight — installation takes only 2–3 minutes ---------#\n",
64 | "# Attempt to install flash-attn\n",
65 | "try:\n",
66 | " subprocess.run('pip install flash-attn==1.0.9 --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': \"TRUE\"}, check=True, shell=True)\n",
67 | "except subprocess.CalledProcessError as e:\n",
68 | " print(f\"Error installing flash-attn: {e}\")\n",
69 | " print(\"Continuing without flash-attn.\")\n",
70 | "#--------- Hold tight — installation takes only 2–3 minutes ---------#\n",
71 | "\n",
72 | "# Determine the device to use\n",
73 | "device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
74 | "\n",
75 | "# Load the base model and processor\n",
76 | "try:\n",
77 | " vision_language_model_base = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True).to(device).eval()\n",
78 | " vision_language_processor_base = AutoProcessor.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True)\n",
79 | "except Exception as e:\n",
80 | " print(f\"Error loading base model: {e}\")\n",
81 | " vision_language_model_base = None\n",
82 | " vision_language_processor_base = None\n",
83 | "\n",
84 | "# Load the large model and processor\n",
85 | "try:\n",
86 | " vision_language_model_large = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True).to(device).eval()\n",
87 | " vision_language_processor_large = AutoProcessor.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True)\n",
88 | "except Exception as e:\n",
89 | " print(f\"Error loading large model: {e}\")\n",
90 | " vision_language_model_large = None\n",
91 | " vision_language_processor_large = None\n",
92 | "\n",
93 | "def describe_image(uploaded_image, model_choice):\n",
94 | " \"\"\"\n",
95 | " Generates a detailed description of the input image using the selected model.\n",
96 | "\n",
97 | " Args:\n",
98 | " uploaded_image (PIL.Image.Image): The image to describe.\n",
99 | " model_choice (str): The model to use, either \"Base\" or \"Large\".\n",
100 | "\n",
101 | " Returns:\n",
102 | " str: A detailed textual description of the image or an error message.\n",
103 | " \"\"\"\n",
104 | " if uploaded_image is None:\n",
105 | " return \"Please upload an image.\"\n",
106 | "\n",
107 | " if model_choice == \"Florence-2-base\":\n",
108 | " if vision_language_model_base is None:\n",
109 | " return \"Base model failed to load.\"\n",
110 | " model = vision_language_model_base\n",
111 | " processor = vision_language_processor_base\n",
112 | " elif model_choice == \"Florence-2-large\":\n",
113 | " if vision_language_model_large is None:\n",
114 | " return \"Large model failed to load.\"\n",
115 | " model = vision_language_model_large\n",
116 | " processor = vision_language_processor_large\n",
117 | " else:\n",
118 | " return \"Invalid model choice.\"\n",
119 | "\n",
120 | " if not isinstance(uploaded_image, Image.Image):\n",
121 | " uploaded_image = Image.fromarray(uploaded_image)\n",
122 | "\n",
123 | " inputs = processor(text=\"\", images=uploaded_image, return_tensors=\"pt\").to(device)\n",
124 | " with torch.no_grad():\n",
125 | " generated_ids = model.generate(\n",
126 | " input_ids=inputs[\"input_ids\"],\n",
127 | " pixel_values=inputs[\"pixel_values\"],\n",
128 | " max_new_tokens=1024,\n",
129 | " early_stopping=False,\n",
130 | " do_sample=False,\n",
131 | " num_beams=3,\n",
132 | " )\n",
133 | " generated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]\n",
134 | " processed_description = processor.post_process_generation(\n",
135 | " generated_text,\n",
136 | " task=\"\",\n",
137 | " image_size=(uploaded_image.width, uploaded_image.height)\n",
138 | " )\n",
139 | " image_description = processed_description[\"\"]\n",
140 | " print(\"\\nImage description generated!:\", image_description)\n",
141 | " return image_description\n",
142 | "\n",
143 | "# Description for the interface\n",
144 | "description = \"> Select the model to use for generating the image description. 'Base' is smaller and faster, while 'Large' is more accurate but slower.\"\n",
145 | "if device == \"cpu\":\n",
146 | " description += \" Note: Running on CPU, which may be slow for large models.\"\n",
147 | "\n",
148 | "css = \"\"\"\n",
149 | ".submit-btn {\n",
150 | " background-color: #4682B4 !important;\n",
151 | " color: white !important;\n",
152 | "}\n",
153 | ".submit-btn:hover {\n",
154 | " background-color: #87CEEB !important;\n",
155 | "}\n",
156 | "\"\"\"\n",
157 | "\n",
158 | "# Create the Gradio interface with Blocks\n",
159 | "with gr.Blocks(theme=\"bethecloud/storj_theme\", css=css) as demo:\n",
160 | " gr.Markdown(\"# **[Florence-2 Models Image Captions](https://huggingface.co/collections/prithivMLmods/multimodal-implementations-67c9982ea04b39f0608badb0)**\")\n",
161 | " gr.Markdown(description)\n",
162 | " with gr.Row():\n",
163 | " # Left column: Input image and Generate button\n",
164 | " with gr.Column():\n",
165 | " image_input = gr.Image(label=\"Upload Image\", type=\"pil\")\n",
166 | " generate_btn = gr.Button(\"Generate Caption\", elem_classes=\"submit-btn\")\n",
167 | " # Right column: Model choice, output, and examples\n",
168 | " with gr.Column():\n",
169 | " model_choice = gr.Radio([\"Florence-2-base\", \"Florence-2-large\"], label=\"Model Choice\", value=\"Florence-2-base\")\n",
170 | " with gr.Row():\n",
171 | " output = gr.Textbox(label=\"Generated Caption\", lines=4, show_copy_button=True)\n",
172 | " # Connect the button to the function\n",
173 | " generate_btn.click(fn=describe_image, inputs=[image_input, model_choice], outputs=output)\n",
174 | "\n",
175 | "# Launch the interface\n",
176 | "demo.launch(debug=True)"
177 | ]
178 | },
179 | {
180 | "cell_type": "markdown",
181 | "source": [
182 | "## **Demo Inference Screenshots**\n",
183 | "\n",
184 | "|  |  |\n",
185 | "|:---------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|\n"
186 | ],
187 | "metadata": {
188 | "id": "NFKGwtueGfcW"
189 | }
190 | }
191 | ],
192 | "metadata": {
193 | "accelerator": "GPU",
194 | "colab": {
195 | "gpuType": "T4",
196 | "provenance": []
197 | },
198 | "kernelspec": {
199 | "display_name": "Python 3",
200 | "name": "python3"
201 | },
202 | "language_info": {
203 | "name": "python"
204 | }
205 | },
206 | "nbformat": 4,
207 | "nbformat_minor": 0
208 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Megalodon-OCR-Sync-0713-ColabNotebook/Megalodon_OCR_Sync_0713_ReportLab.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "uFovmijgUV1Z"
7 | },
8 | "source": [
9 | "***Multimodal OCR ReportLab : Megalodon-OCR-Sync-0713***\n",
10 | "\n",
11 | "*notebook by : [prithivMLmods](https://huggingface.co/prithivMLmods)🤗 x ❤️*"
12 | ]
13 | },
14 | {
15 | "cell_type": "markdown",
16 | "metadata": {
17 | "id": "RugX4SGZV-8O"
18 | },
19 | "source": [
20 | "***Installing all necessary packages***"
21 | ]
22 | },
23 | {
24 | "cell_type": "code",
25 | "execution_count": null,
26 | "metadata": {
27 | "id": "l-NtFtjSpuJQ"
28 | },
29 | "outputs": [],
30 | "source": [
31 | "%%capture\n",
32 | "!pip install gradio transformers transformers-stream-generator qwen-vl-utils\n",
33 | "!pip install torchvision torch huggingface_hub spaces accelerate ipython\n",
34 | "!pip install pillow av python-docx requests numpy reportlab fpdf hf_xet\n",
35 | "#Hold tight, this will take around 3-5 minutes."
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {
41 | "id": "mvoSnRZcVBu4"
42 | },
43 | "source": [
44 | "***Run app***"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {
51 | "id": "tElKr2Fkp1bO"
52 | },
53 | "outputs": [],
54 | "source": [
55 | "#Model used in the app: https://huggingface.co/prithivMLmods/Megalodon-OCR-Sync-0713\n",
56 | "#Architecture built on: Qwen2_5_VLForConditionalGeneration [qwen2_5_vl]\n",
57 | "import gradio as gr\n",
58 | "import spaces\n",
59 | "from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor, TextIteratorStreamer\n",
60 | "from qwen_vl_utils import process_vision_info\n",
61 | "import torch\n",
62 | "from PIL import Image\n",
63 | "import os\n",
64 | "import uuid\n",
65 | "import io\n",
66 | "from threading import Thread\n",
67 | "from reportlab.lib.pagesizes import A4\n",
68 | "from reportlab.lib.styles import getSampleStyleSheet\n",
69 | "from reportlab.lib import colors\n",
70 | "from reportlab.platypus import SimpleDocTemplate, Image as RLImage, Paragraph, Spacer\n",
71 | "from reportlab.lib.units import inch\n",
72 | "from reportlab.pdfbase import pdfmetrics\n",
73 | "from reportlab.pdfbase.ttfonts import TTFont\n",
74 | "import docx\n",
75 | "from docx.enum.text import WD_ALIGN_PARAGRAPH\n",
76 | "\n",
77 | "# Define model options\n",
78 | "MODEL_OPTIONS = {\n",
79 | " \"Megalodon-OCR-Sync-0713\": \"prithivMLmods/Megalodon-OCR-Sync-0713\",\n",
80 | "}\n",
81 | "\n",
82 | "# Preload models and processors into CUDA\n",
83 | "models = {}\n",
84 | "processors = {}\n",
85 | "for name, model_id in MODEL_OPTIONS.items():\n",
86 | " print(f\"Loading {name}🤗. Hold tight, this will take around 4-6 minutes..\")\n",
87 | " models[name] = Qwen2_5_VLForConditionalGeneration.from_pretrained(\n",
88 | " model_id,\n",
89 | " trust_remote_code=True,\n",
90 | " torch_dtype=torch.float16\n",
91 | " ).to(\"cuda\").eval()\n",
92 | " processors[name] = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)\n",
93 | "\n",
94 | "image_extensions = Image.registered_extensions()\n",
95 | "\n",
96 | "def identify_and_save_blob(blob_path):\n",
97 | " \"\"\"Identifies if the blob is an image and saves it.\"\"\"\n",
98 | " try:\n",
99 | " with open(blob_path, 'rb') as file:\n",
100 | " blob_content = file.read()\n",
101 | " try:\n",
102 | " Image.open(io.BytesIO(blob_content)).verify() # Check if it's a valid image\n",
103 | " extension = \".png\" # Default to PNG for saving\n",
104 | " media_type = \"image\"\n",
105 | " except (IOError, SyntaxError):\n",
106 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
107 | "\n",
108 | " filename = f\"temp_{uuid.uuid4()}_media{extension}\"\n",
109 | " with open(filename, \"wb\") as f:\n",
110 | " f.write(blob_content)\n",
111 | "\n",
112 | " return filename, media_type\n",
113 | "\n",
114 | " except FileNotFoundError:\n",
115 | " raise ValueError(f\"The file {blob_path} was not found.\")\n",
116 | " except Exception as e:\n",
117 | " raise ValueError(f\"An error occurred while processing the file: {e}\")\n",
118 | "\n",
119 | "@spaces.GPU\n",
120 | "def qwen_inference(model_name, media_input, text_input=None):\n",
121 | " \"\"\"Handles inference for the selected model.\"\"\"\n",
122 | " model = models[model_name]\n",
123 | " processor = processors[model_name]\n",
124 | "\n",
125 | " if isinstance(media_input, str):\n",
126 | " media_path = media_input\n",
127 | " if media_path.endswith(tuple([i for i in image_extensions.keys()])):\n",
128 | " media_type = \"image\"\n",
129 | " else:\n",
130 | " try:\n",
131 | " media_path, media_type = identify_and_save_blob(media_input)\n",
132 | " except Exception as e:\n",
133 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
134 | "\n",
135 | " messages = [\n",
136 | " {\n",
137 | " \"role\": \"user\",\n",
138 | " \"content\": [\n",
139 | " {\n",
140 | " \"type\": media_type,\n",
141 | " media_type: media_path\n",
142 | " },\n",
143 | " {\"type\": \"text\", \"text\": text_input},\n",
144 | " ],\n",
145 | " }\n",
146 | " ]\n",
147 | "\n",
148 | " text = processor.apply_chat_template(\n",
149 | " messages, tokenize=False, add_generation_prompt=True\n",
150 | " )\n",
151 | " image_inputs, _ = process_vision_info(messages)\n",
152 | " inputs = processor(\n",
153 | " text=[text],\n",
154 | " images=image_inputs,\n",
155 | " padding=True,\n",
156 | " return_tensors=\"pt\",\n",
157 | " ).to(\"cuda\")\n",
158 | "\n",
159 | " streamer = TextIteratorStreamer(\n",
160 | " processor.tokenizer, skip_prompt=True, skip_special_tokens=True\n",
161 | " )\n",
162 | " generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)\n",
163 | "\n",
164 | " thread = Thread(target=model.generate, kwargs=generation_kwargs)\n",
165 | " thread.start()\n",
166 | "\n",
167 | " buffer = \"\"\n",
168 | " for new_text in streamer:\n",
169 | " buffer += new_text\n",
170 | " # Remove <|im_end|> or similar tokens from the output\n",
171 | " buffer = buffer.replace(\"<|im_end|>\", \"\")\n",
172 | " yield buffer\n",
173 | "\n",
174 | "def format_plain_text(output_text):\n",
175 | " \"\"\"Formats the output text as plain text without LaTeX delimiters.\"\"\"\n",
176 | " # Remove LaTeX delimiters and convert to plain text\n",
177 | " plain_text = output_text.replace(\"\\\\(\", \"\").replace(\"\\\\)\", \"\").replace(\"\\\\[\", \"\").replace(\"\\\\]\", \"\")\n",
178 | " return plain_text\n",
179 | "\n",
180 | "def generate_document(media_path, output_text, file_format, font_size, line_spacing, alignment, image_size):\n",
181 | " \"\"\"Generates a document with the input image and plain text output.\"\"\"\n",
182 | " plain_text = format_plain_text(output_text)\n",
183 | " if file_format == \"pdf\":\n",
184 | " return generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
185 | " elif file_format == \"docx\":\n",
186 | " return generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
187 | "\n",
188 | "def generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
189 | " \"\"\"Generates a PDF document.\"\"\"\n",
190 | " filename = f\"output_{uuid.uuid4()}.pdf\"\n",
191 | " doc = SimpleDocTemplate(\n",
192 | " filename,\n",
193 | " pagesize=A4,\n",
194 | " rightMargin=inch,\n",
195 | " leftMargin=inch,\n",
196 | " topMargin=inch,\n",
197 | " bottomMargin=inch\n",
198 | " )\n",
199 | " styles = getSampleStyleSheet()\n",
200 | " styles[\"Normal\"].fontSize = int(font_size)\n",
201 | " styles[\"Normal\"].leading = int(font_size) * line_spacing\n",
202 | " styles[\"Normal\"].alignment = {\n",
203 | " \"Left\": 0,\n",
204 | " \"Center\": 1,\n",
205 | " \"Right\": 2,\n",
206 | " \"Justified\": 4\n",
207 | " }[alignment]\n",
208 | "\n",
209 | " story = []\n",
210 | "\n",
211 | " # Add image with size adjustment\n",
212 | " image_sizes = {\n",
213 | " \"Small\": (200, 200),\n",
214 | " \"Medium\": (400, 400),\n",
215 | " \"Large\": (600, 600)\n",
216 | " }\n",
217 | " img = RLImage(media_path, width=image_sizes[image_size][0], height=image_sizes[image_size][1])\n",
218 | " story.append(img)\n",
219 | " story.append(Spacer(1, 12))\n",
220 | "\n",
221 | " # Add plain text output\n",
222 | " text = Paragraph(plain_text, styles[\"Normal\"])\n",
223 | " story.append(text)\n",
224 | "\n",
225 | " doc.build(story)\n",
226 | " return filename\n",
227 | "\n",
228 | "def generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
229 | " \"\"\"Generates a DOCX document.\"\"\"\n",
230 | " filename = f\"output_{uuid.uuid4()}.docx\"\n",
231 | " doc = docx.Document()\n",
232 | "\n",
233 | " # Add image with size adjustment\n",
234 | " image_sizes = {\n",
235 | " \"Small\": docx.shared.Inches(2),\n",
236 | " \"Medium\": docx.shared.Inches(4),\n",
237 | " \"Large\": docx.shared.Inches(6)\n",
238 | " }\n",
239 | " doc.add_picture(media_path, width=image_sizes[image_size])\n",
240 | " doc.add_paragraph()\n",
241 | "\n",
242 | " # Add plain text output\n",
243 | " paragraph = doc.add_paragraph()\n",
244 | " paragraph.paragraph_format.line_spacing = line_spacing\n",
245 | " paragraph.paragraph_format.alignment = {\n",
246 | " \"Left\": WD_ALIGN_PARAGRAPH.LEFT,\n",
247 | " \"Center\": WD_ALIGN_PARAGRAPH.CENTER,\n",
248 | " \"Right\": WD_ALIGN_PARAGRAPH.RIGHT,\n",
249 | " \"Justified\": WD_ALIGN_PARAGRAPH.JUSTIFY\n",
250 | " }[alignment]\n",
251 | " run = paragraph.add_run(plain_text)\n",
252 | " run.font.size = docx.shared.Pt(int(font_size))\n",
253 | "\n",
254 | " doc.save(filename)\n",
255 | " return filename\n",
256 | "\n",
257 | "# CSS for output styling\n",
258 | "css = \"\"\"\n",
259 | " #output {\n",
260 | " height: 500px;\n",
261 | " overflow: auto;\n",
262 | " border: 1px solid #ccc;\n",
263 | " }\n",
264 | ".submit-btn {\n",
265 | " background-color: #cf3434 !important;\n",
266 | " color: white !important;\n",
267 | "}\n",
268 | ".submit-btn:hover {\n",
269 | " background-color: #ff2323 !important;\n",
270 | "}\n",
271 | ".download-btn {\n",
272 | " background-color: #35a6d6 !important;\n",
273 | " color: white !important;\n",
274 | "}\n",
275 | ".download-btn:hover {\n",
276 | " background-color: #22bcff !important;\n",
277 | "}\n",
278 | "\"\"\"\n",
279 | "\n",
280 | "# Gradio app setup\n",
281 | "with gr.Blocks(css=css, theme=\"bethecloud/storj_theme\") as demo:\n",
282 | " gr.Markdown(\"# **Multimodal-OCR : Megalodon-OCR-Sync-0713**\")\n",
283 | "\n",
284 | " with gr.Tab(label=\"Image Input\"):\n",
285 | "\n",
286 | " with gr.Row():\n",
287 | " with gr.Column():\n",
288 | " model_choice = gr.Dropdown(\n",
289 | " label=\"Model Selection\",\n",
290 | " choices=list(MODEL_OPTIONS.keys()),\n",
291 | " value=\"Megalodon-OCR-Sync-0713\"\n",
292 | " )\n",
293 | " input_media = gr.File(\n",
294 | " label=\"Upload Image\", type=\"filepath\"\n",
295 | " )\n",
296 | " text_input = gr.Textbox(label=\"Question\", value=\"OCR the image precisely.\")\n",
297 | " submit_btn = gr.Button(value=\"Submit\", elem_classes=\"submit-btn\")\n",
298 | "\n",
299 | " with gr.Column():\n",
300 | " output_text = gr.Textbox(label=\"Output Text\", lines=7)\n",
301 | "\n",
302 | " with gr.Accordion(\"Plain Text\", open=False):\n",
303 | " plain_text_output = gr.Textbox(label=\"Standardized Plain Text\", lines=10)\n",
304 | "\n",
305 | " submit_btn.click(\n",
306 | " qwen_inference, [model_choice, input_media, text_input], [output_text]\n",
307 | " ).then(\n",
308 | " lambda output_text: format_plain_text(output_text), [output_text], [plain_text_output]\n",
309 | " )\n",
310 | "\n",
311 | " with gr.Accordion(\"Docx/PDF Settings\", open=False):\n",
312 | " with gr.Row():\n",
313 | " with gr.Column():\n",
314 | " line_spacing = gr.Dropdown(\n",
315 | " choices=[0.5, 1.0, 1.15, 1.5, 2.0, 2.5, 3.0],\n",
316 | " value=1.5,\n",
317 | " label=\"Line Spacing\"\n",
318 | " )\n",
319 | " font_size = gr.Dropdown(\n",
320 | " choices=[\"8\", \"10\", \"12\", \"14\", \"16\", \"18\", \"20\", \"22\", \"24\"],\n",
321 | " value=\"16\",\n",
322 | " label=\"Font Size\"\n",
323 | " )\n",
324 | " alignment = gr.Dropdown(\n",
325 | " choices=[\"Left\", \"Center\", \"Right\", \"Justified\"],\n",
326 | " value=\"Justified\",\n",
327 | " label=\"Text Alignment\"\n",
328 | " )\n",
329 | " image_size = gr.Dropdown(\n",
330 | " choices=[\"Small\", \"Medium\", \"Large\"],\n",
331 | " value=\"Medium\",\n",
332 | " label=\"Image Size\"\n",
333 | " )\n",
334 | " file_format = gr.Radio([\"pdf\", \"docx\"], label=\"File Format\", value=\"pdf\")\n",
335 | "\n",
336 | " get_document_btn = gr.Button(value=\"Get Document\", elem_classes=\"download-btn\")\n",
337 | "\n",
338 | " get_document_btn.click(\n",
339 | " generate_document, [input_media, output_text, file_format, font_size, line_spacing, alignment, image_size], gr.File(label=\"Download Document\")\n",
340 | " )\n",
341 | "\n",
342 | "demo.launch(debug=True)"
343 | ]
344 | }
345 | ],
346 | "metadata": {
347 | "accelerator": "GPU",
348 | "colab": {
349 | "gpuType": "T4",
350 | "provenance": []
351 | },
352 | "kernelspec": {
353 | "display_name": "Python 3",
354 | "name": "python3"
355 | },
356 | "language_info": {
357 | "name": "python"
358 | }
359 | },
360 | "nbformat": 4,
361 | "nbformat_minor": 0
362 | }
363 |
--------------------------------------------------------------------------------
/Qwen2.5-VL-3B-Instruct/Qwen2_5_VL_3B_Instruct_ReportLab.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "uFovmijgUV1Z"
7 | },
8 | "source": [
9 | "***Multimodal ReportLab : Qwen2.5-VL-3B-Instruct***\n",
10 | "\n",
11 | "*notebook by : [prithivMLmods](https://huggingface.co/prithivMLmods)🤗 x ❤️*"
12 | ]
13 | },
14 | {
15 | "cell_type": "markdown",
16 | "metadata": {
17 | "id": "RugX4SGZV-8O"
18 | },
19 | "source": [
20 | "***Installing all necessary packages***"
21 | ]
22 | },
23 | {
24 | "cell_type": "code",
25 | "execution_count": null,
26 | "metadata": {
27 | "id": "l-NtFtjSpuJQ"
28 | },
29 | "outputs": [],
30 | "source": [
31 | "%%capture\n",
32 | "!pip install gradio transformers transformers-stream-generator qwen-vl-utils\n",
33 | "!pip install torchvision torch huggingface_hub spaces accelerate ipython\n",
34 | "!pip install pillow av python-docx requests numpy reportlab fpdf hf_xet\n",
35 | "#Hold tight, this will take around 3-5 minutes."
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {
41 | "id": "mvoSnRZcVBu4"
42 | },
43 | "source": [
44 | "***Run app***"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {
51 | "id": "tElKr2Fkp1bO"
52 | },
53 | "outputs": [],
54 | "source": [
55 | "# ================================================\n",
56 | "# Model Configuration\n",
57 | "# ================================================\n",
58 | "\n",
59 | "# Model used in the app:\n",
60 | "# https://huggingface.co/Qwen/Qwen2.5-VL-3B-Instruct\n",
61 | "\n",
62 | "# Architecture built on:\n",
63 | "# Qwen2_5_VLForConditionalGeneration [qwen2_5_vl]\n",
64 | "import gradio as gr\n",
65 | "import spaces\n",
66 | "from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor, TextIteratorStreamer\n",
67 | "from qwen_vl_utils import process_vision_info\n",
68 | "import torch\n",
69 | "from PIL import Image\n",
70 | "import os\n",
71 | "import uuid\n",
72 | "import io\n",
73 | "from threading import Thread\n",
74 | "from reportlab.lib.pagesizes import A4\n",
75 | "from reportlab.lib.styles import getSampleStyleSheet\n",
76 | "from reportlab.lib import colors\n",
77 | "from reportlab.platypus import SimpleDocTemplate, Image as RLImage, Paragraph, Spacer\n",
78 | "from reportlab.lib.units import inch\n",
79 | "from reportlab.pdfbase import pdfmetrics\n",
80 | "from reportlab.pdfbase.ttfonts import TTFont\n",
81 | "import docx\n",
82 | "from docx.enum.text import WD_ALIGN_PARAGRAPH\n",
83 | "\n",
84 | "# Define model options\n",
85 | "MODEL_OPTIONS = {\n",
86 | " \"Qwen2.5-VL-3B-Instruct\": \"Qwen/Qwen2.5-VL-3B-Instruct\",\n",
87 | "}\n",
88 | "\n",
89 | "# Preload models and processors into CUDA\n",
90 | "models = {}\n",
91 | "processors = {}\n",
92 | "for name, model_id in MODEL_OPTIONS.items():\n",
93 | " print(f\"Loading {name}🤗. Hold tight, this will take around 4-6 minutes..\")\n",
94 | " models[name] = Qwen2_5_VLForConditionalGeneration.from_pretrained(\n",
95 | " model_id,\n",
96 | " trust_remote_code=True,\n",
97 | " torch_dtype=torch.float16\n",
98 | " ).to(\"cuda\").eval()\n",
99 | " processors[name] = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)\n",
100 | "\n",
101 | "image_extensions = Image.registered_extensions()\n",
102 | "\n",
103 | "def identify_and_save_blob(blob_path):\n",
104 | " \"\"\"Identifies if the blob is an image and saves it.\"\"\"\n",
105 | " try:\n",
106 | " with open(blob_path, 'rb') as file:\n",
107 | " blob_content = file.read()\n",
108 | " try:\n",
109 | " Image.open(io.BytesIO(blob_content)).verify() # Check if it's a valid image\n",
110 | " extension = \".png\" # Default to PNG for saving\n",
111 | " media_type = \"image\"\n",
112 | " except (IOError, SyntaxError):\n",
113 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
114 | "\n",
115 | " filename = f\"temp_{uuid.uuid4()}_media{extension}\"\n",
116 | " with open(filename, \"wb\") as f:\n",
117 | " f.write(blob_content)\n",
118 | "\n",
119 | " return filename, media_type\n",
120 | "\n",
121 | " except FileNotFoundError:\n",
122 | " raise ValueError(f\"The file {blob_path} was not found.\")\n",
123 | " except Exception as e:\n",
124 | " raise ValueError(f\"An error occurred while processing the file: {e}\")\n",
125 | "\n",
126 | "@spaces.GPU\n",
127 | "def qwen_inference(model_name, media_input, text_input=None):\n",
128 | " \"\"\"Handles inference for the selected model.\"\"\"\n",
129 | " model = models[model_name]\n",
130 | " processor = processors[model_name]\n",
131 | "\n",
132 | " if isinstance(media_input, str):\n",
133 | " media_path = media_input\n",
134 | " if media_path.endswith(tuple([i for i in image_extensions.keys()])):\n",
135 | " media_type = \"image\"\n",
136 | " else:\n",
137 | " try:\n",
138 | " media_path, media_type = identify_and_save_blob(media_input)\n",
139 | " except Exception as e:\n",
140 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
141 | "\n",
142 | " messages = [\n",
143 | " {\n",
144 | " \"role\": \"user\",\n",
145 | " \"content\": [\n",
146 | " {\n",
147 | " \"type\": media_type,\n",
148 | " media_type: media_path\n",
149 | " },\n",
150 | " {\"type\": \"text\", \"text\": text_input},\n",
151 | " ],\n",
152 | " }\n",
153 | " ]\n",
154 | "\n",
155 | " text = processor.apply_chat_template(\n",
156 | " messages, tokenize=False, add_generation_prompt=True\n",
157 | " )\n",
158 | " image_inputs, _ = process_vision_info(messages)\n",
159 | " inputs = processor(\n",
160 | " text=[text],\n",
161 | " images=image_inputs,\n",
162 | " padding=True,\n",
163 | " return_tensors=\"pt\",\n",
164 | " ).to(\"cuda\")\n",
165 | "\n",
166 | " streamer = TextIteratorStreamer(\n",
167 | " processor.tokenizer, skip_prompt=True, skip_special_tokens=True\n",
168 | " )\n",
169 | " generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)\n",
170 | "\n",
171 | " thread = Thread(target=model.generate, kwargs=generation_kwargs)\n",
172 | " thread.start()\n",
173 | "\n",
174 | " buffer = \"\"\n",
175 | " for new_text in streamer:\n",
176 | " buffer += new_text\n",
177 | " # Remove <|im_end|> or similar tokens from the output\n",
178 | " buffer = buffer.replace(\"<|im_end|>\", \"\")\n",
179 | " yield buffer\n",
180 | "\n",
181 | "def format_plain_text(output_text):\n",
182 | " \"\"\"Formats the output text as plain text without LaTeX delimiters.\"\"\"\n",
183 | " # Remove LaTeX delimiters and convert to plain text\n",
184 | " plain_text = output_text.replace(\"\\\\(\", \"\").replace(\"\\\\)\", \"\").replace(\"\\\\[\", \"\").replace(\"\\\\]\", \"\")\n",
185 | " return plain_text\n",
186 | "\n",
187 | "def generate_document(media_path, output_text, file_format, font_size, line_spacing, alignment, image_size):\n",
188 | " \"\"\"Generates a document with the input image and plain text output.\"\"\"\n",
189 | " plain_text = format_plain_text(output_text)\n",
190 | " if file_format == \"pdf\":\n",
191 | " return generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
192 | " elif file_format == \"docx\":\n",
193 | " return generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
194 | "\n",
195 | "def generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
196 | " \"\"\"Generates a PDF document.\"\"\"\n",
197 | " filename = f\"output_{uuid.uuid4()}.pdf\"\n",
198 | " doc = SimpleDocTemplate(\n",
199 | " filename,\n",
200 | " pagesize=A4,\n",
201 | " rightMargin=inch,\n",
202 | " leftMargin=inch,\n",
203 | " topMargin=inch,\n",
204 | " bottomMargin=inch\n",
205 | " )\n",
206 | " styles = getSampleStyleSheet()\n",
207 | " styles[\"Normal\"].fontSize = int(font_size)\n",
208 | " styles[\"Normal\"].leading = int(font_size) * line_spacing\n",
209 | " styles[\"Normal\"].alignment = {\n",
210 | " \"Left\": 0,\n",
211 | " \"Center\": 1,\n",
212 | " \"Right\": 2,\n",
213 | " \"Justified\": 4\n",
214 | " }[alignment]\n",
215 | "\n",
216 | " story = []\n",
217 | "\n",
218 | " # Add image with size adjustment\n",
219 | " image_sizes = {\n",
220 | " \"Small\": (200, 200),\n",
221 | " \"Medium\": (400, 400),\n",
222 | " \"Large\": (600, 600)\n",
223 | " }\n",
224 | " img = RLImage(media_path, width=image_sizes[image_size][0], height=image_sizes[image_size][1])\n",
225 | " story.append(img)\n",
226 | " story.append(Spacer(1, 12))\n",
227 | "\n",
228 | " # Add plain text output\n",
229 | " text = Paragraph(plain_text, styles[\"Normal\"])\n",
230 | " story.append(text)\n",
231 | "\n",
232 | " doc.build(story)\n",
233 | " return filename\n",
234 | "\n",
235 | "def generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
236 | " \"\"\"Generates a DOCX document.\"\"\"\n",
237 | " filename = f\"output_{uuid.uuid4()}.docx\"\n",
238 | " doc = docx.Document()\n",
239 | "\n",
240 | " # Add image with size adjustment\n",
241 | " image_sizes = {\n",
242 | " \"Small\": docx.shared.Inches(2),\n",
243 | " \"Medium\": docx.shared.Inches(4),\n",
244 | " \"Large\": docx.shared.Inches(6)\n",
245 | " }\n",
246 | " doc.add_picture(media_path, width=image_sizes[image_size])\n",
247 | " doc.add_paragraph()\n",
248 | "\n",
249 | " # Add plain text output\n",
250 | " paragraph = doc.add_paragraph()\n",
251 | " paragraph.paragraph_format.line_spacing = line_spacing\n",
252 | " paragraph.paragraph_format.alignment = {\n",
253 | " \"Left\": WD_ALIGN_PARAGRAPH.LEFT,\n",
254 | " \"Center\": WD_ALIGN_PARAGRAPH.CENTER,\n",
255 | " \"Right\": WD_ALIGN_PARAGRAPH.RIGHT,\n",
256 | " \"Justified\": WD_ALIGN_PARAGRAPH.JUSTIFY\n",
257 | " }[alignment]\n",
258 | " run = paragraph.add_run(plain_text)\n",
259 | " run.font.size = docx.shared.Pt(int(font_size))\n",
260 | "\n",
261 | " doc.save(filename)\n",
262 | " return filename\n",
263 | "\n",
264 | "# CSS for output styling\n",
265 | "css = \"\"\"\n",
266 | " #output {\n",
267 | " height: 500px;\n",
268 | " overflow: auto;\n",
269 | " border: 1px solid #ccc;\n",
270 | " }\n",
271 | ".submit-btn {\n",
272 | " background-color: #cf3434 !important;\n",
273 | " color: white !important;\n",
274 | "}\n",
275 | ".submit-btn:hover {\n",
276 | " background-color: #ff2323 !important;\n",
277 | "}\n",
278 | ".download-btn {\n",
279 | " background-color: #35a6d6 !important;\n",
280 | " color: white !important;\n",
281 | "}\n",
282 | ".download-btn:hover {\n",
283 | " background-color: #22bcff !important;\n",
284 | "}\n",
285 | "\"\"\"\n",
286 | "\n",
287 | "# Gradio app setup\n",
288 | "with gr.Blocks(css=css, theme=\"bethecloud/storj_theme\") as demo:\n",
289 | " gr.Markdown(\"# **MultimodalVLM : Qwen2.5-VL-3B-Instruct**\")\n",
290 | "\n",
291 | " with gr.Tab(label=\"Image Input\"):\n",
292 | "\n",
293 | " with gr.Row():\n",
294 | " with gr.Column():\n",
295 | " model_choice = gr.Dropdown(\n",
296 | " label=\"Model Selection\",\n",
297 | " choices=list(MODEL_OPTIONS.keys()),\n",
298 | " value=\"Qwen2.5-VL-3B-Instruct\"\n",
299 | " )\n",
300 | " input_media = gr.File(\n",
301 | " label=\"Upload Image\", type=\"filepath\"\n",
302 | " )\n",
303 | " text_input = gr.Textbox(label=\"Question\", value=\"Explain the content precisely.\")\n",
304 | " submit_btn = gr.Button(value=\"Submit\", elem_classes=\"submit-btn\")\n",
305 | "\n",
306 | " with gr.Column():\n",
307 | " output_text = gr.Textbox(label=\"Output Text\", lines=7)\n",
308 | "\n",
309 | " with gr.Accordion(\"Plain Text\", open=False):\n",
310 | " plain_text_output = gr.Textbox(label=\"Standardized Plain Text\", lines=10)\n",
311 | "\n",
312 | " submit_btn.click(\n",
313 | " qwen_inference, [model_choice, input_media, text_input], [output_text]\n",
314 | " ).then(\n",
315 | " lambda output_text: format_plain_text(output_text), [output_text], [plain_text_output]\n",
316 | " )\n",
317 | "\n",
318 | " with gr.Accordion(\"Docx/PDF Settings\", open=False):\n",
319 | " with gr.Row():\n",
320 | " with gr.Column():\n",
321 | " line_spacing = gr.Dropdown(\n",
322 | " choices=[0.5, 1.0, 1.15, 1.5, 2.0, 2.5, 3.0],\n",
323 | " value=1.5,\n",
324 | " label=\"Line Spacing\"\n",
325 | " )\n",
326 | " font_size = gr.Dropdown(\n",
327 | " choices=[\"8\", \"10\", \"12\", \"14\", \"16\", \"18\", \"20\", \"22\", \"24\"],\n",
328 | " value=\"16\",\n",
329 | " label=\"Font Size\"\n",
330 | " )\n",
331 | " alignment = gr.Dropdown(\n",
332 | " choices=[\"Left\", \"Center\", \"Right\", \"Justified\"],\n",
333 | " value=\"Justified\",\n",
334 | " label=\"Text Alignment\"\n",
335 | " )\n",
336 | " image_size = gr.Dropdown(\n",
337 | " choices=[\"Small\", \"Medium\", \"Large\"],\n",
338 | " value=\"Medium\",\n",
339 | " label=\"Image Size\"\n",
340 | " )\n",
341 | " file_format = gr.Radio([\"pdf\", \"docx\"], label=\"File Format\", value=\"pdf\")\n",
342 | "\n",
343 | " get_document_btn = gr.Button(value=\"Get Document\", elem_classes=\"download-btn\")\n",
344 | "\n",
345 | " get_document_btn.click(\n",
346 | " generate_document, [input_media, output_text, file_format, font_size, line_spacing, alignment, image_size], gr.File(label=\"Download Document\")\n",
347 | " )\n",
348 | "\n",
349 | "demo.launch(debug=True)"
350 | ]
351 | }
352 | ],
353 | "metadata": {
354 | "accelerator": "GPU",
355 | "colab": {
356 | "gpuType": "T4",
357 | "provenance": []
358 | },
359 | "kernelspec": {
360 | "display_name": "Python 3",
361 | "name": "python3"
362 | },
363 | "language_info": {
364 | "name": "python"
365 | }
366 | },
367 | "nbformat": 4,
368 | "nbformat_minor": 0
369 | }
--------------------------------------------------------------------------------
/Behemoth-3B-070225-post0.1/Behemoth_3B_070225_post0_1_ReportLab.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "uFovmijgUV1Z"
7 | },
8 | "source": [
9 | "***Multimodal Caption ReportLab : Behemoth-3B-070225-post0.1***\n",
10 | "\n",
11 | "*notebook by : [prithivMLmods](https://huggingface.co/prithivMLmods)🤗 x ❤️*"
12 | ]
13 | },
14 | {
15 | "cell_type": "markdown",
16 | "metadata": {
17 | "id": "RugX4SGZV-8O"
18 | },
19 | "source": [
20 | "***Installing all necessary packages***"
21 | ]
22 | },
23 | {
24 | "cell_type": "code",
25 | "execution_count": null,
26 | "metadata": {
27 | "id": "l-NtFtjSpuJQ"
28 | },
29 | "outputs": [],
30 | "source": [
31 | "%%capture\n",
32 | "!pip install gradio transformers transformers-stream-generator qwen-vl-utils\n",
33 | "!pip install torchvision torch huggingface_hub spaces accelerate ipython\n",
34 | "!pip install pillow av python-docx requests numpy reportlab fpdf hf_xet\n",
35 | "#Hold tight, this will take around 3-5 minutes."
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {
41 | "id": "mvoSnRZcVBu4"
42 | },
43 | "source": [
44 | "***Run app***"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {
51 | "id": "tElKr2Fkp1bO"
52 | },
53 | "outputs": [],
54 | "source": [
55 | "# ================================================\n",
56 | "# Model Configuration\n",
57 | "# ================================================\n",
58 | "\n",
59 | "# Model used in the app:\n",
60 | "# https://huggingface.co/prithivMLmods/Behemoth-3B-070225-post0.1\n",
61 | "\n",
62 | "# Architecture built on:\n",
63 | "# Qwen2_5_VLForConditionalGeneration [qwen2_5_vl]\n",
64 | "import gradio as gr\n",
65 | "import spaces\n",
66 | "from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor, TextIteratorStreamer\n",
67 | "from qwen_vl_utils import process_vision_info\n",
68 | "import torch\n",
69 | "from PIL import Image\n",
70 | "import os\n",
71 | "import uuid\n",
72 | "import io\n",
73 | "from threading import Thread\n",
74 | "from reportlab.lib.pagesizes import A4\n",
75 | "from reportlab.lib.styles import getSampleStyleSheet\n",
76 | "from reportlab.lib import colors\n",
77 | "from reportlab.platypus import SimpleDocTemplate, Image as RLImage, Paragraph, Spacer\n",
78 | "from reportlab.lib.units import inch\n",
79 | "from reportlab.pdfbase import pdfmetrics\n",
80 | "from reportlab.pdfbase.ttfonts import TTFont\n",
81 | "import docx\n",
82 | "from docx.enum.text import WD_ALIGN_PARAGRAPH\n",
83 | "\n",
84 | "# Define model options\n",
85 | "MODEL_OPTIONS = {\n",
86 | " \"Behemoth-3B-070225-post0.1\": \"prithivMLmods/Behemoth-3B-070225-post0.1\",\n",
87 | "}\n",
88 | "\n",
89 | "# Preload models and processors into CUDA\n",
90 | "models = {}\n",
91 | "processors = {}\n",
92 | "for name, model_id in MODEL_OPTIONS.items():\n",
93 | " print(f\"Loading {name}🤗. Hold tight, this will take around 4-6 minutes..\")\n",
94 | " models[name] = Qwen2_5_VLForConditionalGeneration.from_pretrained(\n",
95 | " model_id,\n",
96 | " trust_remote_code=True,\n",
97 | " torch_dtype=torch.float16\n",
98 | " ).to(\"cuda\").eval()\n",
99 | " processors[name] = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)\n",
100 | "\n",
101 | "image_extensions = Image.registered_extensions()\n",
102 | "\n",
103 | "def identify_and_save_blob(blob_path):\n",
104 | " \"\"\"Identifies if the blob is an image and saves it.\"\"\"\n",
105 | " try:\n",
106 | " with open(blob_path, 'rb') as file:\n",
107 | " blob_content = file.read()\n",
108 | " try:\n",
109 | " Image.open(io.BytesIO(blob_content)).verify() # Check if it's a valid image\n",
110 | " extension = \".png\" # Default to PNG for saving\n",
111 | " media_type = \"image\"\n",
112 | " except (IOError, SyntaxError):\n",
113 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
114 | "\n",
115 | " filename = f\"temp_{uuid.uuid4()}_media{extension}\"\n",
116 | " with open(filename, \"wb\") as f:\n",
117 | " f.write(blob_content)\n",
118 | "\n",
119 | " return filename, media_type\n",
120 | "\n",
121 | " except FileNotFoundError:\n",
122 | " raise ValueError(f\"The file {blob_path} was not found.\")\n",
123 | " except Exception as e:\n",
124 | " raise ValueError(f\"An error occurred while processing the file: {e}\")\n",
125 | "\n",
126 | "@spaces.GPU\n",
127 | "def qwen_inference(model_name, media_input, text_input=None):\n",
128 | " \"\"\"Handles inference for the selected model.\"\"\"\n",
129 | " model = models[model_name]\n",
130 | " processor = processors[model_name]\n",
131 | "\n",
132 | " if isinstance(media_input, str):\n",
133 | " media_path = media_input\n",
134 | " if media_path.endswith(tuple([i for i in image_extensions.keys()])):\n",
135 | " media_type = \"image\"\n",
136 | " else:\n",
137 | " try:\n",
138 | " media_path, media_type = identify_and_save_blob(media_input)\n",
139 | " except Exception as e:\n",
140 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
141 | "\n",
142 | " messages = [\n",
143 | " {\n",
144 | " \"role\": \"user\",\n",
145 | " \"content\": [\n",
146 | " {\n",
147 | " \"type\": media_type,\n",
148 | " media_type: media_path\n",
149 | " },\n",
150 | " {\"type\": \"text\", \"text\": text_input},\n",
151 | " ],\n",
152 | " }\n",
153 | " ]\n",
154 | "\n",
155 | " text = processor.apply_chat_template(\n",
156 | " messages, tokenize=False, add_generation_prompt=True\n",
157 | " )\n",
158 | " image_inputs, _ = process_vision_info(messages)\n",
159 | " inputs = processor(\n",
160 | " text=[text],\n",
161 | " images=image_inputs,\n",
162 | " padding=True,\n",
163 | " return_tensors=\"pt\",\n",
164 | " ).to(\"cuda\")\n",
165 | "\n",
166 | " streamer = TextIteratorStreamer(\n",
167 | " processor.tokenizer, skip_prompt=True, skip_special_tokens=True\n",
168 | " )\n",
169 | " generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)\n",
170 | "\n",
171 | " thread = Thread(target=model.generate, kwargs=generation_kwargs)\n",
172 | " thread.start()\n",
173 | "\n",
174 | " buffer = \"\"\n",
175 | " for new_text in streamer:\n",
176 | " buffer += new_text\n",
177 | " # Remove <|im_end|> or similar tokens from the output\n",
178 | " buffer = buffer.replace(\"<|im_end|>\", \"\")\n",
179 | " yield buffer\n",
180 | "\n",
181 | "def format_plain_text(output_text):\n",
182 | " \"\"\"Formats the output text as plain text without LaTeX delimiters.\"\"\"\n",
183 | " # Remove LaTeX delimiters and convert to plain text\n",
184 | " plain_text = output_text.replace(\"\\\\(\", \"\").replace(\"\\\\)\", \"\").replace(\"\\\\[\", \"\").replace(\"\\\\]\", \"\")\n",
185 | " return plain_text\n",
186 | "\n",
187 | "def generate_document(media_path, output_text, file_format, font_size, line_spacing, alignment, image_size):\n",
188 | " \"\"\"Generates a document with the input image and plain text output.\"\"\"\n",
189 | " plain_text = format_plain_text(output_text)\n",
190 | " if file_format == \"pdf\":\n",
191 | " return generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
192 | " elif file_format == \"docx\":\n",
193 | " return generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
194 | "\n",
195 | "def generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
196 | " \"\"\"Generates a PDF document.\"\"\"\n",
197 | " filename = f\"output_{uuid.uuid4()}.pdf\"\n",
198 | " doc = SimpleDocTemplate(\n",
199 | " filename,\n",
200 | " pagesize=A4,\n",
201 | " rightMargin=inch,\n",
202 | " leftMargin=inch,\n",
203 | " topMargin=inch,\n",
204 | " bottomMargin=inch\n",
205 | " )\n",
206 | " styles = getSampleStyleSheet()\n",
207 | " styles[\"Normal\"].fontSize = int(font_size)\n",
208 | " styles[\"Normal\"].leading = int(font_size) * line_spacing\n",
209 | " styles[\"Normal\"].alignment = {\n",
210 | " \"Left\": 0,\n",
211 | " \"Center\": 1,\n",
212 | " \"Right\": 2,\n",
213 | " \"Justified\": 4\n",
214 | " }[alignment]\n",
215 | "\n",
216 | " story = []\n",
217 | "\n",
218 | " # Add image with size adjustment\n",
219 | " image_sizes = {\n",
220 | " \"Small\": (200, 200),\n",
221 | " \"Medium\": (400, 400),\n",
222 | " \"Large\": (600, 600)\n",
223 | " }\n",
224 | " img = RLImage(media_path, width=image_sizes[image_size][0], height=image_sizes[image_size][1])\n",
225 | " story.append(img)\n",
226 | " story.append(Spacer(1, 12))\n",
227 | "\n",
228 | " # Add plain text output\n",
229 | " text = Paragraph(plain_text, styles[\"Normal\"])\n",
230 | " story.append(text)\n",
231 | "\n",
232 | " doc.build(story)\n",
233 | " return filename\n",
234 | "\n",
235 | "def generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
236 | " \"\"\"Generates a DOCX document.\"\"\"\n",
237 | " filename = f\"output_{uuid.uuid4()}.docx\"\n",
238 | " doc = docx.Document()\n",
239 | "\n",
240 | " # Add image with size adjustment\n",
241 | " image_sizes = {\n",
242 | " \"Small\": docx.shared.Inches(2),\n",
243 | " \"Medium\": docx.shared.Inches(4),\n",
244 | " \"Large\": docx.shared.Inches(6)\n",
245 | " }\n",
246 | " doc.add_picture(media_path, width=image_sizes[image_size])\n",
247 | " doc.add_paragraph()\n",
248 | "\n",
249 | " # Add plain text output\n",
250 | " paragraph = doc.add_paragraph()\n",
251 | " paragraph.paragraph_format.line_spacing = line_spacing\n",
252 | " paragraph.paragraph_format.alignment = {\n",
253 | " \"Left\": WD_ALIGN_PARAGRAPH.LEFT,\n",
254 | " \"Center\": WD_ALIGN_PARAGRAPH.CENTER,\n",
255 | " \"Right\": WD_ALIGN_PARAGRAPH.RIGHT,\n",
256 | " \"Justified\": WD_ALIGN_PARAGRAPH.JUSTIFY\n",
257 | " }[alignment]\n",
258 | " run = paragraph.add_run(plain_text)\n",
259 | " run.font.size = docx.shared.Pt(int(font_size))\n",
260 | "\n",
261 | " doc.save(filename)\n",
262 | " return filename\n",
263 | "\n",
264 | "# CSS for output styling\n",
265 | "css = \"\"\"\n",
266 | " #output {\n",
267 | " height: 500px;\n",
268 | " overflow: auto;\n",
269 | " border: 1px solid #ccc;\n",
270 | " }\n",
271 | ".submit-btn {\n",
272 | " background-color: #cf3434 !important;\n",
273 | " color: white !important;\n",
274 | "}\n",
275 | ".submit-btn:hover {\n",
276 | " background-color: #ff2323 !important;\n",
277 | "}\n",
278 | ".download-btn {\n",
279 | " background-color: #35a6d6 !important;\n",
280 | " color: white !important;\n",
281 | "}\n",
282 | ".download-btn:hover {\n",
283 | " background-color: #22bcff !important;\n",
284 | "}\n",
285 | "\"\"\"\n",
286 | "\n",
287 | "# Gradio app setup\n",
288 | "with gr.Blocks(css=css, theme=\"bethecloud/storj_theme\") as demo:\n",
289 | " gr.Markdown(\"# **Multimodal-Caption : Behemoth-3B-070225-post0.1**\")\n",
290 | "\n",
291 | " with gr.Tab(label=\"Image Input\"):\n",
292 | "\n",
293 | " with gr.Row():\n",
294 | " with gr.Column():\n",
295 | " model_choice = gr.Dropdown(\n",
296 | " label=\"Model Selection\",\n",
297 | " choices=list(MODEL_OPTIONS.keys()),\n",
298 | " value=\"Behemoth-3B-070225-post0.1\"\n",
299 | " )\n",
300 | " input_media = gr.File(\n",
301 | " label=\"Upload Image\", type=\"filepath\"\n",
302 | " )\n",
303 | " text_input = gr.Textbox(label=\"Question\", value=\"OCR the image precisely.\")\n",
304 | " submit_btn = gr.Button(value=\"Submit\", elem_classes=\"submit-btn\")\n",
305 | "\n",
306 | " with gr.Column():\n",
307 | " output_text = gr.Textbox(label=\"Output Text\", lines=7)\n",
308 | "\n",
309 | " with gr.Accordion(\"Plain Text\", open=False):\n",
310 | " plain_text_output = gr.Textbox(label=\"Standardized Plain Text\", lines=10)\n",
311 | "\n",
312 | " submit_btn.click(\n",
313 | " qwen_inference, [model_choice, input_media, text_input], [output_text]\n",
314 | " ).then(\n",
315 | " lambda output_text: format_plain_text(output_text), [output_text], [plain_text_output]\n",
316 | " )\n",
317 | "\n",
318 | " with gr.Accordion(\"Docx/PDF Settings\", open=False):\n",
319 | " with gr.Row():\n",
320 | " with gr.Column():\n",
321 | " line_spacing = gr.Dropdown(\n",
322 | " choices=[0.5, 1.0, 1.15, 1.5, 2.0, 2.5, 3.0],\n",
323 | " value=1.5,\n",
324 | " label=\"Line Spacing\"\n",
325 | " )\n",
326 | " font_size = gr.Dropdown(\n",
327 | " choices=[\"8\", \"10\", \"12\", \"14\", \"16\", \"18\", \"20\", \"22\", \"24\"],\n",
328 | " value=\"16\",\n",
329 | " label=\"Font Size\"\n",
330 | " )\n",
331 | " alignment = gr.Dropdown(\n",
332 | " choices=[\"Left\", \"Center\", \"Right\", \"Justified\"],\n",
333 | " value=\"Justified\",\n",
334 | " label=\"Text Alignment\"\n",
335 | " )\n",
336 | " image_size = gr.Dropdown(\n",
337 | " choices=[\"Small\", \"Medium\", \"Large\"],\n",
338 | " value=\"Medium\",\n",
339 | " label=\"Image Size\"\n",
340 | " )\n",
341 | " file_format = gr.Radio([\"pdf\", \"docx\"], label=\"File Format\", value=\"pdf\")\n",
342 | "\n",
343 | " get_document_btn = gr.Button(value=\"Get Document\", elem_classes=\"download-btn\")\n",
344 | "\n",
345 | " get_document_btn.click(\n",
346 | " generate_document, [input_media, output_text, file_format, font_size, line_spacing, alignment, image_size], gr.File(label=\"Download Document\")\n",
347 | " )\n",
348 | "\n",
349 | "demo.launch(debug=True)"
350 | ]
351 | },
352 | {
353 | "cell_type": "markdown",
354 | "source": [
355 | "## **Demo Inference**\n",
356 | "\n",
357 | "\n",
358 | "| Preview |\n",
359 | "|:--:|\n",
360 | "|  |\n",
361 | "| *Movie Still / Poster* |\n",
362 | "|  |\n",
363 | "| *Gradio UI Screenshot* |\n"
364 | ],
365 | "metadata": {
366 | "id": "ynyjulRaDl3m"
367 | }
368 | }
369 | ],
370 | "metadata": {
371 | "accelerator": "GPU",
372 | "colab": {
373 | "gpuType": "T4",
374 | "provenance": []
375 | },
376 | "kernelspec": {
377 | "display_name": "Python 3",
378 | "name": "python3"
379 | },
380 | "language_info": {
381 | "name": "python"
382 | }
383 | },
384 | "nbformat": 4,
385 | "nbformat_minor": 0
386 | }
--------------------------------------------------------------------------------
/Qwen2-VL-OCR-2B-Instruct/Qwen2_VL_OCR_2B_Instruct.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "uFovmijgUV1Z"
7 | },
8 | "source": [
9 | "***Multimodal OCR ReportLab : [Qwen2-VL-OCR-2B-Instruct](https://huggingface.co/prithivMLmods/Qwen2-VL-OCR-2B-Instruct)***\n",
10 | "\n",
11 | "*notebook by : [prithivMLmods](https://huggingface.co/prithivMLmods)🤗*\n",
12 | "\n",
13 | " The Qwen2-VL-OCR-2B-Instruct model is a fine-tuned version of Qwen/Qwen2-VL-2B-Instruct, tailored for tasks that involve Optical Character Recognition (OCR), image-to-text conversion, and math problem solving with LaTeX formatting. This model integrates a conversational approach with visual and textual understanding to handle multi-modal tasks effectively."
14 | ]
15 | },
16 | {
17 | "cell_type": "markdown",
18 | "metadata": {
19 | "id": "RugX4SGZV-8O"
20 | },
21 | "source": [
22 | "***Installing all necessary packages***"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "execution_count": null,
28 | "metadata": {
29 | "id": "l-NtFtjSpuJQ"
30 | },
31 | "outputs": [],
32 | "source": [
33 | "%%capture\n",
34 | "!pip install gradio transformers transformers-stream-generator qwen-vl-utils\n",
35 | "!pip install torchvision torch huggingface_hub spaces accelerate ipython\n",
36 | "!pip install pillow av python-docx requests numpy reportlab fpdf hf_xet\n",
37 | "#Hold tight, this will take around 3-5 minutes."
38 | ]
39 | },
40 | {
41 | "cell_type": "markdown",
42 | "metadata": {
43 | "id": "mvoSnRZcVBu4"
44 | },
45 | "source": [
46 | "***Run app***"
47 | ]
48 | },
49 | {
50 | "cell_type": "code",
51 | "execution_count": null,
52 | "metadata": {
53 | "colab": {
54 | "base_uri": "https://localhost:8080/",
55 | "height": 1000,
56 | "referenced_widgets": [
57 | "f02993bce0b44cbb8f04451e8eb80c52",
58 | "14fda8541b1c4c0e84b27253f40a4144",
59 | "c48b13fbc349441491130d591c02820a",
60 | "1b4e0053f73a4dc8956fd70261050031",
61 | "0834cba909674903b340ead5d03d8ee7",
62 | "6d8fc2d9b39e4264af969fd4968db0f0",
63 | "5a9c313556474d32b6920a31d682c993",
64 | "13b7228aa5134ee4b0efd7fc2e9d7927",
65 | "24cc5fd73b2e483ca3f2992414fc2ea0",
66 | "10126373db724c58bb1539c09defe1be",
67 | "d7414d9c2c724e389772835304938f97",
68 | "52861218164a4578b743c9ad7e533e77",
69 | "917a3fc5850b408b8ae8d62016949d5c",
70 | "67d0c6474f2c41259fa7f5550ca5bbcf",
71 | "91d1868fecbb4a64b3f36ec7b0146f66",
72 | "f33523339ad44ee18ae542a99ba8d2e4",
73 | "72b6c563c2d24b349268b28caac0a9cc",
74 | "d34cb5d22b5a466a9f46c0bc673f122d",
75 | "06bcc05a336c4bc8a16fd64b8c93e90a",
76 | "f4966c179fae4b1e91d260494a05a5f7",
77 | "5e7bab46de5b48af85da3e6c7aea4a3e",
78 | "36ba4652bd354eceae677c8782c6a92b",
79 | "9ee381628bcb460ebb0fe5bc6b6b729f",
80 | "ac4ed071c177445fa7342281ae2d2718",
81 | "885b919e1f9e410693291d5575f7f4ed",
82 | "20bf4656b0aa49df85a2b5dc743f8b10",
83 | "e2cd392332aa4772bf972d95d377be1f",
84 | "7aff1a40c9f943b18cf5f474fb54cf0e",
85 | "155d93fd988340e3842d5a2939d4f0a7",
86 | "fa8edcae23db448eb70e14726b650667",
87 | "3545befbc8924abca73cf6cfdb6ead60",
88 | "530c357a2bfb422190ecf9a7606bead7",
89 | "7ab567c1f33547bcb4f395b09b5d547c",
90 | "9f71abcacd154557a7f6a7b34676978f",
91 | "e8da003fcd7342d382c6faddb28af484",
92 | "db8ff08397c343ee8ae7a1863655175b",
93 | "6f234194b2f744c6b9895b37625526bc",
94 | "1714271f35c1451186d668bc136fdb75",
95 | "7b3ca20c348d4fe3bf88d0bd1adbdc2f",
96 | "dd432405c22a497e9c8c28793d89bfc8",
97 | "690d0fbf63b34557bb742f8745caf2bd",
98 | "f5c6bb58779248b5a9caa906156e0cd9",
99 | "bbac7d370e234af0b4cf20ace13e361c",
100 | "0a899139f1f849e0b9d1966062c8e2f6",
101 | "2f02c79edd024c73b71a432b6218bcc6",
102 | "3e8bf0fbf4844e618be5d6f076a1832e",
103 | "e749b795c4c5480eb378e05f2b2408c3",
104 | "62d07eb3ad454b70bdaf99598578c810",
105 | "f69d8e8a4e174b7382610cf3c497bb7b",
106 | "906543db98a44f43abdf245509f4fcee",
107 | "48d1d6a874cf4ef28080fb30de2ef493",
108 | "e60c5d50578a48189b1970f5a7abf069",
109 | "eca800b9be034f5285d0873ca23d3baf",
110 | "5714e66524bf45b7a80bf425e3532d29",
111 | "35bd67b6557c41fc8e6bdcba49f6da06",
112 | "90e258bc60ed41218fb30cd5eb30a56e",
113 | "a0473c41a5ee4be1940d21f3e6287c4f",
114 | "627a93427bc3433e9c52df769648d388",
115 | "998ac37a221c46c389c1a239a9fb79bc",
116 | "1682d18df349461fbce9afaf390f14af",
117 | "26f392b41d404db282b44b3a52bf8b3c",
118 | "ee23b33158544ec9b901fc93c0d9cd94",
119 | "c310ebc5e4e54a159cffccbcfdd9b727",
120 | "cb3d490817574d5ea1017a1fe20e60e0",
121 | "f2f97d1c2d354db5befe512d80f9853e",
122 | "c8b622e02ce043c997b99632e7411d3d",
123 | "50dbff5eb9e94f4c876680007bf3add6",
124 | "cebf1c1226ff42128dbe5abfc3928214",
125 | "e7b07b23703e46f4adc60a86d7eaa327",
126 | "2705bfba51e049b0bf2fd1d7d21d0eef",
127 | "57f8dd1f25bf40a88fa07fb6b3b11261",
128 | "3472426d6625433b9c470f500ef1ca74",
129 | "3344aea877d5458bb3fa445b3c79c795",
130 | "e4331b5ab5c547079e16d05b8992718b",
131 | "922cce75a65b424eb7a251659657757d",
132 | "cfaa646376a64891aa43a7e3848c12fc",
133 | "937d2150bd974ffdb4053870c9339b0f",
134 | "4665d5bf963b4cab85fd038b8d288156",
135 | "e8cc4aace30a463faad2dfe6342a2821",
136 | "b89ecb8a8a144723a4fe528ff04fba78",
137 | "4051bcbe013642fc931a6fbb94d42a6f",
138 | "37f8dddb0de34128a7d15aac01d7370f",
139 | "e544f1cb1428406b81cf89ab4d29c953",
140 | "14120640e617483f80c34982da8e5391",
141 | "bc07491af94f45f9b398f841f3c3fc5a",
142 | "c8d951f2a04340d8bf62e8ddca072a7f",
143 | "a2a6e91f8e754eeb85b9997b9e7a454a",
144 | "1f6c4390253d4b4684d3f04bc6f0ca43",
145 | "77c9df6d39e94dcca57d2738f11fabc3",
146 | "1339218232624b45a5cdfde89847241e",
147 | "fbe2788824ea4de0b112d533c5e57c9d",
148 | "96956674f7804a14864a6baaae4bcd2c",
149 | "f0d0db32a8074f47868eefecb6c24b4e",
150 | "c85c990c84064da5a4126893328a2805",
151 | "aef802c8c44843acb7df00f1ae75cde4",
152 | "92004181dd9e4e9083e03788dca31c10",
153 | "ec6acd940e154ec4b4314aeaab783ea2",
154 | "9770b1cf7b6c42229454441ad6cea465",
155 | "30740f63144043c3acb482e42ae82119"
156 | ]
157 | },
158 | "id": "tElKr2Fkp1bO",
159 | "outputId": "5b1e7c3c-344a-4819-8c20-aacfb1092cf6"
160 | },
161 | "outputs": [],
162 | "source": [
163 | "#Model used in the app: https://huggingface.co/prithivMLmods/Qwen2-VL-OCR-2B-Instruct\n",
164 | "#Architecture built on: Qwen2VLForConditionalGeneration [qwen2_vl]\n",
165 | "import gradio as gr\n",
166 | "import spaces\n",
167 | "from transformers import Qwen2VLForConditionalGeneration, AutoProcessor, TextIteratorStreamer\n",
168 | "from qwen_vl_utils import process_vision_info\n",
169 | "import torch\n",
170 | "from PIL import Image\n",
171 | "import os\n",
172 | "import uuid\n",
173 | "import io\n",
174 | "from threading import Thread\n",
175 | "from reportlab.lib.pagesizes import A4\n",
176 | "from reportlab.lib.styles import getSampleStyleSheet\n",
177 | "from reportlab.lib import colors\n",
178 | "from reportlab.platypus import SimpleDocTemplate, Image as RLImage, Paragraph, Spacer\n",
179 | "from reportlab.lib.units import inch\n",
180 | "from reportlab.pdfbase import pdfmetrics\n",
181 | "from reportlab.pdfbase.ttfonts import TTFont\n",
182 | "import docx\n",
183 | "from docx.enum.text import WD_ALIGN_PARAGRAPH\n",
184 | "\n",
185 | "# Define model options\n",
186 | "MODEL_OPTIONS = {\n",
187 | " \"Qwen2-VL-OCR-2B-Instruct\": \"prithivMLmods/Qwen2-VL-OCR-2B-Instruct\",\n",
188 | "}\n",
189 | "\n",
190 | "# Preload models and processors into CUDA\n",
191 | "models = {}\n",
192 | "processors = {}\n",
193 | "for name, model_id in MODEL_OPTIONS.items():\n",
194 | " print(f\"Loading {name}🤗. Hold tight, this will take around 4-6 minutes..\")\n",
195 | " models[name] = Qwen2VLForConditionalGeneration.from_pretrained(\n",
196 | " model_id,\n",
197 | " trust_remote_code=True,\n",
198 | " torch_dtype=torch.float16\n",
199 | " ).to(\"cuda\").eval()\n",
200 | " processors[name] = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)\n",
201 | "\n",
202 | "image_extensions = Image.registered_extensions()\n",
203 | "\n",
204 | "def identify_and_save_blob(blob_path):\n",
205 | " \"\"\"Identifies if the blob is an image and saves it.\"\"\"\n",
206 | " try:\n",
207 | " with open(blob_path, 'rb') as file:\n",
208 | " blob_content = file.read()\n",
209 | " try:\n",
210 | " Image.open(io.BytesIO(blob_content)).verify() # Check if it's a valid image\n",
211 | " extension = \".png\" # Default to PNG for saving\n",
212 | " media_type = \"image\"\n",
213 | " except (IOError, SyntaxError):\n",
214 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
215 | "\n",
216 | " filename = f\"temp_{uuid.uuid4()}_media{extension}\"\n",
217 | " with open(filename, \"wb\") as f:\n",
218 | " f.write(blob_content)\n",
219 | "\n",
220 | " return filename, media_type\n",
221 | "\n",
222 | " except FileNotFoundError:\n",
223 | " raise ValueError(f\"The file {blob_path} was not found.\")\n",
224 | " except Exception as e:\n",
225 | " raise ValueError(f\"An error occurred while processing the file: {e}\")\n",
226 | "\n",
227 | "@spaces.GPU\n",
228 | "def qwen_inference(model_name, media_input, text_input=None):\n",
229 | " \"\"\"Handles inference for the selected model.\"\"\"\n",
230 | " model = models[model_name]\n",
231 | " processor = processors[model_name]\n",
232 | "\n",
233 | " if isinstance(media_input, str):\n",
234 | " media_path = media_input\n",
235 | " if media_path.endswith(tuple([i for i in image_extensions.keys()])):\n",
236 | " media_type = \"image\"\n",
237 | " else:\n",
238 | " try:\n",
239 | " media_path, media_type = identify_and_save_blob(media_input)\n",
240 | " except Exception as e:\n",
241 | " raise ValueError(\"Unsupported media type. Please upload a valid image.\")\n",
242 | "\n",
243 | " messages = [\n",
244 | " {\n",
245 | " \"role\": \"user\",\n",
246 | " \"content\": [\n",
247 | " {\n",
248 | " \"type\": media_type,\n",
249 | " media_type: media_path\n",
250 | " },\n",
251 | " {\"type\": \"text\", \"text\": text_input},\n",
252 | " ],\n",
253 | " }\n",
254 | " ]\n",
255 | "\n",
256 | " text = processor.apply_chat_template(\n",
257 | " messages, tokenize=False, add_generation_prompt=True\n",
258 | " )\n",
259 | " image_inputs, _ = process_vision_info(messages)\n",
260 | " inputs = processor(\n",
261 | " text=[text],\n",
262 | " images=image_inputs,\n",
263 | " padding=True,\n",
264 | " return_tensors=\"pt\",\n",
265 | " ).to(\"cuda\")\n",
266 | "\n",
267 | " streamer = TextIteratorStreamer(\n",
268 | " processor.tokenizer, skip_prompt=True, skip_special_tokens=True\n",
269 | " )\n",
270 | " generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)\n",
271 | "\n",
272 | " thread = Thread(target=model.generate, kwargs=generation_kwargs)\n",
273 | " thread.start()\n",
274 | "\n",
275 | " buffer = \"\"\n",
276 | " for new_text in streamer:\n",
277 | " buffer += new_text\n",
278 | " # Remove <|im_end|> or similar tokens from the output\n",
279 | " buffer = buffer.replace(\"<|im_end|>\", \"\")\n",
280 | " yield buffer\n",
281 | "\n",
282 | "def format_plain_text(output_text):\n",
283 | " \"\"\"Formats the output text as plain text without LaTeX delimiters.\"\"\"\n",
284 | " # Remove LaTeX delimiters and convert to plain text\n",
285 | " plain_text = output_text.replace(\"\\\\(\", \"\").replace(\"\\\\)\", \"\").replace(\"\\\\[\", \"\").replace(\"\\\\]\", \"\")\n",
286 | " return plain_text\n",
287 | "\n",
288 | "def generate_document(media_path, output_text, file_format, font_size, line_spacing, alignment, image_size):\n",
289 | " \"\"\"Generates a document with the input image and plain text output.\"\"\"\n",
290 | " plain_text = format_plain_text(output_text)\n",
291 | " if file_format == \"pdf\":\n",
292 | " return generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
293 | " elif file_format == \"docx\":\n",
294 | " return generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size)\n",
295 | "\n",
296 | "def generate_pdf(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
297 | " \"\"\"Generates a PDF document.\"\"\"\n",
298 | " filename = f\"output_{uuid.uuid4()}.pdf\"\n",
299 | " doc = SimpleDocTemplate(\n",
300 | " filename,\n",
301 | " pagesize=A4,\n",
302 | " rightMargin=inch,\n",
303 | " leftMargin=inch,\n",
304 | " topMargin=inch,\n",
305 | " bottomMargin=inch\n",
306 | " )\n",
307 | " styles = getSampleStyleSheet()\n",
308 | " styles[\"Normal\"].fontSize = int(font_size)\n",
309 | " styles[\"Normal\"].leading = int(font_size) * line_spacing\n",
310 | " styles[\"Normal\"].alignment = {\n",
311 | " \"Left\": 0,\n",
312 | " \"Center\": 1,\n",
313 | " \"Right\": 2,\n",
314 | " \"Justified\": 4\n",
315 | " }[alignment]\n",
316 | "\n",
317 | " story = []\n",
318 | "\n",
319 | " # Add image with size adjustment\n",
320 | " image_sizes = {\n",
321 | " \"Small\": (200, 200),\n",
322 | " \"Medium\": (400, 400),\n",
323 | " \"Large\": (600, 600)\n",
324 | " }\n",
325 | " img = RLImage(media_path, width=image_sizes[image_size][0], height=image_sizes[image_size][1])\n",
326 | " story.append(img)\n",
327 | " story.append(Spacer(1, 12))\n",
328 | "\n",
329 | " # Add plain text output\n",
330 | " text = Paragraph(plain_text, styles[\"Normal\"])\n",
331 | " story.append(text)\n",
332 | "\n",
333 | " doc.build(story)\n",
334 | " return filename\n",
335 | "\n",
336 | "def generate_docx(media_path, plain_text, font_size, line_spacing, alignment, image_size):\n",
337 | " \"\"\"Generates a DOCX document.\"\"\"\n",
338 | " filename = f\"output_{uuid.uuid4()}.docx\"\n",
339 | " doc = docx.Document()\n",
340 | "\n",
341 | " # Add image with size adjustment\n",
342 | " image_sizes = {\n",
343 | " \"Small\": docx.shared.Inches(2),\n",
344 | " \"Medium\": docx.shared.Inches(4),\n",
345 | " \"Large\": docx.shared.Inches(6)\n",
346 | " }\n",
347 | " doc.add_picture(media_path, width=image_sizes[image_size])\n",
348 | " doc.add_paragraph()\n",
349 | "\n",
350 | " # Add plain text output\n",
351 | " paragraph = doc.add_paragraph()\n",
352 | " paragraph.paragraph_format.line_spacing = line_spacing\n",
353 | " paragraph.paragraph_format.alignment = {\n",
354 | " \"Left\": WD_ALIGN_PARAGRAPH.LEFT,\n",
355 | " \"Center\": WD_ALIGN_PARAGRAPH.CENTER,\n",
356 | " \"Right\": WD_ALIGN_PARAGRAPH.RIGHT,\n",
357 | " \"Justified\": WD_ALIGN_PARAGRAPH.JUSTIFY\n",
358 | " }[alignment]\n",
359 | " run = paragraph.add_run(plain_text)\n",
360 | " run.font.size = docx.shared.Pt(int(font_size))\n",
361 | "\n",
362 | " doc.save(filename)\n",
363 | " return filename\n",
364 | "\n",
365 | "# CSS for output styling\n",
366 | "css = \"\"\"\n",
367 | " #output {\n",
368 | " height: 500px;\n",
369 | " overflow: auto;\n",
370 | " border: 1px solid #ccc;\n",
371 | " }\n",
372 | ".submit-btn {\n",
373 | " background-color: #cf3434 !important;\n",
374 | " color: white !important;\n",
375 | "}\n",
376 | ".submit-btn:hover {\n",
377 | " background-color: #ff2323 !important;\n",
378 | "}\n",
379 | ".download-btn {\n",
380 | " background-color: #35a6d6 !important;\n",
381 | " color: white !important;\n",
382 | "}\n",
383 | ".download-btn:hover {\n",
384 | " background-color: #22bcff !important;\n",
385 | "}\n",
386 | "\"\"\"\n",
387 | "\n",
388 | "# Gradio app setup\n",
389 | "with gr.Blocks(css=css, theme=\"bethecloud/storj_theme\") as demo:\n",
390 | " gr.Markdown(\"# **Multimodal-OCR : Qwen2-VL-OCR-2B-Instruct**\")\n",
391 | "\n",
392 | " with gr.Tab(label=\"Image Input\"):\n",
393 | "\n",
394 | " with gr.Row():\n",
395 | " with gr.Column():\n",
396 | " model_choice = gr.Dropdown(\n",
397 | " label=\"Model Selection\",\n",
398 | " choices=list(MODEL_OPTIONS.keys()),\n",
399 | " value=\"Qwen2-VL-OCR-2B-Instruct\"\n",
400 | " )\n",
401 | " input_media = gr.File(\n",
402 | " label=\"Upload Image\", type=\"filepath\"\n",
403 | " )\n",
404 | " text_input = gr.Textbox(label=\"Question\", value=\"OCR the image precisely.\")\n",
405 | " submit_btn = gr.Button(value=\"Submit\", elem_classes=\"submit-btn\")\n",
406 | "\n",
407 | " with gr.Column():\n",
408 | " output_text = gr.Textbox(label=\"Output Text\", lines=7)\n",
409 | "\n",
410 | " with gr.Accordion(\"Plain Text\", open=False):\n",
411 | " plain_text_output = gr.Textbox(label=\"Standardized Plain Text\", lines=10)\n",
412 | "\n",
413 | " submit_btn.click(\n",
414 | " qwen_inference, [model_choice, input_media, text_input], [output_text]\n",
415 | " ).then(\n",
416 | " lambda output_text: format_plain_text(output_text), [output_text], [plain_text_output]\n",
417 | " )\n",
418 | "\n",
419 | " with gr.Accordion(\"Docx/PDF Settings\", open=False):\n",
420 | " with gr.Row():\n",
421 | " with gr.Column():\n",
422 | " line_spacing = gr.Dropdown(\n",
423 | " choices=[0.5, 1.0, 1.15, 1.5, 2.0, 2.5, 3.0],\n",
424 | " value=1.5,\n",
425 | " label=\"Line Spacing\"\n",
426 | " )\n",
427 | " font_size = gr.Dropdown(\n",
428 | " choices=[\"8\", \"10\", \"12\", \"14\", \"16\", \"18\", \"20\", \"22\", \"24\"],\n",
429 | " value=\"16\",\n",
430 | " label=\"Font Size\"\n",
431 | " )\n",
432 | " alignment = gr.Dropdown(\n",
433 | " choices=[\"Left\", \"Center\", \"Right\", \"Justified\"],\n",
434 | " value=\"Justified\",\n",
435 | " label=\"Text Alignment\"\n",
436 | " )\n",
437 | " image_size = gr.Dropdown(\n",
438 | " choices=[\"Small\", \"Medium\", \"Large\"],\n",
439 | " value=\"Medium\",\n",
440 | " label=\"Image Size\"\n",
441 | " )\n",
442 | " file_format = gr.Radio([\"pdf\", \"docx\"], label=\"File Format\", value=\"pdf\")\n",
443 | "\n",
444 | " get_document_btn = gr.Button(value=\"Get Document\", elem_classes=\"download-btn\")\n",
445 | "\n",
446 | " get_document_btn.click(\n",
447 | " generate_document, [input_media, output_text, file_format, font_size, line_spacing, alignment, image_size], gr.File(label=\"Download Document\")\n",
448 | " )\n",
449 | "\n",
450 | "demo.launch(debug=True)"
451 | ]
452 | },
453 | {
454 | "cell_type": "markdown",
455 | "metadata": {
456 | "id": "iujTALhGd33H"
457 | },
458 | "source": [
459 | "**Demo Inference**\n",
460 | "\n",
461 | "`Query Input : OCR the Image Precisely`\n",
462 | "\n",
463 | "\n",
464 | " \n",
465 | " \n",
466 | " \n",
467 | " | \n",
468 | " \n",
469 | " \n",
470 | " | \n",
471 | "
\n",
472 | "
\n"
473 | ]
474 | }
475 | ],
476 | "metadata": {
477 | "accelerator": "GPU",
478 | "colab": {
479 | "gpuType": "T4",
480 | "provenance": []
481 | },
482 | "kernelspec": {
483 | "display_name": "Python 3",
484 | "name": "python3"
485 | },
486 | "language_info": {
487 | "name": "python"
488 | },
489 | "widgets": {
490 | "application/vnd.jupyter.widget-state+json": {
491 | "06bcc05a336c4bc8a16fd64b8c93e90a": {
492 | "model_module": "@jupyter-widgets/base",
493 | "model_module_version": "1.2.0",
494 | "model_name": "LayoutModel",
495 | "state": {
496 | "_model_module": "@jupyter-widgets/base",
497 | "_model_module_version": "1.2.0",
498 | "_model_name": "LayoutModel",
499 | "_view_count": null,
500 | "_view_module": "@jupyter-widgets/base",
501 | "_view_module_version": "1.2.0",
502 | "_view_name": "LayoutView",
503 | "align_content": null,
504 | "align_items": null,
505 | "align_self": null,
506 | "border": null,
507 | "bottom": null,
508 | "display": null,
509 | "flex": null,
510 | "flex_flow": null,
511 | "grid_area": null,
512 | "grid_auto_columns": null,
513 | "grid_auto_flow": null,
514 | "grid_auto_rows": null,
515 | "grid_column": null,
516 | "grid_gap": null,
517 | "grid_row": null,
518 | "grid_template_areas": null,
519 | "grid_template_columns": null,
520 | "grid_template_rows": null,
521 | "height": null,
522 | "justify_content": null,
523 | "justify_items": null,
524 | "left": null,
525 | "margin": null,
526 | "max_height": null,
527 | "max_width": null,
528 | "min_height": null,
529 | "min_width": null,
530 | "object_fit": null,
531 | "object_position": null,
532 | "order": null,
533 | "overflow": null,
534 | "overflow_x": null,
535 | "overflow_y": null,
536 | "padding": null,
537 | "right": null,
538 | "top": null,
539 | "visibility": null,
540 | "width": null
541 | }
542 | },
543 | "0834cba909674903b340ead5d03d8ee7": {
544 | "model_module": "@jupyter-widgets/base",
545 | "model_module_version": "1.2.0",
546 | "model_name": "LayoutModel",
547 | "state": {
548 | "_model_module": "@jupyter-widgets/base",
549 | "_model_module_version": "1.2.0",
550 | "_model_name": "LayoutModel",
551 | "_view_count": null,
552 | "_view_module": "@jupyter-widgets/base",
553 | "_view_module_version": "1.2.0",
554 | "_view_name": "LayoutView",
555 | "align_content": null,
556 | "align_items": null,
557 | "align_self": null,
558 | "border": null,
559 | "bottom": null,
560 | "display": null,
561 | "flex": null,
562 | "flex_flow": null,
563 | "grid_area": null,
564 | "grid_auto_columns": null,
565 | "grid_auto_flow": null,
566 | "grid_auto_rows": null,
567 | "grid_column": null,
568 | "grid_gap": null,
569 | "grid_row": null,
570 | "grid_template_areas": null,
571 | "grid_template_columns": null,
572 | "grid_template_rows": null,
573 | "height": null,
574 | "justify_content": null,
575 | "justify_items": null,
576 | "left": null,
577 | "margin": null,
578 | "max_height": null,
579 | "max_width": null,
580 | "min_height": null,
581 | "min_width": null,
582 | "object_fit": null,
583 | "object_position": null,
584 | "order": null,
585 | "overflow": null,
586 | "overflow_x": null,
587 | "overflow_y": null,
588 | "padding": null,
589 | "right": null,
590 | "top": null,
591 | "visibility": null,
592 | "width": null
593 | }
594 | },
595 | "0a899139f1f849e0b9d1966062c8e2f6": {
596 | "model_module": "@jupyter-widgets/controls",
597 | "model_module_version": "1.5.0",
598 | "model_name": "DescriptionStyleModel",
599 | "state": {
600 | "_model_module": "@jupyter-widgets/controls",
601 | "_model_module_version": "1.5.0",
602 | "_model_name": "DescriptionStyleModel",
603 | "_view_count": null,
604 | "_view_module": "@jupyter-widgets/base",
605 | "_view_module_version": "1.2.0",
606 | "_view_name": "StyleView",
607 | "description_width": ""
608 | }
609 | },
610 | "10126373db724c58bb1539c09defe1be": {
611 | "model_module": "@jupyter-widgets/base",
612 | "model_module_version": "1.2.0",
613 | "model_name": "LayoutModel",
614 | "state": {
615 | "_model_module": "@jupyter-widgets/base",
616 | "_model_module_version": "1.2.0",
617 | "_model_name": "LayoutModel",
618 | "_view_count": null,
619 | "_view_module": "@jupyter-widgets/base",
620 | "_view_module_version": "1.2.0",
621 | "_view_name": "LayoutView",
622 | "align_content": null,
623 | "align_items": null,
624 | "align_self": null,
625 | "border": null,
626 | "bottom": null,
627 | "display": null,
628 | "flex": null,
629 | "flex_flow": null,
630 | "grid_area": null,
631 | "grid_auto_columns": null,
632 | "grid_auto_flow": null,
633 | "grid_auto_rows": null,
634 | "grid_column": null,
635 | "grid_gap": null,
636 | "grid_row": null,
637 | "grid_template_areas": null,
638 | "grid_template_columns": null,
639 | "grid_template_rows": null,
640 | "height": null,
641 | "justify_content": null,
642 | "justify_items": null,
643 | "left": null,
644 | "margin": null,
645 | "max_height": null,
646 | "max_width": null,
647 | "min_height": null,
648 | "min_width": null,
649 | "object_fit": null,
650 | "object_position": null,
651 | "order": null,
652 | "overflow": null,
653 | "overflow_x": null,
654 | "overflow_y": null,
655 | "padding": null,
656 | "right": null,
657 | "top": null,
658 | "visibility": null,
659 | "width": null
660 | }
661 | },
662 | "1339218232624b45a5cdfde89847241e": {
663 | "model_module": "@jupyter-widgets/controls",
664 | "model_module_version": "1.5.0",
665 | "model_name": "HTMLModel",
666 | "state": {
667 | "_dom_classes": [],
668 | "_model_module": "@jupyter-widgets/controls",
669 | "_model_module_version": "1.5.0",
670 | "_model_name": "HTMLModel",
671 | "_view_count": null,
672 | "_view_module": "@jupyter-widgets/controls",
673 | "_view_module_version": "1.5.0",
674 | "_view_name": "HTMLView",
675 | "description": "",
676 | "description_tooltip": null,
677 | "layout": "IPY_MODEL_c85c990c84064da5a4126893328a2805",
678 | "placeholder": "",
679 | "style": "IPY_MODEL_aef802c8c44843acb7df00f1ae75cde4",
680 | "value": "theme_schema%400.0.1.json: "
681 | }
682 | },
683 | "13b7228aa5134ee4b0efd7fc2e9d7927": {
684 | "model_module": "@jupyter-widgets/base",
685 | "model_module_version": "1.2.0",
686 | "model_name": "LayoutModel",
687 | "state": {
688 | "_model_module": "@jupyter-widgets/base",
689 | "_model_module_version": "1.2.0",
690 | "_model_name": "LayoutModel",
691 | "_view_count": null,
692 | "_view_module": "@jupyter-widgets/base",
693 | "_view_module_version": "1.2.0",
694 | "_view_name": "LayoutView",
695 | "align_content": null,
696 | "align_items": null,
697 | "align_self": null,
698 | "border": null,
699 | "bottom": null,
700 | "display": null,
701 | "flex": null,
702 | "flex_flow": null,
703 | "grid_area": null,
704 | "grid_auto_columns": null,
705 | "grid_auto_flow": null,
706 | "grid_auto_rows": null,
707 | "grid_column": null,
708 | "grid_gap": null,
709 | "grid_row": null,
710 | "grid_template_areas": null,
711 | "grid_template_columns": null,
712 | "grid_template_rows": null,
713 | "height": null,
714 | "justify_content": null,
715 | "justify_items": null,
716 | "left": null,
717 | "margin": null,
718 | "max_height": null,
719 | "max_width": null,
720 | "min_height": null,
721 | "min_width": null,
722 | "object_fit": null,
723 | "object_position": null,
724 | "order": null,
725 | "overflow": null,
726 | "overflow_x": null,
727 | "overflow_y": null,
728 | "padding": null,
729 | "right": null,
730 | "top": null,
731 | "visibility": null,
732 | "width": "20px"
733 | }
734 | },
735 | "14120640e617483f80c34982da8e5391": {
736 | "model_module": "@jupyter-widgets/controls",
737 | "model_module_version": "1.5.0",
738 | "model_name": "DescriptionStyleModel",
739 | "state": {
740 | "_model_module": "@jupyter-widgets/controls",
741 | "_model_module_version": "1.5.0",
742 | "_model_name": "DescriptionStyleModel",
743 | "_view_count": null,
744 | "_view_module": "@jupyter-widgets/base",
745 | "_view_module_version": "1.2.0",
746 | "_view_name": "StyleView",
747 | "description_width": ""
748 | }
749 | },
750 | "14fda8541b1c4c0e84b27253f40a4144": {
751 | "model_module": "@jupyter-widgets/controls",
752 | "model_module_version": "1.5.0",
753 | "model_name": "HTMLModel",
754 | "state": {
755 | "_dom_classes": [],
756 | "_model_module": "@jupyter-widgets/controls",
757 | "_model_module_version": "1.5.0",
758 | "_model_name": "HTMLModel",
759 | "_view_count": null,
760 | "_view_module": "@jupyter-widgets/controls",
761 | "_view_module_version": "1.5.0",
762 | "_view_name": "HTMLView",
763 | "description": "",
764 | "description_tooltip": null,
765 | "layout": "IPY_MODEL_6d8fc2d9b39e4264af969fd4968db0f0",
766 | "placeholder": "",
767 | "style": "IPY_MODEL_5a9c313556474d32b6920a31d682c993",
768 | "value": "config.json: "
769 | }
770 | },
771 | "155d93fd988340e3842d5a2939d4f0a7": {
772 | "model_module": "@jupyter-widgets/controls",
773 | "model_module_version": "1.5.0",
774 | "model_name": "DescriptionStyleModel",
775 | "state": {
776 | "_model_module": "@jupyter-widgets/controls",
777 | "_model_module_version": "1.5.0",
778 | "_model_name": "DescriptionStyleModel",
779 | "_view_count": null,
780 | "_view_module": "@jupyter-widgets/base",
781 | "_view_module_version": "1.2.0",
782 | "_view_name": "StyleView",
783 | "description_width": ""
784 | }
785 | },
786 | "1682d18df349461fbce9afaf390f14af": {
787 | "model_module": "@jupyter-widgets/base",
788 | "model_module_version": "1.2.0",
789 | "model_name": "LayoutModel",
790 | "state": {
791 | "_model_module": "@jupyter-widgets/base",
792 | "_model_module_version": "1.2.0",
793 | "_model_name": "LayoutModel",
794 | "_view_count": null,
795 | "_view_module": "@jupyter-widgets/base",
796 | "_view_module_version": "1.2.0",
797 | "_view_name": "LayoutView",
798 | "align_content": null,
799 | "align_items": null,
800 | "align_self": null,
801 | "border": null,
802 | "bottom": null,
803 | "display": null,
804 | "flex": null,
805 | "flex_flow": null,
806 | "grid_area": null,
807 | "grid_auto_columns": null,
808 | "grid_auto_flow": null,
809 | "grid_auto_rows": null,
810 | "grid_column": null,
811 | "grid_gap": null,
812 | "grid_row": null,
813 | "grid_template_areas": null,
814 | "grid_template_columns": null,
815 | "grid_template_rows": null,
816 | "height": null,
817 | "justify_content": null,
818 | "justify_items": null,
819 | "left": null,
820 | "margin": null,
821 | "max_height": null,
822 | "max_width": null,
823 | "min_height": null,
824 | "min_width": null,
825 | "object_fit": null,
826 | "object_position": null,
827 | "order": null,
828 | "overflow": null,
829 | "overflow_x": null,
830 | "overflow_y": null,
831 | "padding": null,
832 | "right": null,
833 | "top": null,
834 | "visibility": null,
835 | "width": null
836 | }
837 | },
838 | "1714271f35c1451186d668bc136fdb75": {
839 | "model_module": "@jupyter-widgets/base",
840 | "model_module_version": "1.2.0",
841 | "model_name": "LayoutModel",
842 | "state": {
843 | "_model_module": "@jupyter-widgets/base",
844 | "_model_module_version": "1.2.0",
845 | "_model_name": "LayoutModel",
846 | "_view_count": null,
847 | "_view_module": "@jupyter-widgets/base",
848 | "_view_module_version": "1.2.0",
849 | "_view_name": "LayoutView",
850 | "align_content": null,
851 | "align_items": null,
852 | "align_self": null,
853 | "border": null,
854 | "bottom": null,
855 | "display": null,
856 | "flex": null,
857 | "flex_flow": null,
858 | "grid_area": null,
859 | "grid_auto_columns": null,
860 | "grid_auto_flow": null,
861 | "grid_auto_rows": null,
862 | "grid_column": null,
863 | "grid_gap": null,
864 | "grid_row": null,
865 | "grid_template_areas": null,
866 | "grid_template_columns": null,
867 | "grid_template_rows": null,
868 | "height": null,
869 | "justify_content": null,
870 | "justify_items": null,
871 | "left": null,
872 | "margin": null,
873 | "max_height": null,
874 | "max_width": null,
875 | "min_height": null,
876 | "min_width": null,
877 | "object_fit": null,
878 | "object_position": null,
879 | "order": null,
880 | "overflow": null,
881 | "overflow_x": null,
882 | "overflow_y": null,
883 | "padding": null,
884 | "right": null,
885 | "top": null,
886 | "visibility": null,
887 | "width": null
888 | }
889 | },
890 | "1b4e0053f73a4dc8956fd70261050031": {
891 | "model_module": "@jupyter-widgets/controls",
892 | "model_module_version": "1.5.0",
893 | "model_name": "HTMLModel",
894 | "state": {
895 | "_dom_classes": [],
896 | "_model_module": "@jupyter-widgets/controls",
897 | "_model_module_version": "1.5.0",
898 | "_model_name": "HTMLModel",
899 | "_view_count": null,
900 | "_view_module": "@jupyter-widgets/controls",
901 | "_view_module_version": "1.5.0",
902 | "_view_name": "HTMLView",
903 | "description": "",
904 | "description_tooltip": null,
905 | "layout": "IPY_MODEL_10126373db724c58bb1539c09defe1be",
906 | "placeholder": "",
907 | "style": "IPY_MODEL_d7414d9c2c724e389772835304938f97",
908 | "value": " 1.17k/? [00:00<00:00, 113kB/s]"
909 | }
910 | },
911 | "1f6c4390253d4b4684d3f04bc6f0ca43": {
912 | "model_module": "@jupyter-widgets/controls",
913 | "model_module_version": "1.5.0",
914 | "model_name": "DescriptionStyleModel",
915 | "state": {
916 | "_model_module": "@jupyter-widgets/controls",
917 | "_model_module_version": "1.5.0",
918 | "_model_name": "DescriptionStyleModel",
919 | "_view_count": null,
920 | "_view_module": "@jupyter-widgets/base",
921 | "_view_module_version": "1.2.0",
922 | "_view_name": "StyleView",
923 | "description_width": ""
924 | }
925 | },
926 | "20bf4656b0aa49df85a2b5dc743f8b10": {
927 | "model_module": "@jupyter-widgets/controls",
928 | "model_module_version": "1.5.0",
929 | "model_name": "HTMLModel",
930 | "state": {
931 | "_dom_classes": [],
932 | "_model_module": "@jupyter-widgets/controls",
933 | "_model_module_version": "1.5.0",
934 | "_model_name": "HTMLModel",
935 | "_view_count": null,
936 | "_view_module": "@jupyter-widgets/controls",
937 | "_view_module_version": "1.5.0",
938 | "_view_name": "HTMLView",
939 | "description": "",
940 | "description_tooltip": null,
941 | "layout": "IPY_MODEL_530c357a2bfb422190ecf9a7606bead7",
942 | "placeholder": "",
943 | "style": "IPY_MODEL_7ab567c1f33547bcb4f395b09b5d547c",
944 | "value": " 252/252 [00:00<00:00, 27.0kB/s]"
945 | }
946 | },
947 | "24cc5fd73b2e483ca3f2992414fc2ea0": {
948 | "model_module": "@jupyter-widgets/controls",
949 | "model_module_version": "1.5.0",
950 | "model_name": "ProgressStyleModel",
951 | "state": {
952 | "_model_module": "@jupyter-widgets/controls",
953 | "_model_module_version": "1.5.0",
954 | "_model_name": "ProgressStyleModel",
955 | "_view_count": null,
956 | "_view_module": "@jupyter-widgets/base",
957 | "_view_module_version": "1.2.0",
958 | "_view_name": "StyleView",
959 | "bar_color": null,
960 | "description_width": ""
961 | }
962 | },
963 | "26f392b41d404db282b44b3a52bf8b3c": {
964 | "model_module": "@jupyter-widgets/base",
965 | "model_module_version": "1.2.0",
966 | "model_name": "LayoutModel",
967 | "state": {
968 | "_model_module": "@jupyter-widgets/base",
969 | "_model_module_version": "1.2.0",
970 | "_model_name": "LayoutModel",
971 | "_view_count": null,
972 | "_view_module": "@jupyter-widgets/base",
973 | "_view_module_version": "1.2.0",
974 | "_view_name": "LayoutView",
975 | "align_content": null,
976 | "align_items": null,
977 | "align_self": null,
978 | "border": null,
979 | "bottom": null,
980 | "display": null,
981 | "flex": null,
982 | "flex_flow": null,
983 | "grid_area": null,
984 | "grid_auto_columns": null,
985 | "grid_auto_flow": null,
986 | "grid_auto_rows": null,
987 | "grid_column": null,
988 | "grid_gap": null,
989 | "grid_row": null,
990 | "grid_template_areas": null,
991 | "grid_template_columns": null,
992 | "grid_template_rows": null,
993 | "height": null,
994 | "justify_content": null,
995 | "justify_items": null,
996 | "left": null,
997 | "margin": null,
998 | "max_height": null,
999 | "max_width": null,
1000 | "min_height": null,
1001 | "min_width": null,
1002 | "object_fit": null,
1003 | "object_position": null,
1004 | "order": null,
1005 | "overflow": null,
1006 | "overflow_x": null,
1007 | "overflow_y": null,
1008 | "padding": null,
1009 | "right": null,
1010 | "top": null,
1011 | "visibility": null,
1012 | "width": null
1013 | }
1014 | },
1015 | "2705bfba51e049b0bf2fd1d7d21d0eef": {
1016 | "model_module": "@jupyter-widgets/controls",
1017 | "model_module_version": "1.5.0",
1018 | "model_name": "HTMLModel",
1019 | "state": {
1020 | "_dom_classes": [],
1021 | "_model_module": "@jupyter-widgets/controls",
1022 | "_model_module_version": "1.5.0",
1023 | "_model_name": "HTMLModel",
1024 | "_view_count": null,
1025 | "_view_module": "@jupyter-widgets/controls",
1026 | "_view_module_version": "1.5.0",
1027 | "_view_name": "HTMLView",
1028 | "description": "",
1029 | "description_tooltip": null,
1030 | "layout": "IPY_MODEL_cfaa646376a64891aa43a7e3848c12fc",
1031 | "placeholder": "",
1032 | "style": "IPY_MODEL_937d2150bd974ffdb4053870c9339b0f",
1033 | "value": " 408/408 [00:00<00:00, 44.0kB/s]"
1034 | }
1035 | },
1036 | "2f02c79edd024c73b71a432b6218bcc6": {
1037 | "model_module": "@jupyter-widgets/controls",
1038 | "model_module_version": "1.5.0",
1039 | "model_name": "HBoxModel",
1040 | "state": {
1041 | "_dom_classes": [],
1042 | "_model_module": "@jupyter-widgets/controls",
1043 | "_model_module_version": "1.5.0",
1044 | "_model_name": "HBoxModel",
1045 | "_view_count": null,
1046 | "_view_module": "@jupyter-widgets/controls",
1047 | "_view_module_version": "1.5.0",
1048 | "_view_name": "HBoxView",
1049 | "box_style": "",
1050 | "children": [
1051 | "IPY_MODEL_3e8bf0fbf4844e618be5d6f076a1832e",
1052 | "IPY_MODEL_e749b795c4c5480eb378e05f2b2408c3",
1053 | "IPY_MODEL_62d07eb3ad454b70bdaf99598578c810"
1054 | ],
1055 | "layout": "IPY_MODEL_f69d8e8a4e174b7382610cf3c497bb7b"
1056 | }
1057 | },
1058 | "30740f63144043c3acb482e42ae82119": {
1059 | "model_module": "@jupyter-widgets/controls",
1060 | "model_module_version": "1.5.0",
1061 | "model_name": "DescriptionStyleModel",
1062 | "state": {
1063 | "_model_module": "@jupyter-widgets/controls",
1064 | "_model_module_version": "1.5.0",
1065 | "_model_name": "DescriptionStyleModel",
1066 | "_view_count": null,
1067 | "_view_module": "@jupyter-widgets/base",
1068 | "_view_module_version": "1.2.0",
1069 | "_view_name": "StyleView",
1070 | "description_width": ""
1071 | }
1072 | },
1073 | "3344aea877d5458bb3fa445b3c79c795": {
1074 | "model_module": "@jupyter-widgets/controls",
1075 | "model_module_version": "1.5.0",
1076 | "model_name": "DescriptionStyleModel",
1077 | "state": {
1078 | "_model_module": "@jupyter-widgets/controls",
1079 | "_model_module_version": "1.5.0",
1080 | "_model_name": "DescriptionStyleModel",
1081 | "_view_count": null,
1082 | "_view_module": "@jupyter-widgets/base",
1083 | "_view_module_version": "1.2.0",
1084 | "_view_name": "StyleView",
1085 | "description_width": ""
1086 | }
1087 | },
1088 | "3472426d6625433b9c470f500ef1ca74": {
1089 | "model_module": "@jupyter-widgets/base",
1090 | "model_module_version": "1.2.0",
1091 | "model_name": "LayoutModel",
1092 | "state": {
1093 | "_model_module": "@jupyter-widgets/base",
1094 | "_model_module_version": "1.2.0",
1095 | "_model_name": "LayoutModel",
1096 | "_view_count": null,
1097 | "_view_module": "@jupyter-widgets/base",
1098 | "_view_module_version": "1.2.0",
1099 | "_view_name": "LayoutView",
1100 | "align_content": null,
1101 | "align_items": null,
1102 | "align_self": null,
1103 | "border": null,
1104 | "bottom": null,
1105 | "display": null,
1106 | "flex": null,
1107 | "flex_flow": null,
1108 | "grid_area": null,
1109 | "grid_auto_columns": null,
1110 | "grid_auto_flow": null,
1111 | "grid_auto_rows": null,
1112 | "grid_column": null,
1113 | "grid_gap": null,
1114 | "grid_row": null,
1115 | "grid_template_areas": null,
1116 | "grid_template_columns": null,
1117 | "grid_template_rows": null,
1118 | "height": null,
1119 | "justify_content": null,
1120 | "justify_items": null,
1121 | "left": null,
1122 | "margin": null,
1123 | "max_height": null,
1124 | "max_width": null,
1125 | "min_height": null,
1126 | "min_width": null,
1127 | "object_fit": null,
1128 | "object_position": null,
1129 | "order": null,
1130 | "overflow": null,
1131 | "overflow_x": null,
1132 | "overflow_y": null,
1133 | "padding": null,
1134 | "right": null,
1135 | "top": null,
1136 | "visibility": null,
1137 | "width": null
1138 | }
1139 | },
1140 | "3545befbc8924abca73cf6cfdb6ead60": {
1141 | "model_module": "@jupyter-widgets/controls",
1142 | "model_module_version": "1.5.0",
1143 | "model_name": "ProgressStyleModel",
1144 | "state": {
1145 | "_model_module": "@jupyter-widgets/controls",
1146 | "_model_module_version": "1.5.0",
1147 | "_model_name": "ProgressStyleModel",
1148 | "_view_count": null,
1149 | "_view_module": "@jupyter-widgets/base",
1150 | "_view_module_version": "1.2.0",
1151 | "_view_name": "StyleView",
1152 | "bar_color": null,
1153 | "description_width": ""
1154 | }
1155 | },
1156 | "35bd67b6557c41fc8e6bdcba49f6da06": {
1157 | "model_module": "@jupyter-widgets/controls",
1158 | "model_module_version": "1.5.0",
1159 | "model_name": "DescriptionStyleModel",
1160 | "state": {
1161 | "_model_module": "@jupyter-widgets/controls",
1162 | "_model_module_version": "1.5.0",
1163 | "_model_name": "DescriptionStyleModel",
1164 | "_view_count": null,
1165 | "_view_module": "@jupyter-widgets/base",
1166 | "_view_module_version": "1.2.0",
1167 | "_view_name": "StyleView",
1168 | "description_width": ""
1169 | }
1170 | },
1171 | "36ba4652bd354eceae677c8782c6a92b": {
1172 | "model_module": "@jupyter-widgets/controls",
1173 | "model_module_version": "1.5.0",
1174 | "model_name": "DescriptionStyleModel",
1175 | "state": {
1176 | "_model_module": "@jupyter-widgets/controls",
1177 | "_model_module_version": "1.5.0",
1178 | "_model_name": "DescriptionStyleModel",
1179 | "_view_count": null,
1180 | "_view_module": "@jupyter-widgets/base",
1181 | "_view_module_version": "1.2.0",
1182 | "_view_name": "StyleView",
1183 | "description_width": ""
1184 | }
1185 | },
1186 | "37f8dddb0de34128a7d15aac01d7370f": {
1187 | "model_module": "@jupyter-widgets/base",
1188 | "model_module_version": "1.2.0",
1189 | "model_name": "LayoutModel",
1190 | "state": {
1191 | "_model_module": "@jupyter-widgets/base",
1192 | "_model_module_version": "1.2.0",
1193 | "_model_name": "LayoutModel",
1194 | "_view_count": null,
1195 | "_view_module": "@jupyter-widgets/base",
1196 | "_view_module_version": "1.2.0",
1197 | "_view_name": "LayoutView",
1198 | "align_content": null,
1199 | "align_items": null,
1200 | "align_self": null,
1201 | "border": null,
1202 | "bottom": null,
1203 | "display": null,
1204 | "flex": null,
1205 | "flex_flow": null,
1206 | "grid_area": null,
1207 | "grid_auto_columns": null,
1208 | "grid_auto_flow": null,
1209 | "grid_auto_rows": null,
1210 | "grid_column": null,
1211 | "grid_gap": null,
1212 | "grid_row": null,
1213 | "grid_template_areas": null,
1214 | "grid_template_columns": null,
1215 | "grid_template_rows": null,
1216 | "height": null,
1217 | "justify_content": null,
1218 | "justify_items": null,
1219 | "left": null,
1220 | "margin": null,
1221 | "max_height": null,
1222 | "max_width": null,
1223 | "min_height": null,
1224 | "min_width": null,
1225 | "object_fit": null,
1226 | "object_position": null,
1227 | "order": null,
1228 | "overflow": null,
1229 | "overflow_x": null,
1230 | "overflow_y": null,
1231 | "padding": null,
1232 | "right": null,
1233 | "top": null,
1234 | "visibility": null,
1235 | "width": null
1236 | }
1237 | },
1238 | "3e8bf0fbf4844e618be5d6f076a1832e": {
1239 | "model_module": "@jupyter-widgets/controls",
1240 | "model_module_version": "1.5.0",
1241 | "model_name": "HTMLModel",
1242 | "state": {
1243 | "_dom_classes": [],
1244 | "_model_module": "@jupyter-widgets/controls",
1245 | "_model_module_version": "1.5.0",
1246 | "_model_name": "HTMLModel",
1247 | "_view_count": null,
1248 | "_view_module": "@jupyter-widgets/controls",
1249 | "_view_module_version": "1.5.0",
1250 | "_view_name": "HTMLView",
1251 | "description": "",
1252 | "description_tooltip": null,
1253 | "layout": "IPY_MODEL_906543db98a44f43abdf245509f4fcee",
1254 | "placeholder": "",
1255 | "style": "IPY_MODEL_48d1d6a874cf4ef28080fb30de2ef493",
1256 | "value": "vocab.json: "
1257 | }
1258 | },
1259 | "4051bcbe013642fc931a6fbb94d42a6f": {
1260 | "model_module": "@jupyter-widgets/controls",
1261 | "model_module_version": "1.5.0",
1262 | "model_name": "HTMLModel",
1263 | "state": {
1264 | "_dom_classes": [],
1265 | "_model_module": "@jupyter-widgets/controls",
1266 | "_model_module_version": "1.5.0",
1267 | "_model_name": "HTMLModel",
1268 | "_view_count": null,
1269 | "_view_module": "@jupyter-widgets/controls",
1270 | "_view_module_version": "1.5.0",
1271 | "_view_name": "HTMLView",
1272 | "description": "",
1273 | "description_tooltip": null,
1274 | "layout": "IPY_MODEL_a2a6e91f8e754eeb85b9997b9e7a454a",
1275 | "placeholder": "",
1276 | "style": "IPY_MODEL_1f6c4390253d4b4684d3f04bc6f0ca43",
1277 | "value": " 1.05k/? [00:00<00:00, 62.3kB/s]"
1278 | }
1279 | },
1280 | "4665d5bf963b4cab85fd038b8d288156": {
1281 | "model_module": "@jupyter-widgets/controls",
1282 | "model_module_version": "1.5.0",
1283 | "model_name": "HBoxModel",
1284 | "state": {
1285 | "_dom_classes": [],
1286 | "_model_module": "@jupyter-widgets/controls",
1287 | "_model_module_version": "1.5.0",
1288 | "_model_name": "HBoxModel",
1289 | "_view_count": null,
1290 | "_view_module": "@jupyter-widgets/controls",
1291 | "_view_module_version": "1.5.0",
1292 | "_view_name": "HBoxView",
1293 | "box_style": "",
1294 | "children": [
1295 | "IPY_MODEL_e8cc4aace30a463faad2dfe6342a2821",
1296 | "IPY_MODEL_b89ecb8a8a144723a4fe528ff04fba78",
1297 | "IPY_MODEL_4051bcbe013642fc931a6fbb94d42a6f"
1298 | ],
1299 | "layout": "IPY_MODEL_37f8dddb0de34128a7d15aac01d7370f"
1300 | }
1301 | },
1302 | "48d1d6a874cf4ef28080fb30de2ef493": {
1303 | "model_module": "@jupyter-widgets/controls",
1304 | "model_module_version": "1.5.0",
1305 | "model_name": "DescriptionStyleModel",
1306 | "state": {
1307 | "_model_module": "@jupyter-widgets/controls",
1308 | "_model_module_version": "1.5.0",
1309 | "_model_name": "DescriptionStyleModel",
1310 | "_view_count": null,
1311 | "_view_module": "@jupyter-widgets/base",
1312 | "_view_module_version": "1.2.0",
1313 | "_view_name": "StyleView",
1314 | "description_width": ""
1315 | }
1316 | },
1317 | "50dbff5eb9e94f4c876680007bf3add6": {
1318 | "model_module": "@jupyter-widgets/controls",
1319 | "model_module_version": "1.5.0",
1320 | "model_name": "HBoxModel",
1321 | "state": {
1322 | "_dom_classes": [],
1323 | "_model_module": "@jupyter-widgets/controls",
1324 | "_model_module_version": "1.5.0",
1325 | "_model_name": "HBoxModel",
1326 | "_view_count": null,
1327 | "_view_module": "@jupyter-widgets/controls",
1328 | "_view_module_version": "1.5.0",
1329 | "_view_name": "HBoxView",
1330 | "box_style": "",
1331 | "children": [
1332 | "IPY_MODEL_cebf1c1226ff42128dbe5abfc3928214",
1333 | "IPY_MODEL_e7b07b23703e46f4adc60a86d7eaa327",
1334 | "IPY_MODEL_2705bfba51e049b0bf2fd1d7d21d0eef"
1335 | ],
1336 | "layout": "IPY_MODEL_57f8dd1f25bf40a88fa07fb6b3b11261"
1337 | }
1338 | },
1339 | "52861218164a4578b743c9ad7e533e77": {
1340 | "model_module": "@jupyter-widgets/controls",
1341 | "model_module_version": "1.5.0",
1342 | "model_name": "HBoxModel",
1343 | "state": {
1344 | "_dom_classes": [],
1345 | "_model_module": "@jupyter-widgets/controls",
1346 | "_model_module_version": "1.5.0",
1347 | "_model_name": "HBoxModel",
1348 | "_view_count": null,
1349 | "_view_module": "@jupyter-widgets/controls",
1350 | "_view_module_version": "1.5.0",
1351 | "_view_name": "HBoxView",
1352 | "box_style": "",
1353 | "children": [
1354 | "IPY_MODEL_917a3fc5850b408b8ae8d62016949d5c",
1355 | "IPY_MODEL_67d0c6474f2c41259fa7f5550ca5bbcf",
1356 | "IPY_MODEL_91d1868fecbb4a64b3f36ec7b0146f66"
1357 | ],
1358 | "layout": "IPY_MODEL_f33523339ad44ee18ae542a99ba8d2e4"
1359 | }
1360 | },
1361 | "530c357a2bfb422190ecf9a7606bead7": {
1362 | "model_module": "@jupyter-widgets/base",
1363 | "model_module_version": "1.2.0",
1364 | "model_name": "LayoutModel",
1365 | "state": {
1366 | "_model_module": "@jupyter-widgets/base",
1367 | "_model_module_version": "1.2.0",
1368 | "_model_name": "LayoutModel",
1369 | "_view_count": null,
1370 | "_view_module": "@jupyter-widgets/base",
1371 | "_view_module_version": "1.2.0",
1372 | "_view_name": "LayoutView",
1373 | "align_content": null,
1374 | "align_items": null,
1375 | "align_self": null,
1376 | "border": null,
1377 | "bottom": null,
1378 | "display": null,
1379 | "flex": null,
1380 | "flex_flow": null,
1381 | "grid_area": null,
1382 | "grid_auto_columns": null,
1383 | "grid_auto_flow": null,
1384 | "grid_auto_rows": null,
1385 | "grid_column": null,
1386 | "grid_gap": null,
1387 | "grid_row": null,
1388 | "grid_template_areas": null,
1389 | "grid_template_columns": null,
1390 | "grid_template_rows": null,
1391 | "height": null,
1392 | "justify_content": null,
1393 | "justify_items": null,
1394 | "left": null,
1395 | "margin": null,
1396 | "max_height": null,
1397 | "max_width": null,
1398 | "min_height": null,
1399 | "min_width": null,
1400 | "object_fit": null,
1401 | "object_position": null,
1402 | "order": null,
1403 | "overflow": null,
1404 | "overflow_x": null,
1405 | "overflow_y": null,
1406 | "padding": null,
1407 | "right": null,
1408 | "top": null,
1409 | "visibility": null,
1410 | "width": null
1411 | }
1412 | },
1413 | "5714e66524bf45b7a80bf425e3532d29": {
1414 | "model_module": "@jupyter-widgets/base",
1415 | "model_module_version": "1.2.0",
1416 | "model_name": "LayoutModel",
1417 | "state": {
1418 | "_model_module": "@jupyter-widgets/base",
1419 | "_model_module_version": "1.2.0",
1420 | "_model_name": "LayoutModel",
1421 | "_view_count": null,
1422 | "_view_module": "@jupyter-widgets/base",
1423 | "_view_module_version": "1.2.0",
1424 | "_view_name": "LayoutView",
1425 | "align_content": null,
1426 | "align_items": null,
1427 | "align_self": null,
1428 | "border": null,
1429 | "bottom": null,
1430 | "display": null,
1431 | "flex": null,
1432 | "flex_flow": null,
1433 | "grid_area": null,
1434 | "grid_auto_columns": null,
1435 | "grid_auto_flow": null,
1436 | "grid_auto_rows": null,
1437 | "grid_column": null,
1438 | "grid_gap": null,
1439 | "grid_row": null,
1440 | "grid_template_areas": null,
1441 | "grid_template_columns": null,
1442 | "grid_template_rows": null,
1443 | "height": null,
1444 | "justify_content": null,
1445 | "justify_items": null,
1446 | "left": null,
1447 | "margin": null,
1448 | "max_height": null,
1449 | "max_width": null,
1450 | "min_height": null,
1451 | "min_width": null,
1452 | "object_fit": null,
1453 | "object_position": null,
1454 | "order": null,
1455 | "overflow": null,
1456 | "overflow_x": null,
1457 | "overflow_y": null,
1458 | "padding": null,
1459 | "right": null,
1460 | "top": null,
1461 | "visibility": null,
1462 | "width": null
1463 | }
1464 | },
1465 | "57f8dd1f25bf40a88fa07fb6b3b11261": {
1466 | "model_module": "@jupyter-widgets/base",
1467 | "model_module_version": "1.2.0",
1468 | "model_name": "LayoutModel",
1469 | "state": {
1470 | "_model_module": "@jupyter-widgets/base",
1471 | "_model_module_version": "1.2.0",
1472 | "_model_name": "LayoutModel",
1473 | "_view_count": null,
1474 | "_view_module": "@jupyter-widgets/base",
1475 | "_view_module_version": "1.2.0",
1476 | "_view_name": "LayoutView",
1477 | "align_content": null,
1478 | "align_items": null,
1479 | "align_self": null,
1480 | "border": null,
1481 | "bottom": null,
1482 | "display": null,
1483 | "flex": null,
1484 | "flex_flow": null,
1485 | "grid_area": null,
1486 | "grid_auto_columns": null,
1487 | "grid_auto_flow": null,
1488 | "grid_auto_rows": null,
1489 | "grid_column": null,
1490 | "grid_gap": null,
1491 | "grid_row": null,
1492 | "grid_template_areas": null,
1493 | "grid_template_columns": null,
1494 | "grid_template_rows": null,
1495 | "height": null,
1496 | "justify_content": null,
1497 | "justify_items": null,
1498 | "left": null,
1499 | "margin": null,
1500 | "max_height": null,
1501 | "max_width": null,
1502 | "min_height": null,
1503 | "min_width": null,
1504 | "object_fit": null,
1505 | "object_position": null,
1506 | "order": null,
1507 | "overflow": null,
1508 | "overflow_x": null,
1509 | "overflow_y": null,
1510 | "padding": null,
1511 | "right": null,
1512 | "top": null,
1513 | "visibility": null,
1514 | "width": null
1515 | }
1516 | },
1517 | "5a9c313556474d32b6920a31d682c993": {
1518 | "model_module": "@jupyter-widgets/controls",
1519 | "model_module_version": "1.5.0",
1520 | "model_name": "DescriptionStyleModel",
1521 | "state": {
1522 | "_model_module": "@jupyter-widgets/controls",
1523 | "_model_module_version": "1.5.0",
1524 | "_model_name": "DescriptionStyleModel",
1525 | "_view_count": null,
1526 | "_view_module": "@jupyter-widgets/base",
1527 | "_view_module_version": "1.2.0",
1528 | "_view_name": "StyleView",
1529 | "description_width": ""
1530 | }
1531 | },
1532 | "5e7bab46de5b48af85da3e6c7aea4a3e": {
1533 | "model_module": "@jupyter-widgets/base",
1534 | "model_module_version": "1.2.0",
1535 | "model_name": "LayoutModel",
1536 | "state": {
1537 | "_model_module": "@jupyter-widgets/base",
1538 | "_model_module_version": "1.2.0",
1539 | "_model_name": "LayoutModel",
1540 | "_view_count": null,
1541 | "_view_module": "@jupyter-widgets/base",
1542 | "_view_module_version": "1.2.0",
1543 | "_view_name": "LayoutView",
1544 | "align_content": null,
1545 | "align_items": null,
1546 | "align_self": null,
1547 | "border": null,
1548 | "bottom": null,
1549 | "display": null,
1550 | "flex": null,
1551 | "flex_flow": null,
1552 | "grid_area": null,
1553 | "grid_auto_columns": null,
1554 | "grid_auto_flow": null,
1555 | "grid_auto_rows": null,
1556 | "grid_column": null,
1557 | "grid_gap": null,
1558 | "grid_row": null,
1559 | "grid_template_areas": null,
1560 | "grid_template_columns": null,
1561 | "grid_template_rows": null,
1562 | "height": null,
1563 | "justify_content": null,
1564 | "justify_items": null,
1565 | "left": null,
1566 | "margin": null,
1567 | "max_height": null,
1568 | "max_width": null,
1569 | "min_height": null,
1570 | "min_width": null,
1571 | "object_fit": null,
1572 | "object_position": null,
1573 | "order": null,
1574 | "overflow": null,
1575 | "overflow_x": null,
1576 | "overflow_y": null,
1577 | "padding": null,
1578 | "right": null,
1579 | "top": null,
1580 | "visibility": null,
1581 | "width": null
1582 | }
1583 | },
1584 | "627a93427bc3433e9c52df769648d388": {
1585 | "model_module": "@jupyter-widgets/controls",
1586 | "model_module_version": "1.5.0",
1587 | "model_name": "FloatProgressModel",
1588 | "state": {
1589 | "_dom_classes": [],
1590 | "_model_module": "@jupyter-widgets/controls",
1591 | "_model_module_version": "1.5.0",
1592 | "_model_name": "FloatProgressModel",
1593 | "_view_count": null,
1594 | "_view_module": "@jupyter-widgets/controls",
1595 | "_view_module_version": "1.5.0",
1596 | "_view_name": "ProgressView",
1597 | "bar_style": "success",
1598 | "description": "",
1599 | "description_tooltip": null,
1600 | "layout": "IPY_MODEL_c310ebc5e4e54a159cffccbcfdd9b727",
1601 | "max": 1,
1602 | "min": 0,
1603 | "orientation": "horizontal",
1604 | "style": "IPY_MODEL_cb3d490817574d5ea1017a1fe20e60e0",
1605 | "value": 1
1606 | }
1607 | },
1608 | "62d07eb3ad454b70bdaf99598578c810": {
1609 | "model_module": "@jupyter-widgets/controls",
1610 | "model_module_version": "1.5.0",
1611 | "model_name": "HTMLModel",
1612 | "state": {
1613 | "_dom_classes": [],
1614 | "_model_module": "@jupyter-widgets/controls",
1615 | "_model_module_version": "1.5.0",
1616 | "_model_name": "HTMLModel",
1617 | "_view_count": null,
1618 | "_view_module": "@jupyter-widgets/controls",
1619 | "_view_module_version": "1.5.0",
1620 | "_view_name": "HTMLView",
1621 | "description": "",
1622 | "description_tooltip": null,
1623 | "layout": "IPY_MODEL_5714e66524bf45b7a80bf425e3532d29",
1624 | "placeholder": "",
1625 | "style": "IPY_MODEL_35bd67b6557c41fc8e6bdcba49f6da06",
1626 | "value": " 2.78M/? [00:00<00:00, 58.2MB/s]"
1627 | }
1628 | },
1629 | "67d0c6474f2c41259fa7f5550ca5bbcf": {
1630 | "model_module": "@jupyter-widgets/controls",
1631 | "model_module_version": "1.5.0",
1632 | "model_name": "FloatProgressModel",
1633 | "state": {
1634 | "_dom_classes": [],
1635 | "_model_module": "@jupyter-widgets/controls",
1636 | "_model_module_version": "1.5.0",
1637 | "_model_name": "FloatProgressModel",
1638 | "_view_count": null,
1639 | "_view_module": "@jupyter-widgets/controls",
1640 | "_view_module_version": "1.5.0",
1641 | "_view_name": "ProgressView",
1642 | "bar_style": "success",
1643 | "description": "",
1644 | "description_tooltip": null,
1645 | "layout": "IPY_MODEL_06bcc05a336c4bc8a16fd64b8c93e90a",
1646 | "max": 4418050848,
1647 | "min": 0,
1648 | "orientation": "horizontal",
1649 | "style": "IPY_MODEL_f4966c179fae4b1e91d260494a05a5f7",
1650 | "value": 4418050848
1651 | }
1652 | },
1653 | "690d0fbf63b34557bb742f8745caf2bd": {
1654 | "model_module": "@jupyter-widgets/base",
1655 | "model_module_version": "1.2.0",
1656 | "model_name": "LayoutModel",
1657 | "state": {
1658 | "_model_module": "@jupyter-widgets/base",
1659 | "_model_module_version": "1.2.0",
1660 | "_model_name": "LayoutModel",
1661 | "_view_count": null,
1662 | "_view_module": "@jupyter-widgets/base",
1663 | "_view_module_version": "1.2.0",
1664 | "_view_name": "LayoutView",
1665 | "align_content": null,
1666 | "align_items": null,
1667 | "align_self": null,
1668 | "border": null,
1669 | "bottom": null,
1670 | "display": null,
1671 | "flex": null,
1672 | "flex_flow": null,
1673 | "grid_area": null,
1674 | "grid_auto_columns": null,
1675 | "grid_auto_flow": null,
1676 | "grid_auto_rows": null,
1677 | "grid_column": null,
1678 | "grid_gap": null,
1679 | "grid_row": null,
1680 | "grid_template_areas": null,
1681 | "grid_template_columns": null,
1682 | "grid_template_rows": null,
1683 | "height": null,
1684 | "justify_content": null,
1685 | "justify_items": null,
1686 | "left": null,
1687 | "margin": null,
1688 | "max_height": null,
1689 | "max_width": null,
1690 | "min_height": null,
1691 | "min_width": null,
1692 | "object_fit": null,
1693 | "object_position": null,
1694 | "order": null,
1695 | "overflow": null,
1696 | "overflow_x": null,
1697 | "overflow_y": null,
1698 | "padding": null,
1699 | "right": null,
1700 | "top": null,
1701 | "visibility": null,
1702 | "width": null
1703 | }
1704 | },
1705 | "6d8fc2d9b39e4264af969fd4968db0f0": {
1706 | "model_module": "@jupyter-widgets/base",
1707 | "model_module_version": "1.2.0",
1708 | "model_name": "LayoutModel",
1709 | "state": {
1710 | "_model_module": "@jupyter-widgets/base",
1711 | "_model_module_version": "1.2.0",
1712 | "_model_name": "LayoutModel",
1713 | "_view_count": null,
1714 | "_view_module": "@jupyter-widgets/base",
1715 | "_view_module_version": "1.2.0",
1716 | "_view_name": "LayoutView",
1717 | "align_content": null,
1718 | "align_items": null,
1719 | "align_self": null,
1720 | "border": null,
1721 | "bottom": null,
1722 | "display": null,
1723 | "flex": null,
1724 | "flex_flow": null,
1725 | "grid_area": null,
1726 | "grid_auto_columns": null,
1727 | "grid_auto_flow": null,
1728 | "grid_auto_rows": null,
1729 | "grid_column": null,
1730 | "grid_gap": null,
1731 | "grid_row": null,
1732 | "grid_template_areas": null,
1733 | "grid_template_columns": null,
1734 | "grid_template_rows": null,
1735 | "height": null,
1736 | "justify_content": null,
1737 | "justify_items": null,
1738 | "left": null,
1739 | "margin": null,
1740 | "max_height": null,
1741 | "max_width": null,
1742 | "min_height": null,
1743 | "min_width": null,
1744 | "object_fit": null,
1745 | "object_position": null,
1746 | "order": null,
1747 | "overflow": null,
1748 | "overflow_x": null,
1749 | "overflow_y": null,
1750 | "padding": null,
1751 | "right": null,
1752 | "top": null,
1753 | "visibility": null,
1754 | "width": null
1755 | }
1756 | },
1757 | "6f234194b2f744c6b9895b37625526bc": {
1758 | "model_module": "@jupyter-widgets/controls",
1759 | "model_module_version": "1.5.0",
1760 | "model_name": "HTMLModel",
1761 | "state": {
1762 | "_dom_classes": [],
1763 | "_model_module": "@jupyter-widgets/controls",
1764 | "_model_module_version": "1.5.0",
1765 | "_model_name": "HTMLModel",
1766 | "_view_count": null,
1767 | "_view_module": "@jupyter-widgets/controls",
1768 | "_view_module_version": "1.5.0",
1769 | "_view_name": "HTMLView",
1770 | "description": "",
1771 | "description_tooltip": null,
1772 | "layout": "IPY_MODEL_bbac7d370e234af0b4cf20ace13e361c",
1773 | "placeholder": "",
1774 | "style": "IPY_MODEL_0a899139f1f849e0b9d1966062c8e2f6",
1775 | "value": " 572/572 [00:00<00:00, 55.1kB/s]"
1776 | }
1777 | },
1778 | "72b6c563c2d24b349268b28caac0a9cc": {
1779 | "model_module": "@jupyter-widgets/base",
1780 | "model_module_version": "1.2.0",
1781 | "model_name": "LayoutModel",
1782 | "state": {
1783 | "_model_module": "@jupyter-widgets/base",
1784 | "_model_module_version": "1.2.0",
1785 | "_model_name": "LayoutModel",
1786 | "_view_count": null,
1787 | "_view_module": "@jupyter-widgets/base",
1788 | "_view_module_version": "1.2.0",
1789 | "_view_name": "LayoutView",
1790 | "align_content": null,
1791 | "align_items": null,
1792 | "align_self": null,
1793 | "border": null,
1794 | "bottom": null,
1795 | "display": null,
1796 | "flex": null,
1797 | "flex_flow": null,
1798 | "grid_area": null,
1799 | "grid_auto_columns": null,
1800 | "grid_auto_flow": null,
1801 | "grid_auto_rows": null,
1802 | "grid_column": null,
1803 | "grid_gap": null,
1804 | "grid_row": null,
1805 | "grid_template_areas": null,
1806 | "grid_template_columns": null,
1807 | "grid_template_rows": null,
1808 | "height": null,
1809 | "justify_content": null,
1810 | "justify_items": null,
1811 | "left": null,
1812 | "margin": null,
1813 | "max_height": null,
1814 | "max_width": null,
1815 | "min_height": null,
1816 | "min_width": null,
1817 | "object_fit": null,
1818 | "object_position": null,
1819 | "order": null,
1820 | "overflow": null,
1821 | "overflow_x": null,
1822 | "overflow_y": null,
1823 | "padding": null,
1824 | "right": null,
1825 | "top": null,
1826 | "visibility": null,
1827 | "width": null
1828 | }
1829 | },
1830 | "77c9df6d39e94dcca57d2738f11fabc3": {
1831 | "model_module": "@jupyter-widgets/controls",
1832 | "model_module_version": "1.5.0",
1833 | "model_name": "HBoxModel",
1834 | "state": {
1835 | "_dom_classes": [],
1836 | "_model_module": "@jupyter-widgets/controls",
1837 | "_model_module_version": "1.5.0",
1838 | "_model_name": "HBoxModel",
1839 | "_view_count": null,
1840 | "_view_module": "@jupyter-widgets/controls",
1841 | "_view_module_version": "1.5.0",
1842 | "_view_name": "HBoxView",
1843 | "box_style": "",
1844 | "children": [
1845 | "IPY_MODEL_1339218232624b45a5cdfde89847241e",
1846 | "IPY_MODEL_fbe2788824ea4de0b112d533c5e57c9d",
1847 | "IPY_MODEL_96956674f7804a14864a6baaae4bcd2c"
1848 | ],
1849 | "layout": "IPY_MODEL_f0d0db32a8074f47868eefecb6c24b4e"
1850 | }
1851 | },
1852 | "7ab567c1f33547bcb4f395b09b5d547c": {
1853 | "model_module": "@jupyter-widgets/controls",
1854 | "model_module_version": "1.5.0",
1855 | "model_name": "DescriptionStyleModel",
1856 | "state": {
1857 | "_model_module": "@jupyter-widgets/controls",
1858 | "_model_module_version": "1.5.0",
1859 | "_model_name": "DescriptionStyleModel",
1860 | "_view_count": null,
1861 | "_view_module": "@jupyter-widgets/base",
1862 | "_view_module_version": "1.2.0",
1863 | "_view_name": "StyleView",
1864 | "description_width": ""
1865 | }
1866 | },
1867 | "7aff1a40c9f943b18cf5f474fb54cf0e": {
1868 | "model_module": "@jupyter-widgets/base",
1869 | "model_module_version": "1.2.0",
1870 | "model_name": "LayoutModel",
1871 | "state": {
1872 | "_model_module": "@jupyter-widgets/base",
1873 | "_model_module_version": "1.2.0",
1874 | "_model_name": "LayoutModel",
1875 | "_view_count": null,
1876 | "_view_module": "@jupyter-widgets/base",
1877 | "_view_module_version": "1.2.0",
1878 | "_view_name": "LayoutView",
1879 | "align_content": null,
1880 | "align_items": null,
1881 | "align_self": null,
1882 | "border": null,
1883 | "bottom": null,
1884 | "display": null,
1885 | "flex": null,
1886 | "flex_flow": null,
1887 | "grid_area": null,
1888 | "grid_auto_columns": null,
1889 | "grid_auto_flow": null,
1890 | "grid_auto_rows": null,
1891 | "grid_column": null,
1892 | "grid_gap": null,
1893 | "grid_row": null,
1894 | "grid_template_areas": null,
1895 | "grid_template_columns": null,
1896 | "grid_template_rows": null,
1897 | "height": null,
1898 | "justify_content": null,
1899 | "justify_items": null,
1900 | "left": null,
1901 | "margin": null,
1902 | "max_height": null,
1903 | "max_width": null,
1904 | "min_height": null,
1905 | "min_width": null,
1906 | "object_fit": null,
1907 | "object_position": null,
1908 | "order": null,
1909 | "overflow": null,
1910 | "overflow_x": null,
1911 | "overflow_y": null,
1912 | "padding": null,
1913 | "right": null,
1914 | "top": null,
1915 | "visibility": null,
1916 | "width": null
1917 | }
1918 | },
1919 | "7b3ca20c348d4fe3bf88d0bd1adbdc2f": {
1920 | "model_module": "@jupyter-widgets/base",
1921 | "model_module_version": "1.2.0",
1922 | "model_name": "LayoutModel",
1923 | "state": {
1924 | "_model_module": "@jupyter-widgets/base",
1925 | "_model_module_version": "1.2.0",
1926 | "_model_name": "LayoutModel",
1927 | "_view_count": null,
1928 | "_view_module": "@jupyter-widgets/base",
1929 | "_view_module_version": "1.2.0",
1930 | "_view_name": "LayoutView",
1931 | "align_content": null,
1932 | "align_items": null,
1933 | "align_self": null,
1934 | "border": null,
1935 | "bottom": null,
1936 | "display": null,
1937 | "flex": null,
1938 | "flex_flow": null,
1939 | "grid_area": null,
1940 | "grid_auto_columns": null,
1941 | "grid_auto_flow": null,
1942 | "grid_auto_rows": null,
1943 | "grid_column": null,
1944 | "grid_gap": null,
1945 | "grid_row": null,
1946 | "grid_template_areas": null,
1947 | "grid_template_columns": null,
1948 | "grid_template_rows": null,
1949 | "height": null,
1950 | "justify_content": null,
1951 | "justify_items": null,
1952 | "left": null,
1953 | "margin": null,
1954 | "max_height": null,
1955 | "max_width": null,
1956 | "min_height": null,
1957 | "min_width": null,
1958 | "object_fit": null,
1959 | "object_position": null,
1960 | "order": null,
1961 | "overflow": null,
1962 | "overflow_x": null,
1963 | "overflow_y": null,
1964 | "padding": null,
1965 | "right": null,
1966 | "top": null,
1967 | "visibility": null,
1968 | "width": null
1969 | }
1970 | },
1971 | "885b919e1f9e410693291d5575f7f4ed": {
1972 | "model_module": "@jupyter-widgets/controls",
1973 | "model_module_version": "1.5.0",
1974 | "model_name": "FloatProgressModel",
1975 | "state": {
1976 | "_dom_classes": [],
1977 | "_model_module": "@jupyter-widgets/controls",
1978 | "_model_module_version": "1.5.0",
1979 | "_model_name": "FloatProgressModel",
1980 | "_view_count": null,
1981 | "_view_module": "@jupyter-widgets/controls",
1982 | "_view_module_version": "1.5.0",
1983 | "_view_name": "ProgressView",
1984 | "bar_style": "success",
1985 | "description": "",
1986 | "description_tooltip": null,
1987 | "layout": "IPY_MODEL_fa8edcae23db448eb70e14726b650667",
1988 | "max": 252,
1989 | "min": 0,
1990 | "orientation": "horizontal",
1991 | "style": "IPY_MODEL_3545befbc8924abca73cf6cfdb6ead60",
1992 | "value": 252
1993 | }
1994 | },
1995 | "906543db98a44f43abdf245509f4fcee": {
1996 | "model_module": "@jupyter-widgets/base",
1997 | "model_module_version": "1.2.0",
1998 | "model_name": "LayoutModel",
1999 | "state": {
2000 | "_model_module": "@jupyter-widgets/base",
2001 | "_model_module_version": "1.2.0",
2002 | "_model_name": "LayoutModel",
2003 | "_view_count": null,
2004 | "_view_module": "@jupyter-widgets/base",
2005 | "_view_module_version": "1.2.0",
2006 | "_view_name": "LayoutView",
2007 | "align_content": null,
2008 | "align_items": null,
2009 | "align_self": null,
2010 | "border": null,
2011 | "bottom": null,
2012 | "display": null,
2013 | "flex": null,
2014 | "flex_flow": null,
2015 | "grid_area": null,
2016 | "grid_auto_columns": null,
2017 | "grid_auto_flow": null,
2018 | "grid_auto_rows": null,
2019 | "grid_column": null,
2020 | "grid_gap": null,
2021 | "grid_row": null,
2022 | "grid_template_areas": null,
2023 | "grid_template_columns": null,
2024 | "grid_template_rows": null,
2025 | "height": null,
2026 | "justify_content": null,
2027 | "justify_items": null,
2028 | "left": null,
2029 | "margin": null,
2030 | "max_height": null,
2031 | "max_width": null,
2032 | "min_height": null,
2033 | "min_width": null,
2034 | "object_fit": null,
2035 | "object_position": null,
2036 | "order": null,
2037 | "overflow": null,
2038 | "overflow_x": null,
2039 | "overflow_y": null,
2040 | "padding": null,
2041 | "right": null,
2042 | "top": null,
2043 | "visibility": null,
2044 | "width": null
2045 | }
2046 | },
2047 | "90e258bc60ed41218fb30cd5eb30a56e": {
2048 | "model_module": "@jupyter-widgets/controls",
2049 | "model_module_version": "1.5.0",
2050 | "model_name": "HBoxModel",
2051 | "state": {
2052 | "_dom_classes": [],
2053 | "_model_module": "@jupyter-widgets/controls",
2054 | "_model_module_version": "1.5.0",
2055 | "_model_name": "HBoxModel",
2056 | "_view_count": null,
2057 | "_view_module": "@jupyter-widgets/controls",
2058 | "_view_module_version": "1.5.0",
2059 | "_view_name": "HBoxView",
2060 | "box_style": "",
2061 | "children": [
2062 | "IPY_MODEL_a0473c41a5ee4be1940d21f3e6287c4f",
2063 | "IPY_MODEL_627a93427bc3433e9c52df769648d388",
2064 | "IPY_MODEL_998ac37a221c46c389c1a239a9fb79bc"
2065 | ],
2066 | "layout": "IPY_MODEL_1682d18df349461fbce9afaf390f14af"
2067 | }
2068 | },
2069 | "917a3fc5850b408b8ae8d62016949d5c": {
2070 | "model_module": "@jupyter-widgets/controls",
2071 | "model_module_version": "1.5.0",
2072 | "model_name": "HTMLModel",
2073 | "state": {
2074 | "_dom_classes": [],
2075 | "_model_module": "@jupyter-widgets/controls",
2076 | "_model_module_version": "1.5.0",
2077 | "_model_name": "HTMLModel",
2078 | "_view_count": null,
2079 | "_view_module": "@jupyter-widgets/controls",
2080 | "_view_module_version": "1.5.0",
2081 | "_view_name": "HTMLView",
2082 | "description": "",
2083 | "description_tooltip": null,
2084 | "layout": "IPY_MODEL_72b6c563c2d24b349268b28caac0a9cc",
2085 | "placeholder": "",
2086 | "style": "IPY_MODEL_d34cb5d22b5a466a9f46c0bc673f122d",
2087 | "value": "model.safetensors: 100%"
2088 | }
2089 | },
2090 | "91d1868fecbb4a64b3f36ec7b0146f66": {
2091 | "model_module": "@jupyter-widgets/controls",
2092 | "model_module_version": "1.5.0",
2093 | "model_name": "HTMLModel",
2094 | "state": {
2095 | "_dom_classes": [],
2096 | "_model_module": "@jupyter-widgets/controls",
2097 | "_model_module_version": "1.5.0",
2098 | "_model_name": "HTMLModel",
2099 | "_view_count": null,
2100 | "_view_module": "@jupyter-widgets/controls",
2101 | "_view_module_version": "1.5.0",
2102 | "_view_name": "HTMLView",
2103 | "description": "",
2104 | "description_tooltip": null,
2105 | "layout": "IPY_MODEL_5e7bab46de5b48af85da3e6c7aea4a3e",
2106 | "placeholder": "",
2107 | "style": "IPY_MODEL_36ba4652bd354eceae677c8782c6a92b",
2108 | "value": " 4.42G/4.42G [02:32<00:00, 42.7MB/s]"
2109 | }
2110 | },
2111 | "92004181dd9e4e9083e03788dca31c10": {
2112 | "model_module": "@jupyter-widgets/base",
2113 | "model_module_version": "1.2.0",
2114 | "model_name": "LayoutModel",
2115 | "state": {
2116 | "_model_module": "@jupyter-widgets/base",
2117 | "_model_module_version": "1.2.0",
2118 | "_model_name": "LayoutModel",
2119 | "_view_count": null,
2120 | "_view_module": "@jupyter-widgets/base",
2121 | "_view_module_version": "1.2.0",
2122 | "_view_name": "LayoutView",
2123 | "align_content": null,
2124 | "align_items": null,
2125 | "align_self": null,
2126 | "border": null,
2127 | "bottom": null,
2128 | "display": null,
2129 | "flex": null,
2130 | "flex_flow": null,
2131 | "grid_area": null,
2132 | "grid_auto_columns": null,
2133 | "grid_auto_flow": null,
2134 | "grid_auto_rows": null,
2135 | "grid_column": null,
2136 | "grid_gap": null,
2137 | "grid_row": null,
2138 | "grid_template_areas": null,
2139 | "grid_template_columns": null,
2140 | "grid_template_rows": null,
2141 | "height": null,
2142 | "justify_content": null,
2143 | "justify_items": null,
2144 | "left": null,
2145 | "margin": null,
2146 | "max_height": null,
2147 | "max_width": null,
2148 | "min_height": null,
2149 | "min_width": null,
2150 | "object_fit": null,
2151 | "object_position": null,
2152 | "order": null,
2153 | "overflow": null,
2154 | "overflow_x": null,
2155 | "overflow_y": null,
2156 | "padding": null,
2157 | "right": null,
2158 | "top": null,
2159 | "visibility": null,
2160 | "width": "20px"
2161 | }
2162 | },
2163 | "922cce75a65b424eb7a251659657757d": {
2164 | "model_module": "@jupyter-widgets/controls",
2165 | "model_module_version": "1.5.0",
2166 | "model_name": "ProgressStyleModel",
2167 | "state": {
2168 | "_model_module": "@jupyter-widgets/controls",
2169 | "_model_module_version": "1.5.0",
2170 | "_model_name": "ProgressStyleModel",
2171 | "_view_count": null,
2172 | "_view_module": "@jupyter-widgets/base",
2173 | "_view_module_version": "1.2.0",
2174 | "_view_name": "StyleView",
2175 | "bar_color": null,
2176 | "description_width": ""
2177 | }
2178 | },
2179 | "937d2150bd974ffdb4053870c9339b0f": {
2180 | "model_module": "@jupyter-widgets/controls",
2181 | "model_module_version": "1.5.0",
2182 | "model_name": "DescriptionStyleModel",
2183 | "state": {
2184 | "_model_module": "@jupyter-widgets/controls",
2185 | "_model_module_version": "1.5.0",
2186 | "_model_name": "DescriptionStyleModel",
2187 | "_view_count": null,
2188 | "_view_module": "@jupyter-widgets/base",
2189 | "_view_module_version": "1.2.0",
2190 | "_view_name": "StyleView",
2191 | "description_width": ""
2192 | }
2193 | },
2194 | "96956674f7804a14864a6baaae4bcd2c": {
2195 | "model_module": "@jupyter-widgets/controls",
2196 | "model_module_version": "1.5.0",
2197 | "model_name": "HTMLModel",
2198 | "state": {
2199 | "_dom_classes": [],
2200 | "_model_module": "@jupyter-widgets/controls",
2201 | "_model_module_version": "1.5.0",
2202 | "_model_name": "HTMLModel",
2203 | "_view_count": null,
2204 | "_view_module": "@jupyter-widgets/controls",
2205 | "_view_module_version": "1.5.0",
2206 | "_view_name": "HTMLView",
2207 | "description": "",
2208 | "description_tooltip": null,
2209 | "layout": "IPY_MODEL_9770b1cf7b6c42229454441ad6cea465",
2210 | "placeholder": "",
2211 | "style": "IPY_MODEL_30740f63144043c3acb482e42ae82119",
2212 | "value": " 12.9k/? [00:00<00:00, 1.21MB/s]"
2213 | }
2214 | },
2215 | "9770b1cf7b6c42229454441ad6cea465": {
2216 | "model_module": "@jupyter-widgets/base",
2217 | "model_module_version": "1.2.0",
2218 | "model_name": "LayoutModel",
2219 | "state": {
2220 | "_model_module": "@jupyter-widgets/base",
2221 | "_model_module_version": "1.2.0",
2222 | "_model_name": "LayoutModel",
2223 | "_view_count": null,
2224 | "_view_module": "@jupyter-widgets/base",
2225 | "_view_module_version": "1.2.0",
2226 | "_view_name": "LayoutView",
2227 | "align_content": null,
2228 | "align_items": null,
2229 | "align_self": null,
2230 | "border": null,
2231 | "bottom": null,
2232 | "display": null,
2233 | "flex": null,
2234 | "flex_flow": null,
2235 | "grid_area": null,
2236 | "grid_auto_columns": null,
2237 | "grid_auto_flow": null,
2238 | "grid_auto_rows": null,
2239 | "grid_column": null,
2240 | "grid_gap": null,
2241 | "grid_row": null,
2242 | "grid_template_areas": null,
2243 | "grid_template_columns": null,
2244 | "grid_template_rows": null,
2245 | "height": null,
2246 | "justify_content": null,
2247 | "justify_items": null,
2248 | "left": null,
2249 | "margin": null,
2250 | "max_height": null,
2251 | "max_width": null,
2252 | "min_height": null,
2253 | "min_width": null,
2254 | "object_fit": null,
2255 | "object_position": null,
2256 | "order": null,
2257 | "overflow": null,
2258 | "overflow_x": null,
2259 | "overflow_y": null,
2260 | "padding": null,
2261 | "right": null,
2262 | "top": null,
2263 | "visibility": null,
2264 | "width": null
2265 | }
2266 | },
2267 | "998ac37a221c46c389c1a239a9fb79bc": {
2268 | "model_module": "@jupyter-widgets/controls",
2269 | "model_module_version": "1.5.0",
2270 | "model_name": "HTMLModel",
2271 | "state": {
2272 | "_dom_classes": [],
2273 | "_model_module": "@jupyter-widgets/controls",
2274 | "_model_module_version": "1.5.0",
2275 | "_model_name": "HTMLModel",
2276 | "_view_count": null,
2277 | "_view_module": "@jupyter-widgets/controls",
2278 | "_view_module_version": "1.5.0",
2279 | "_view_name": "HTMLView",
2280 | "description": "",
2281 | "description_tooltip": null,
2282 | "layout": "IPY_MODEL_f2f97d1c2d354db5befe512d80f9853e",
2283 | "placeholder": "",
2284 | "style": "IPY_MODEL_c8b622e02ce043c997b99632e7411d3d",
2285 | "value": " 1.82M/? [00:00<00:00, 48.9MB/s]"
2286 | }
2287 | },
2288 | "9ee381628bcb460ebb0fe5bc6b6b729f": {
2289 | "model_module": "@jupyter-widgets/controls",
2290 | "model_module_version": "1.5.0",
2291 | "model_name": "HBoxModel",
2292 | "state": {
2293 | "_dom_classes": [],
2294 | "_model_module": "@jupyter-widgets/controls",
2295 | "_model_module_version": "1.5.0",
2296 | "_model_name": "HBoxModel",
2297 | "_view_count": null,
2298 | "_view_module": "@jupyter-widgets/controls",
2299 | "_view_module_version": "1.5.0",
2300 | "_view_name": "HBoxView",
2301 | "box_style": "",
2302 | "children": [
2303 | "IPY_MODEL_ac4ed071c177445fa7342281ae2d2718",
2304 | "IPY_MODEL_885b919e1f9e410693291d5575f7f4ed",
2305 | "IPY_MODEL_20bf4656b0aa49df85a2b5dc743f8b10"
2306 | ],
2307 | "layout": "IPY_MODEL_e2cd392332aa4772bf972d95d377be1f"
2308 | }
2309 | },
2310 | "9f71abcacd154557a7f6a7b34676978f": {
2311 | "model_module": "@jupyter-widgets/controls",
2312 | "model_module_version": "1.5.0",
2313 | "model_name": "HBoxModel",
2314 | "state": {
2315 | "_dom_classes": [],
2316 | "_model_module": "@jupyter-widgets/controls",
2317 | "_model_module_version": "1.5.0",
2318 | "_model_name": "HBoxModel",
2319 | "_view_count": null,
2320 | "_view_module": "@jupyter-widgets/controls",
2321 | "_view_module_version": "1.5.0",
2322 | "_view_name": "HBoxView",
2323 | "box_style": "",
2324 | "children": [
2325 | "IPY_MODEL_e8da003fcd7342d382c6faddb28af484",
2326 | "IPY_MODEL_db8ff08397c343ee8ae7a1863655175b",
2327 | "IPY_MODEL_6f234194b2f744c6b9895b37625526bc"
2328 | ],
2329 | "layout": "IPY_MODEL_1714271f35c1451186d668bc136fdb75"
2330 | }
2331 | },
2332 | "a0473c41a5ee4be1940d21f3e6287c4f": {
2333 | "model_module": "@jupyter-widgets/controls",
2334 | "model_module_version": "1.5.0",
2335 | "model_name": "HTMLModel",
2336 | "state": {
2337 | "_dom_classes": [],
2338 | "_model_module": "@jupyter-widgets/controls",
2339 | "_model_module_version": "1.5.0",
2340 | "_model_name": "HTMLModel",
2341 | "_view_count": null,
2342 | "_view_module": "@jupyter-widgets/controls",
2343 | "_view_module_version": "1.5.0",
2344 | "_view_name": "HTMLView",
2345 | "description": "",
2346 | "description_tooltip": null,
2347 | "layout": "IPY_MODEL_26f392b41d404db282b44b3a52bf8b3c",
2348 | "placeholder": "",
2349 | "style": "IPY_MODEL_ee23b33158544ec9b901fc93c0d9cd94",
2350 | "value": "merges.txt: "
2351 | }
2352 | },
2353 | "a2a6e91f8e754eeb85b9997b9e7a454a": {
2354 | "model_module": "@jupyter-widgets/base",
2355 | "model_module_version": "1.2.0",
2356 | "model_name": "LayoutModel",
2357 | "state": {
2358 | "_model_module": "@jupyter-widgets/base",
2359 | "_model_module_version": "1.2.0",
2360 | "_model_name": "LayoutModel",
2361 | "_view_count": null,
2362 | "_view_module": "@jupyter-widgets/base",
2363 | "_view_module_version": "1.2.0",
2364 | "_view_name": "LayoutView",
2365 | "align_content": null,
2366 | "align_items": null,
2367 | "align_self": null,
2368 | "border": null,
2369 | "bottom": null,
2370 | "display": null,
2371 | "flex": null,
2372 | "flex_flow": null,
2373 | "grid_area": null,
2374 | "grid_auto_columns": null,
2375 | "grid_auto_flow": null,
2376 | "grid_auto_rows": null,
2377 | "grid_column": null,
2378 | "grid_gap": null,
2379 | "grid_row": null,
2380 | "grid_template_areas": null,
2381 | "grid_template_columns": null,
2382 | "grid_template_rows": null,
2383 | "height": null,
2384 | "justify_content": null,
2385 | "justify_items": null,
2386 | "left": null,
2387 | "margin": null,
2388 | "max_height": null,
2389 | "max_width": null,
2390 | "min_height": null,
2391 | "min_width": null,
2392 | "object_fit": null,
2393 | "object_position": null,
2394 | "order": null,
2395 | "overflow": null,
2396 | "overflow_x": null,
2397 | "overflow_y": null,
2398 | "padding": null,
2399 | "right": null,
2400 | "top": null,
2401 | "visibility": null,
2402 | "width": null
2403 | }
2404 | },
2405 | "ac4ed071c177445fa7342281ae2d2718": {
2406 | "model_module": "@jupyter-widgets/controls",
2407 | "model_module_version": "1.5.0",
2408 | "model_name": "HTMLModel",
2409 | "state": {
2410 | "_dom_classes": [],
2411 | "_model_module": "@jupyter-widgets/controls",
2412 | "_model_module_version": "1.5.0",
2413 | "_model_name": "HTMLModel",
2414 | "_view_count": null,
2415 | "_view_module": "@jupyter-widgets/controls",
2416 | "_view_module_version": "1.5.0",
2417 | "_view_name": "HTMLView",
2418 | "description": "",
2419 | "description_tooltip": null,
2420 | "layout": "IPY_MODEL_7aff1a40c9f943b18cf5f474fb54cf0e",
2421 | "placeholder": "",
2422 | "style": "IPY_MODEL_155d93fd988340e3842d5a2939d4f0a7",
2423 | "value": "generation_config.json: 100%"
2424 | }
2425 | },
2426 | "aef802c8c44843acb7df00f1ae75cde4": {
2427 | "model_module": "@jupyter-widgets/controls",
2428 | "model_module_version": "1.5.0",
2429 | "model_name": "DescriptionStyleModel",
2430 | "state": {
2431 | "_model_module": "@jupyter-widgets/controls",
2432 | "_model_module_version": "1.5.0",
2433 | "_model_name": "DescriptionStyleModel",
2434 | "_view_count": null,
2435 | "_view_module": "@jupyter-widgets/base",
2436 | "_view_module_version": "1.2.0",
2437 | "_view_name": "StyleView",
2438 | "description_width": ""
2439 | }
2440 | },
2441 | "b89ecb8a8a144723a4fe528ff04fba78": {
2442 | "model_module": "@jupyter-widgets/controls",
2443 | "model_module_version": "1.5.0",
2444 | "model_name": "FloatProgressModel",
2445 | "state": {
2446 | "_dom_classes": [],
2447 | "_model_module": "@jupyter-widgets/controls",
2448 | "_model_module_version": "1.5.0",
2449 | "_model_name": "FloatProgressModel",
2450 | "_view_count": null,
2451 | "_view_module": "@jupyter-widgets/controls",
2452 | "_view_module_version": "1.5.0",
2453 | "_view_name": "ProgressView",
2454 | "bar_style": "success",
2455 | "description": "",
2456 | "description_tooltip": null,
2457 | "layout": "IPY_MODEL_bc07491af94f45f9b398f841f3c3fc5a",
2458 | "max": 1,
2459 | "min": 0,
2460 | "orientation": "horizontal",
2461 | "style": "IPY_MODEL_c8d951f2a04340d8bf62e8ddca072a7f",
2462 | "value": 1
2463 | }
2464 | },
2465 | "bbac7d370e234af0b4cf20ace13e361c": {
2466 | "model_module": "@jupyter-widgets/base",
2467 | "model_module_version": "1.2.0",
2468 | "model_name": "LayoutModel",
2469 | "state": {
2470 | "_model_module": "@jupyter-widgets/base",
2471 | "_model_module_version": "1.2.0",
2472 | "_model_name": "LayoutModel",
2473 | "_view_count": null,
2474 | "_view_module": "@jupyter-widgets/base",
2475 | "_view_module_version": "1.2.0",
2476 | "_view_name": "LayoutView",
2477 | "align_content": null,
2478 | "align_items": null,
2479 | "align_self": null,
2480 | "border": null,
2481 | "bottom": null,
2482 | "display": null,
2483 | "flex": null,
2484 | "flex_flow": null,
2485 | "grid_area": null,
2486 | "grid_auto_columns": null,
2487 | "grid_auto_flow": null,
2488 | "grid_auto_rows": null,
2489 | "grid_column": null,
2490 | "grid_gap": null,
2491 | "grid_row": null,
2492 | "grid_template_areas": null,
2493 | "grid_template_columns": null,
2494 | "grid_template_rows": null,
2495 | "height": null,
2496 | "justify_content": null,
2497 | "justify_items": null,
2498 | "left": null,
2499 | "margin": null,
2500 | "max_height": null,
2501 | "max_width": null,
2502 | "min_height": null,
2503 | "min_width": null,
2504 | "object_fit": null,
2505 | "object_position": null,
2506 | "order": null,
2507 | "overflow": null,
2508 | "overflow_x": null,
2509 | "overflow_y": null,
2510 | "padding": null,
2511 | "right": null,
2512 | "top": null,
2513 | "visibility": null,
2514 | "width": null
2515 | }
2516 | },
2517 | "bc07491af94f45f9b398f841f3c3fc5a": {
2518 | "model_module": "@jupyter-widgets/base",
2519 | "model_module_version": "1.2.0",
2520 | "model_name": "LayoutModel",
2521 | "state": {
2522 | "_model_module": "@jupyter-widgets/base",
2523 | "_model_module_version": "1.2.0",
2524 | "_model_name": "LayoutModel",
2525 | "_view_count": null,
2526 | "_view_module": "@jupyter-widgets/base",
2527 | "_view_module_version": "1.2.0",
2528 | "_view_name": "LayoutView",
2529 | "align_content": null,
2530 | "align_items": null,
2531 | "align_self": null,
2532 | "border": null,
2533 | "bottom": null,
2534 | "display": null,
2535 | "flex": null,
2536 | "flex_flow": null,
2537 | "grid_area": null,
2538 | "grid_auto_columns": null,
2539 | "grid_auto_flow": null,
2540 | "grid_auto_rows": null,
2541 | "grid_column": null,
2542 | "grid_gap": null,
2543 | "grid_row": null,
2544 | "grid_template_areas": null,
2545 | "grid_template_columns": null,
2546 | "grid_template_rows": null,
2547 | "height": null,
2548 | "justify_content": null,
2549 | "justify_items": null,
2550 | "left": null,
2551 | "margin": null,
2552 | "max_height": null,
2553 | "max_width": null,
2554 | "min_height": null,
2555 | "min_width": null,
2556 | "object_fit": null,
2557 | "object_position": null,
2558 | "order": null,
2559 | "overflow": null,
2560 | "overflow_x": null,
2561 | "overflow_y": null,
2562 | "padding": null,
2563 | "right": null,
2564 | "top": null,
2565 | "visibility": null,
2566 | "width": "20px"
2567 | }
2568 | },
2569 | "c310ebc5e4e54a159cffccbcfdd9b727": {
2570 | "model_module": "@jupyter-widgets/base",
2571 | "model_module_version": "1.2.0",
2572 | "model_name": "LayoutModel",
2573 | "state": {
2574 | "_model_module": "@jupyter-widgets/base",
2575 | "_model_module_version": "1.2.0",
2576 | "_model_name": "LayoutModel",
2577 | "_view_count": null,
2578 | "_view_module": "@jupyter-widgets/base",
2579 | "_view_module_version": "1.2.0",
2580 | "_view_name": "LayoutView",
2581 | "align_content": null,
2582 | "align_items": null,
2583 | "align_self": null,
2584 | "border": null,
2585 | "bottom": null,
2586 | "display": null,
2587 | "flex": null,
2588 | "flex_flow": null,
2589 | "grid_area": null,
2590 | "grid_auto_columns": null,
2591 | "grid_auto_flow": null,
2592 | "grid_auto_rows": null,
2593 | "grid_column": null,
2594 | "grid_gap": null,
2595 | "grid_row": null,
2596 | "grid_template_areas": null,
2597 | "grid_template_columns": null,
2598 | "grid_template_rows": null,
2599 | "height": null,
2600 | "justify_content": null,
2601 | "justify_items": null,
2602 | "left": null,
2603 | "margin": null,
2604 | "max_height": null,
2605 | "max_width": null,
2606 | "min_height": null,
2607 | "min_width": null,
2608 | "object_fit": null,
2609 | "object_position": null,
2610 | "order": null,
2611 | "overflow": null,
2612 | "overflow_x": null,
2613 | "overflow_y": null,
2614 | "padding": null,
2615 | "right": null,
2616 | "top": null,
2617 | "visibility": null,
2618 | "width": "20px"
2619 | }
2620 | },
2621 | "c48b13fbc349441491130d591c02820a": {
2622 | "model_module": "@jupyter-widgets/controls",
2623 | "model_module_version": "1.5.0",
2624 | "model_name": "FloatProgressModel",
2625 | "state": {
2626 | "_dom_classes": [],
2627 | "_model_module": "@jupyter-widgets/controls",
2628 | "_model_module_version": "1.5.0",
2629 | "_model_name": "FloatProgressModel",
2630 | "_view_count": null,
2631 | "_view_module": "@jupyter-widgets/controls",
2632 | "_view_module_version": "1.5.0",
2633 | "_view_name": "ProgressView",
2634 | "bar_style": "success",
2635 | "description": "",
2636 | "description_tooltip": null,
2637 | "layout": "IPY_MODEL_13b7228aa5134ee4b0efd7fc2e9d7927",
2638 | "max": 1,
2639 | "min": 0,
2640 | "orientation": "horizontal",
2641 | "style": "IPY_MODEL_24cc5fd73b2e483ca3f2992414fc2ea0",
2642 | "value": 1
2643 | }
2644 | },
2645 | "c85c990c84064da5a4126893328a2805": {
2646 | "model_module": "@jupyter-widgets/base",
2647 | "model_module_version": "1.2.0",
2648 | "model_name": "LayoutModel",
2649 | "state": {
2650 | "_model_module": "@jupyter-widgets/base",
2651 | "_model_module_version": "1.2.0",
2652 | "_model_name": "LayoutModel",
2653 | "_view_count": null,
2654 | "_view_module": "@jupyter-widgets/base",
2655 | "_view_module_version": "1.2.0",
2656 | "_view_name": "LayoutView",
2657 | "align_content": null,
2658 | "align_items": null,
2659 | "align_self": null,
2660 | "border": null,
2661 | "bottom": null,
2662 | "display": null,
2663 | "flex": null,
2664 | "flex_flow": null,
2665 | "grid_area": null,
2666 | "grid_auto_columns": null,
2667 | "grid_auto_flow": null,
2668 | "grid_auto_rows": null,
2669 | "grid_column": null,
2670 | "grid_gap": null,
2671 | "grid_row": null,
2672 | "grid_template_areas": null,
2673 | "grid_template_columns": null,
2674 | "grid_template_rows": null,
2675 | "height": null,
2676 | "justify_content": null,
2677 | "justify_items": null,
2678 | "left": null,
2679 | "margin": null,
2680 | "max_height": null,
2681 | "max_width": null,
2682 | "min_height": null,
2683 | "min_width": null,
2684 | "object_fit": null,
2685 | "object_position": null,
2686 | "order": null,
2687 | "overflow": null,
2688 | "overflow_x": null,
2689 | "overflow_y": null,
2690 | "padding": null,
2691 | "right": null,
2692 | "top": null,
2693 | "visibility": null,
2694 | "width": null
2695 | }
2696 | },
2697 | "c8b622e02ce043c997b99632e7411d3d": {
2698 | "model_module": "@jupyter-widgets/controls",
2699 | "model_module_version": "1.5.0",
2700 | "model_name": "DescriptionStyleModel",
2701 | "state": {
2702 | "_model_module": "@jupyter-widgets/controls",
2703 | "_model_module_version": "1.5.0",
2704 | "_model_name": "DescriptionStyleModel",
2705 | "_view_count": null,
2706 | "_view_module": "@jupyter-widgets/base",
2707 | "_view_module_version": "1.2.0",
2708 | "_view_name": "StyleView",
2709 | "description_width": ""
2710 | }
2711 | },
2712 | "c8d951f2a04340d8bf62e8ddca072a7f": {
2713 | "model_module": "@jupyter-widgets/controls",
2714 | "model_module_version": "1.5.0",
2715 | "model_name": "ProgressStyleModel",
2716 | "state": {
2717 | "_model_module": "@jupyter-widgets/controls",
2718 | "_model_module_version": "1.5.0",
2719 | "_model_name": "ProgressStyleModel",
2720 | "_view_count": null,
2721 | "_view_module": "@jupyter-widgets/base",
2722 | "_view_module_version": "1.2.0",
2723 | "_view_name": "StyleView",
2724 | "bar_color": null,
2725 | "description_width": ""
2726 | }
2727 | },
2728 | "cb3d490817574d5ea1017a1fe20e60e0": {
2729 | "model_module": "@jupyter-widgets/controls",
2730 | "model_module_version": "1.5.0",
2731 | "model_name": "ProgressStyleModel",
2732 | "state": {
2733 | "_model_module": "@jupyter-widgets/controls",
2734 | "_model_module_version": "1.5.0",
2735 | "_model_name": "ProgressStyleModel",
2736 | "_view_count": null,
2737 | "_view_module": "@jupyter-widgets/base",
2738 | "_view_module_version": "1.2.0",
2739 | "_view_name": "StyleView",
2740 | "bar_color": null,
2741 | "description_width": ""
2742 | }
2743 | },
2744 | "cebf1c1226ff42128dbe5abfc3928214": {
2745 | "model_module": "@jupyter-widgets/controls",
2746 | "model_module_version": "1.5.0",
2747 | "model_name": "HTMLModel",
2748 | "state": {
2749 | "_dom_classes": [],
2750 | "_model_module": "@jupyter-widgets/controls",
2751 | "_model_module_version": "1.5.0",
2752 | "_model_name": "HTMLModel",
2753 | "_view_count": null,
2754 | "_view_module": "@jupyter-widgets/controls",
2755 | "_view_module_version": "1.5.0",
2756 | "_view_name": "HTMLView",
2757 | "description": "",
2758 | "description_tooltip": null,
2759 | "layout": "IPY_MODEL_3472426d6625433b9c470f500ef1ca74",
2760 | "placeholder": "",
2761 | "style": "IPY_MODEL_3344aea877d5458bb3fa445b3c79c795",
2762 | "value": "added_tokens.json: 100%"
2763 | }
2764 | },
2765 | "cfaa646376a64891aa43a7e3848c12fc": {
2766 | "model_module": "@jupyter-widgets/base",
2767 | "model_module_version": "1.2.0",
2768 | "model_name": "LayoutModel",
2769 | "state": {
2770 | "_model_module": "@jupyter-widgets/base",
2771 | "_model_module_version": "1.2.0",
2772 | "_model_name": "LayoutModel",
2773 | "_view_count": null,
2774 | "_view_module": "@jupyter-widgets/base",
2775 | "_view_module_version": "1.2.0",
2776 | "_view_name": "LayoutView",
2777 | "align_content": null,
2778 | "align_items": null,
2779 | "align_self": null,
2780 | "border": null,
2781 | "bottom": null,
2782 | "display": null,
2783 | "flex": null,
2784 | "flex_flow": null,
2785 | "grid_area": null,
2786 | "grid_auto_columns": null,
2787 | "grid_auto_flow": null,
2788 | "grid_auto_rows": null,
2789 | "grid_column": null,
2790 | "grid_gap": null,
2791 | "grid_row": null,
2792 | "grid_template_areas": null,
2793 | "grid_template_columns": null,
2794 | "grid_template_rows": null,
2795 | "height": null,
2796 | "justify_content": null,
2797 | "justify_items": null,
2798 | "left": null,
2799 | "margin": null,
2800 | "max_height": null,
2801 | "max_width": null,
2802 | "min_height": null,
2803 | "min_width": null,
2804 | "object_fit": null,
2805 | "object_position": null,
2806 | "order": null,
2807 | "overflow": null,
2808 | "overflow_x": null,
2809 | "overflow_y": null,
2810 | "padding": null,
2811 | "right": null,
2812 | "top": null,
2813 | "visibility": null,
2814 | "width": null
2815 | }
2816 | },
2817 | "d34cb5d22b5a466a9f46c0bc673f122d": {
2818 | "model_module": "@jupyter-widgets/controls",
2819 | "model_module_version": "1.5.0",
2820 | "model_name": "DescriptionStyleModel",
2821 | "state": {
2822 | "_model_module": "@jupyter-widgets/controls",
2823 | "_model_module_version": "1.5.0",
2824 | "_model_name": "DescriptionStyleModel",
2825 | "_view_count": null,
2826 | "_view_module": "@jupyter-widgets/base",
2827 | "_view_module_version": "1.2.0",
2828 | "_view_name": "StyleView",
2829 | "description_width": ""
2830 | }
2831 | },
2832 | "d7414d9c2c724e389772835304938f97": {
2833 | "model_module": "@jupyter-widgets/controls",
2834 | "model_module_version": "1.5.0",
2835 | "model_name": "DescriptionStyleModel",
2836 | "state": {
2837 | "_model_module": "@jupyter-widgets/controls",
2838 | "_model_module_version": "1.5.0",
2839 | "_model_name": "DescriptionStyleModel",
2840 | "_view_count": null,
2841 | "_view_module": "@jupyter-widgets/base",
2842 | "_view_module_version": "1.2.0",
2843 | "_view_name": "StyleView",
2844 | "description_width": ""
2845 | }
2846 | },
2847 | "db8ff08397c343ee8ae7a1863655175b": {
2848 | "model_module": "@jupyter-widgets/controls",
2849 | "model_module_version": "1.5.0",
2850 | "model_name": "FloatProgressModel",
2851 | "state": {
2852 | "_dom_classes": [],
2853 | "_model_module": "@jupyter-widgets/controls",
2854 | "_model_module_version": "1.5.0",
2855 | "_model_name": "FloatProgressModel",
2856 | "_view_count": null,
2857 | "_view_module": "@jupyter-widgets/controls",
2858 | "_view_module_version": "1.5.0",
2859 | "_view_name": "ProgressView",
2860 | "bar_style": "success",
2861 | "description": "",
2862 | "description_tooltip": null,
2863 | "layout": "IPY_MODEL_690d0fbf63b34557bb742f8745caf2bd",
2864 | "max": 572,
2865 | "min": 0,
2866 | "orientation": "horizontal",
2867 | "style": "IPY_MODEL_f5c6bb58779248b5a9caa906156e0cd9",
2868 | "value": 572
2869 | }
2870 | },
2871 | "dd432405c22a497e9c8c28793d89bfc8": {
2872 | "model_module": "@jupyter-widgets/controls",
2873 | "model_module_version": "1.5.0",
2874 | "model_name": "DescriptionStyleModel",
2875 | "state": {
2876 | "_model_module": "@jupyter-widgets/controls",
2877 | "_model_module_version": "1.5.0",
2878 | "_model_name": "DescriptionStyleModel",
2879 | "_view_count": null,
2880 | "_view_module": "@jupyter-widgets/base",
2881 | "_view_module_version": "1.2.0",
2882 | "_view_name": "StyleView",
2883 | "description_width": ""
2884 | }
2885 | },
2886 | "e2cd392332aa4772bf972d95d377be1f": {
2887 | "model_module": "@jupyter-widgets/base",
2888 | "model_module_version": "1.2.0",
2889 | "model_name": "LayoutModel",
2890 | "state": {
2891 | "_model_module": "@jupyter-widgets/base",
2892 | "_model_module_version": "1.2.0",
2893 | "_model_name": "LayoutModel",
2894 | "_view_count": null,
2895 | "_view_module": "@jupyter-widgets/base",
2896 | "_view_module_version": "1.2.0",
2897 | "_view_name": "LayoutView",
2898 | "align_content": null,
2899 | "align_items": null,
2900 | "align_self": null,
2901 | "border": null,
2902 | "bottom": null,
2903 | "display": null,
2904 | "flex": null,
2905 | "flex_flow": null,
2906 | "grid_area": null,
2907 | "grid_auto_columns": null,
2908 | "grid_auto_flow": null,
2909 | "grid_auto_rows": null,
2910 | "grid_column": null,
2911 | "grid_gap": null,
2912 | "grid_row": null,
2913 | "grid_template_areas": null,
2914 | "grid_template_columns": null,
2915 | "grid_template_rows": null,
2916 | "height": null,
2917 | "justify_content": null,
2918 | "justify_items": null,
2919 | "left": null,
2920 | "margin": null,
2921 | "max_height": null,
2922 | "max_width": null,
2923 | "min_height": null,
2924 | "min_width": null,
2925 | "object_fit": null,
2926 | "object_position": null,
2927 | "order": null,
2928 | "overflow": null,
2929 | "overflow_x": null,
2930 | "overflow_y": null,
2931 | "padding": null,
2932 | "right": null,
2933 | "top": null,
2934 | "visibility": null,
2935 | "width": null
2936 | }
2937 | },
2938 | "e4331b5ab5c547079e16d05b8992718b": {
2939 | "model_module": "@jupyter-widgets/base",
2940 | "model_module_version": "1.2.0",
2941 | "model_name": "LayoutModel",
2942 | "state": {
2943 | "_model_module": "@jupyter-widgets/base",
2944 | "_model_module_version": "1.2.0",
2945 | "_model_name": "LayoutModel",
2946 | "_view_count": null,
2947 | "_view_module": "@jupyter-widgets/base",
2948 | "_view_module_version": "1.2.0",
2949 | "_view_name": "LayoutView",
2950 | "align_content": null,
2951 | "align_items": null,
2952 | "align_self": null,
2953 | "border": null,
2954 | "bottom": null,
2955 | "display": null,
2956 | "flex": null,
2957 | "flex_flow": null,
2958 | "grid_area": null,
2959 | "grid_auto_columns": null,
2960 | "grid_auto_flow": null,
2961 | "grid_auto_rows": null,
2962 | "grid_column": null,
2963 | "grid_gap": null,
2964 | "grid_row": null,
2965 | "grid_template_areas": null,
2966 | "grid_template_columns": null,
2967 | "grid_template_rows": null,
2968 | "height": null,
2969 | "justify_content": null,
2970 | "justify_items": null,
2971 | "left": null,
2972 | "margin": null,
2973 | "max_height": null,
2974 | "max_width": null,
2975 | "min_height": null,
2976 | "min_width": null,
2977 | "object_fit": null,
2978 | "object_position": null,
2979 | "order": null,
2980 | "overflow": null,
2981 | "overflow_x": null,
2982 | "overflow_y": null,
2983 | "padding": null,
2984 | "right": null,
2985 | "top": null,
2986 | "visibility": null,
2987 | "width": null
2988 | }
2989 | },
2990 | "e544f1cb1428406b81cf89ab4d29c953": {
2991 | "model_module": "@jupyter-widgets/base",
2992 | "model_module_version": "1.2.0",
2993 | "model_name": "LayoutModel",
2994 | "state": {
2995 | "_model_module": "@jupyter-widgets/base",
2996 | "_model_module_version": "1.2.0",
2997 | "_model_name": "LayoutModel",
2998 | "_view_count": null,
2999 | "_view_module": "@jupyter-widgets/base",
3000 | "_view_module_version": "1.2.0",
3001 | "_view_name": "LayoutView",
3002 | "align_content": null,
3003 | "align_items": null,
3004 | "align_self": null,
3005 | "border": null,
3006 | "bottom": null,
3007 | "display": null,
3008 | "flex": null,
3009 | "flex_flow": null,
3010 | "grid_area": null,
3011 | "grid_auto_columns": null,
3012 | "grid_auto_flow": null,
3013 | "grid_auto_rows": null,
3014 | "grid_column": null,
3015 | "grid_gap": null,
3016 | "grid_row": null,
3017 | "grid_template_areas": null,
3018 | "grid_template_columns": null,
3019 | "grid_template_rows": null,
3020 | "height": null,
3021 | "justify_content": null,
3022 | "justify_items": null,
3023 | "left": null,
3024 | "margin": null,
3025 | "max_height": null,
3026 | "max_width": null,
3027 | "min_height": null,
3028 | "min_width": null,
3029 | "object_fit": null,
3030 | "object_position": null,
3031 | "order": null,
3032 | "overflow": null,
3033 | "overflow_x": null,
3034 | "overflow_y": null,
3035 | "padding": null,
3036 | "right": null,
3037 | "top": null,
3038 | "visibility": null,
3039 | "width": null
3040 | }
3041 | },
3042 | "e60c5d50578a48189b1970f5a7abf069": {
3043 | "model_module": "@jupyter-widgets/base",
3044 | "model_module_version": "1.2.0",
3045 | "model_name": "LayoutModel",
3046 | "state": {
3047 | "_model_module": "@jupyter-widgets/base",
3048 | "_model_module_version": "1.2.0",
3049 | "_model_name": "LayoutModel",
3050 | "_view_count": null,
3051 | "_view_module": "@jupyter-widgets/base",
3052 | "_view_module_version": "1.2.0",
3053 | "_view_name": "LayoutView",
3054 | "align_content": null,
3055 | "align_items": null,
3056 | "align_self": null,
3057 | "border": null,
3058 | "bottom": null,
3059 | "display": null,
3060 | "flex": null,
3061 | "flex_flow": null,
3062 | "grid_area": null,
3063 | "grid_auto_columns": null,
3064 | "grid_auto_flow": null,
3065 | "grid_auto_rows": null,
3066 | "grid_column": null,
3067 | "grid_gap": null,
3068 | "grid_row": null,
3069 | "grid_template_areas": null,
3070 | "grid_template_columns": null,
3071 | "grid_template_rows": null,
3072 | "height": null,
3073 | "justify_content": null,
3074 | "justify_items": null,
3075 | "left": null,
3076 | "margin": null,
3077 | "max_height": null,
3078 | "max_width": null,
3079 | "min_height": null,
3080 | "min_width": null,
3081 | "object_fit": null,
3082 | "object_position": null,
3083 | "order": null,
3084 | "overflow": null,
3085 | "overflow_x": null,
3086 | "overflow_y": null,
3087 | "padding": null,
3088 | "right": null,
3089 | "top": null,
3090 | "visibility": null,
3091 | "width": "20px"
3092 | }
3093 | },
3094 | "e749b795c4c5480eb378e05f2b2408c3": {
3095 | "model_module": "@jupyter-widgets/controls",
3096 | "model_module_version": "1.5.0",
3097 | "model_name": "FloatProgressModel",
3098 | "state": {
3099 | "_dom_classes": [],
3100 | "_model_module": "@jupyter-widgets/controls",
3101 | "_model_module_version": "1.5.0",
3102 | "_model_name": "FloatProgressModel",
3103 | "_view_count": null,
3104 | "_view_module": "@jupyter-widgets/controls",
3105 | "_view_module_version": "1.5.0",
3106 | "_view_name": "ProgressView",
3107 | "bar_style": "success",
3108 | "description": "",
3109 | "description_tooltip": null,
3110 | "layout": "IPY_MODEL_e60c5d50578a48189b1970f5a7abf069",
3111 | "max": 1,
3112 | "min": 0,
3113 | "orientation": "horizontal",
3114 | "style": "IPY_MODEL_eca800b9be034f5285d0873ca23d3baf",
3115 | "value": 1
3116 | }
3117 | },
3118 | "e7b07b23703e46f4adc60a86d7eaa327": {
3119 | "model_module": "@jupyter-widgets/controls",
3120 | "model_module_version": "1.5.0",
3121 | "model_name": "FloatProgressModel",
3122 | "state": {
3123 | "_dom_classes": [],
3124 | "_model_module": "@jupyter-widgets/controls",
3125 | "_model_module_version": "1.5.0",
3126 | "_model_name": "FloatProgressModel",
3127 | "_view_count": null,
3128 | "_view_module": "@jupyter-widgets/controls",
3129 | "_view_module_version": "1.5.0",
3130 | "_view_name": "ProgressView",
3131 | "bar_style": "success",
3132 | "description": "",
3133 | "description_tooltip": null,
3134 | "layout": "IPY_MODEL_e4331b5ab5c547079e16d05b8992718b",
3135 | "max": 408,
3136 | "min": 0,
3137 | "orientation": "horizontal",
3138 | "style": "IPY_MODEL_922cce75a65b424eb7a251659657757d",
3139 | "value": 408
3140 | }
3141 | },
3142 | "e8cc4aace30a463faad2dfe6342a2821": {
3143 | "model_module": "@jupyter-widgets/controls",
3144 | "model_module_version": "1.5.0",
3145 | "model_name": "HTMLModel",
3146 | "state": {
3147 | "_dom_classes": [],
3148 | "_model_module": "@jupyter-widgets/controls",
3149 | "_model_module_version": "1.5.0",
3150 | "_model_name": "HTMLModel",
3151 | "_view_count": null,
3152 | "_view_module": "@jupyter-widgets/controls",
3153 | "_view_module_version": "1.5.0",
3154 | "_view_name": "HTMLView",
3155 | "description": "",
3156 | "description_tooltip": null,
3157 | "layout": "IPY_MODEL_e544f1cb1428406b81cf89ab4d29c953",
3158 | "placeholder": "",
3159 | "style": "IPY_MODEL_14120640e617483f80c34982da8e5391",
3160 | "value": "chat_template.json: "
3161 | }
3162 | },
3163 | "e8da003fcd7342d382c6faddb28af484": {
3164 | "model_module": "@jupyter-widgets/controls",
3165 | "model_module_version": "1.5.0",
3166 | "model_name": "HTMLModel",
3167 | "state": {
3168 | "_dom_classes": [],
3169 | "_model_module": "@jupyter-widgets/controls",
3170 | "_model_module_version": "1.5.0",
3171 | "_model_name": "HTMLModel",
3172 | "_view_count": null,
3173 | "_view_module": "@jupyter-widgets/controls",
3174 | "_view_module_version": "1.5.0",
3175 | "_view_name": "HTMLView",
3176 | "description": "",
3177 | "description_tooltip": null,
3178 | "layout": "IPY_MODEL_7b3ca20c348d4fe3bf88d0bd1adbdc2f",
3179 | "placeholder": "",
3180 | "style": "IPY_MODEL_dd432405c22a497e9c8c28793d89bfc8",
3181 | "value": "preprocessor_config.json: 100%"
3182 | }
3183 | },
3184 | "ec6acd940e154ec4b4314aeaab783ea2": {
3185 | "model_module": "@jupyter-widgets/controls",
3186 | "model_module_version": "1.5.0",
3187 | "model_name": "ProgressStyleModel",
3188 | "state": {
3189 | "_model_module": "@jupyter-widgets/controls",
3190 | "_model_module_version": "1.5.0",
3191 | "_model_name": "ProgressStyleModel",
3192 | "_view_count": null,
3193 | "_view_module": "@jupyter-widgets/base",
3194 | "_view_module_version": "1.2.0",
3195 | "_view_name": "StyleView",
3196 | "bar_color": null,
3197 | "description_width": ""
3198 | }
3199 | },
3200 | "eca800b9be034f5285d0873ca23d3baf": {
3201 | "model_module": "@jupyter-widgets/controls",
3202 | "model_module_version": "1.5.0",
3203 | "model_name": "ProgressStyleModel",
3204 | "state": {
3205 | "_model_module": "@jupyter-widgets/controls",
3206 | "_model_module_version": "1.5.0",
3207 | "_model_name": "ProgressStyleModel",
3208 | "_view_count": null,
3209 | "_view_module": "@jupyter-widgets/base",
3210 | "_view_module_version": "1.2.0",
3211 | "_view_name": "StyleView",
3212 | "bar_color": null,
3213 | "description_width": ""
3214 | }
3215 | },
3216 | "ee23b33158544ec9b901fc93c0d9cd94": {
3217 | "model_module": "@jupyter-widgets/controls",
3218 | "model_module_version": "1.5.0",
3219 | "model_name": "DescriptionStyleModel",
3220 | "state": {
3221 | "_model_module": "@jupyter-widgets/controls",
3222 | "_model_module_version": "1.5.0",
3223 | "_model_name": "DescriptionStyleModel",
3224 | "_view_count": null,
3225 | "_view_module": "@jupyter-widgets/base",
3226 | "_view_module_version": "1.2.0",
3227 | "_view_name": "StyleView",
3228 | "description_width": ""
3229 | }
3230 | },
3231 | "f02993bce0b44cbb8f04451e8eb80c52": {
3232 | "model_module": "@jupyter-widgets/controls",
3233 | "model_module_version": "1.5.0",
3234 | "model_name": "HBoxModel",
3235 | "state": {
3236 | "_dom_classes": [],
3237 | "_model_module": "@jupyter-widgets/controls",
3238 | "_model_module_version": "1.5.0",
3239 | "_model_name": "HBoxModel",
3240 | "_view_count": null,
3241 | "_view_module": "@jupyter-widgets/controls",
3242 | "_view_module_version": "1.5.0",
3243 | "_view_name": "HBoxView",
3244 | "box_style": "",
3245 | "children": [
3246 | "IPY_MODEL_14fda8541b1c4c0e84b27253f40a4144",
3247 | "IPY_MODEL_c48b13fbc349441491130d591c02820a",
3248 | "IPY_MODEL_1b4e0053f73a4dc8956fd70261050031"
3249 | ],
3250 | "layout": "IPY_MODEL_0834cba909674903b340ead5d03d8ee7"
3251 | }
3252 | },
3253 | "f0d0db32a8074f47868eefecb6c24b4e": {
3254 | "model_module": "@jupyter-widgets/base",
3255 | "model_module_version": "1.2.0",
3256 | "model_name": "LayoutModel",
3257 | "state": {
3258 | "_model_module": "@jupyter-widgets/base",
3259 | "_model_module_version": "1.2.0",
3260 | "_model_name": "LayoutModel",
3261 | "_view_count": null,
3262 | "_view_module": "@jupyter-widgets/base",
3263 | "_view_module_version": "1.2.0",
3264 | "_view_name": "LayoutView",
3265 | "align_content": null,
3266 | "align_items": null,
3267 | "align_self": null,
3268 | "border": null,
3269 | "bottom": null,
3270 | "display": null,
3271 | "flex": null,
3272 | "flex_flow": null,
3273 | "grid_area": null,
3274 | "grid_auto_columns": null,
3275 | "grid_auto_flow": null,
3276 | "grid_auto_rows": null,
3277 | "grid_column": null,
3278 | "grid_gap": null,
3279 | "grid_row": null,
3280 | "grid_template_areas": null,
3281 | "grid_template_columns": null,
3282 | "grid_template_rows": null,
3283 | "height": null,
3284 | "justify_content": null,
3285 | "justify_items": null,
3286 | "left": null,
3287 | "margin": null,
3288 | "max_height": null,
3289 | "max_width": null,
3290 | "min_height": null,
3291 | "min_width": null,
3292 | "object_fit": null,
3293 | "object_position": null,
3294 | "order": null,
3295 | "overflow": null,
3296 | "overflow_x": null,
3297 | "overflow_y": null,
3298 | "padding": null,
3299 | "right": null,
3300 | "top": null,
3301 | "visibility": null,
3302 | "width": null
3303 | }
3304 | },
3305 | "f2f97d1c2d354db5befe512d80f9853e": {
3306 | "model_module": "@jupyter-widgets/base",
3307 | "model_module_version": "1.2.0",
3308 | "model_name": "LayoutModel",
3309 | "state": {
3310 | "_model_module": "@jupyter-widgets/base",
3311 | "_model_module_version": "1.2.0",
3312 | "_model_name": "LayoutModel",
3313 | "_view_count": null,
3314 | "_view_module": "@jupyter-widgets/base",
3315 | "_view_module_version": "1.2.0",
3316 | "_view_name": "LayoutView",
3317 | "align_content": null,
3318 | "align_items": null,
3319 | "align_self": null,
3320 | "border": null,
3321 | "bottom": null,
3322 | "display": null,
3323 | "flex": null,
3324 | "flex_flow": null,
3325 | "grid_area": null,
3326 | "grid_auto_columns": null,
3327 | "grid_auto_flow": null,
3328 | "grid_auto_rows": null,
3329 | "grid_column": null,
3330 | "grid_gap": null,
3331 | "grid_row": null,
3332 | "grid_template_areas": null,
3333 | "grid_template_columns": null,
3334 | "grid_template_rows": null,
3335 | "height": null,
3336 | "justify_content": null,
3337 | "justify_items": null,
3338 | "left": null,
3339 | "margin": null,
3340 | "max_height": null,
3341 | "max_width": null,
3342 | "min_height": null,
3343 | "min_width": null,
3344 | "object_fit": null,
3345 | "object_position": null,
3346 | "order": null,
3347 | "overflow": null,
3348 | "overflow_x": null,
3349 | "overflow_y": null,
3350 | "padding": null,
3351 | "right": null,
3352 | "top": null,
3353 | "visibility": null,
3354 | "width": null
3355 | }
3356 | },
3357 | "f33523339ad44ee18ae542a99ba8d2e4": {
3358 | "model_module": "@jupyter-widgets/base",
3359 | "model_module_version": "1.2.0",
3360 | "model_name": "LayoutModel",
3361 | "state": {
3362 | "_model_module": "@jupyter-widgets/base",
3363 | "_model_module_version": "1.2.0",
3364 | "_model_name": "LayoutModel",
3365 | "_view_count": null,
3366 | "_view_module": "@jupyter-widgets/base",
3367 | "_view_module_version": "1.2.0",
3368 | "_view_name": "LayoutView",
3369 | "align_content": null,
3370 | "align_items": null,
3371 | "align_self": null,
3372 | "border": null,
3373 | "bottom": null,
3374 | "display": null,
3375 | "flex": null,
3376 | "flex_flow": null,
3377 | "grid_area": null,
3378 | "grid_auto_columns": null,
3379 | "grid_auto_flow": null,
3380 | "grid_auto_rows": null,
3381 | "grid_column": null,
3382 | "grid_gap": null,
3383 | "grid_row": null,
3384 | "grid_template_areas": null,
3385 | "grid_template_columns": null,
3386 | "grid_template_rows": null,
3387 | "height": null,
3388 | "justify_content": null,
3389 | "justify_items": null,
3390 | "left": null,
3391 | "margin": null,
3392 | "max_height": null,
3393 | "max_width": null,
3394 | "min_height": null,
3395 | "min_width": null,
3396 | "object_fit": null,
3397 | "object_position": null,
3398 | "order": null,
3399 | "overflow": null,
3400 | "overflow_x": null,
3401 | "overflow_y": null,
3402 | "padding": null,
3403 | "right": null,
3404 | "top": null,
3405 | "visibility": null,
3406 | "width": null
3407 | }
3408 | },
3409 | "f4966c179fae4b1e91d260494a05a5f7": {
3410 | "model_module": "@jupyter-widgets/controls",
3411 | "model_module_version": "1.5.0",
3412 | "model_name": "ProgressStyleModel",
3413 | "state": {
3414 | "_model_module": "@jupyter-widgets/controls",
3415 | "_model_module_version": "1.5.0",
3416 | "_model_name": "ProgressStyleModel",
3417 | "_view_count": null,
3418 | "_view_module": "@jupyter-widgets/base",
3419 | "_view_module_version": "1.2.0",
3420 | "_view_name": "StyleView",
3421 | "bar_color": null,
3422 | "description_width": ""
3423 | }
3424 | },
3425 | "f5c6bb58779248b5a9caa906156e0cd9": {
3426 | "model_module": "@jupyter-widgets/controls",
3427 | "model_module_version": "1.5.0",
3428 | "model_name": "ProgressStyleModel",
3429 | "state": {
3430 | "_model_module": "@jupyter-widgets/controls",
3431 | "_model_module_version": "1.5.0",
3432 | "_model_name": "ProgressStyleModel",
3433 | "_view_count": null,
3434 | "_view_module": "@jupyter-widgets/base",
3435 | "_view_module_version": "1.2.0",
3436 | "_view_name": "StyleView",
3437 | "bar_color": null,
3438 | "description_width": ""
3439 | }
3440 | },
3441 | "f69d8e8a4e174b7382610cf3c497bb7b": {
3442 | "model_module": "@jupyter-widgets/base",
3443 | "model_module_version": "1.2.0",
3444 | "model_name": "LayoutModel",
3445 | "state": {
3446 | "_model_module": "@jupyter-widgets/base",
3447 | "_model_module_version": "1.2.0",
3448 | "_model_name": "LayoutModel",
3449 | "_view_count": null,
3450 | "_view_module": "@jupyter-widgets/base",
3451 | "_view_module_version": "1.2.0",
3452 | "_view_name": "LayoutView",
3453 | "align_content": null,
3454 | "align_items": null,
3455 | "align_self": null,
3456 | "border": null,
3457 | "bottom": null,
3458 | "display": null,
3459 | "flex": null,
3460 | "flex_flow": null,
3461 | "grid_area": null,
3462 | "grid_auto_columns": null,
3463 | "grid_auto_flow": null,
3464 | "grid_auto_rows": null,
3465 | "grid_column": null,
3466 | "grid_gap": null,
3467 | "grid_row": null,
3468 | "grid_template_areas": null,
3469 | "grid_template_columns": null,
3470 | "grid_template_rows": null,
3471 | "height": null,
3472 | "justify_content": null,
3473 | "justify_items": null,
3474 | "left": null,
3475 | "margin": null,
3476 | "max_height": null,
3477 | "max_width": null,
3478 | "min_height": null,
3479 | "min_width": null,
3480 | "object_fit": null,
3481 | "object_position": null,
3482 | "order": null,
3483 | "overflow": null,
3484 | "overflow_x": null,
3485 | "overflow_y": null,
3486 | "padding": null,
3487 | "right": null,
3488 | "top": null,
3489 | "visibility": null,
3490 | "width": null
3491 | }
3492 | },
3493 | "fa8edcae23db448eb70e14726b650667": {
3494 | "model_module": "@jupyter-widgets/base",
3495 | "model_module_version": "1.2.0",
3496 | "model_name": "LayoutModel",
3497 | "state": {
3498 | "_model_module": "@jupyter-widgets/base",
3499 | "_model_module_version": "1.2.0",
3500 | "_model_name": "LayoutModel",
3501 | "_view_count": null,
3502 | "_view_module": "@jupyter-widgets/base",
3503 | "_view_module_version": "1.2.0",
3504 | "_view_name": "LayoutView",
3505 | "align_content": null,
3506 | "align_items": null,
3507 | "align_self": null,
3508 | "border": null,
3509 | "bottom": null,
3510 | "display": null,
3511 | "flex": null,
3512 | "flex_flow": null,
3513 | "grid_area": null,
3514 | "grid_auto_columns": null,
3515 | "grid_auto_flow": null,
3516 | "grid_auto_rows": null,
3517 | "grid_column": null,
3518 | "grid_gap": null,
3519 | "grid_row": null,
3520 | "grid_template_areas": null,
3521 | "grid_template_columns": null,
3522 | "grid_template_rows": null,
3523 | "height": null,
3524 | "justify_content": null,
3525 | "justify_items": null,
3526 | "left": null,
3527 | "margin": null,
3528 | "max_height": null,
3529 | "max_width": null,
3530 | "min_height": null,
3531 | "min_width": null,
3532 | "object_fit": null,
3533 | "object_position": null,
3534 | "order": null,
3535 | "overflow": null,
3536 | "overflow_x": null,
3537 | "overflow_y": null,
3538 | "padding": null,
3539 | "right": null,
3540 | "top": null,
3541 | "visibility": null,
3542 | "width": null
3543 | }
3544 | },
3545 | "fbe2788824ea4de0b112d533c5e57c9d": {
3546 | "model_module": "@jupyter-widgets/controls",
3547 | "model_module_version": "1.5.0",
3548 | "model_name": "FloatProgressModel",
3549 | "state": {
3550 | "_dom_classes": [],
3551 | "_model_module": "@jupyter-widgets/controls",
3552 | "_model_module_version": "1.5.0",
3553 | "_model_name": "FloatProgressModel",
3554 | "_view_count": null,
3555 | "_view_module": "@jupyter-widgets/controls",
3556 | "_view_module_version": "1.5.0",
3557 | "_view_name": "ProgressView",
3558 | "bar_style": "success",
3559 | "description": "",
3560 | "description_tooltip": null,
3561 | "layout": "IPY_MODEL_92004181dd9e4e9083e03788dca31c10",
3562 | "max": 1,
3563 | "min": 0,
3564 | "orientation": "horizontal",
3565 | "style": "IPY_MODEL_ec6acd940e154ec4b4314aeaab783ea2",
3566 | "value": 1
3567 | }
3568 | }
3569 | }
3570 | }
3571 | },
3572 | "nbformat": 4,
3573 | "nbformat_minor": 0
3574 | }
3575 |
--------------------------------------------------------------------------------