{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "VFMCdVJIIraw" }, "source": [ "##### Copyright 2019 The TensorFlow Hub Authors.\n", "\n", "Licensed under the Apache License, Version 2.0 (the \"License\");" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "cellView": "code", "execution": { "iopub.execute_input": "2023-05-12T11:14:50.413527Z", "iopub.status.busy": "2023-05-12T11:14:50.413323Z", "iopub.status.idle": "2023-05-12T11:14:50.417041Z", "shell.execute_reply": "2023-05-12T11:14:50.416509Z" }, "id": "ZxMYj8OpIrCp" }, "outputs": [], "source": [ "# Copyright 2019 The TensorFlow Hub Authors. All Rights Reserved.\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# http://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "# ==============================================================================" ] }, { "cell_type": "markdown", "metadata": { "id": "0fO2R2BBKx3l" }, "source": [ "# Multilingual Universal Sentence Encoder Q&A Retrieval\n" ] }, { "cell_type": "markdown", "metadata": { "id": "MfBg1C5NB3X0" }, "source": [ "\n", " \n", " \n", " \n", " \n", " \n", "
\n", " View on TensorFlow.org\n", " \n", " Run in Google Colab\n", " \n", " View on GitHub\n", " \n", " Download notebook\n", " \n", " See TF Hub models\n", "
" ] }, { "cell_type": "markdown", "metadata": { "id": "zsDm_WgMNlJQ" }, "source": [ "This is a demo for using [Universal Encoder Multilingual Q&A model](https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3) for question-answer retrieval of text, illustrating the use of **question_encoder** and **response_encoder** of the model. We use sentences from [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/) paragraphs as the demo dataset, each sentence and its context (the text surrounding the sentence) is encoded into high dimension embeddings with the **response_encoder**. These embeddings are stored in an index built using the [simpleneighbors](https://pypi.org/project/simpleneighbors/) library for question-answer retrieval.\n", "\n", "On retrieval a random question is selected from the [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/) dataset and encoded into high dimension embedding with the **question_encoder** and query the simpleneighbors index returning a list of approximate nearest neighbors in semantic space." ] }, { "cell_type": "markdown", "metadata": { "id": "U0eOW2LTWiLg" }, "source": [ "### More models\n", "You can find all currently hosted text embedding models [here](https://tfhub.dev/s?module-type=text-embedding) and all models that have been trained on SQuAD as well [here](https://tfhub.dev/s?dataset=squad)." ] }, { "cell_type": "markdown", "metadata": { "id": "ORy-KvWXGXBo" }, "source": [ "## Setup\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "cellView": "both", "execution": { "iopub.execute_input": "2023-05-12T11:14:50.420306Z", "iopub.status.busy": "2023-05-12T11:14:50.420103Z", "iopub.status.idle": "2023-05-12T11:15:32.392092Z", "shell.execute_reply": "2023-05-12T11:15:32.391141Z" }, "id": "x00t_uJCEbeb" }, "outputs": [], "source": [ "%%capture\n", "#@title Setup Environment\n", "# Install the latest Tensorflow version.\n", "!pip install -q \"tensorflow-text==2.11.*\"\n", "!pip install -q simpleneighbors[annoy]\n", "!pip install -q nltk\n", "!pip install -q tqdm" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "cellView": "form", "execution": { "iopub.execute_input": "2023-05-12T11:15:32.396824Z", "iopub.status.busy": "2023-05-12T11:15:32.396183Z", "iopub.status.idle": "2023-05-12T11:15:35.306456Z", "shell.execute_reply": "2023-05-12T11:15:35.305765Z" }, "id": "DmeFAuVsyWxg" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2023-05-12 11:15:33.919976: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n", "2023-05-12 11:15:33.920079: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n", "2023-05-12 11:15:33.920089: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[nltk_data] Downloading package punkt to /home/kbuilder/nltk_data...\n", "[nltk_data] Unzipping tokenizers/punkt.zip.\n" ] } ], "source": [ "#@title Setup common imports and functions\n", "import json\n", "import nltk\n", "import os\n", "import pprint\n", "import random\n", "import simpleneighbors\n", "import urllib\n", "from IPython.display import HTML, display\n", "from tqdm.notebook import tqdm\n", "\n", "import tensorflow.compat.v2 as tf\n", "import tensorflow_hub as hub\n", "from tensorflow_text import SentencepieceTokenizer\n", "\n", "nltk.download('punkt')\n", "\n", "\n", "def download_squad(url):\n", " return json.load(urllib.request.urlopen(url))\n", "\n", "def extract_sentences_from_squad_json(squad):\n", " all_sentences = []\n", " for data in squad['data']:\n", " for paragraph in data['paragraphs']:\n", " sentences = nltk.tokenize.sent_tokenize(paragraph['context'])\n", " all_sentences.extend(zip(sentences, [paragraph['context']] * len(sentences)))\n", " return list(set(all_sentences)) # remove duplicates\n", "\n", "def extract_questions_from_squad_json(squad):\n", " questions = []\n", " for data in squad['data']:\n", " for paragraph in data['paragraphs']:\n", " for qas in paragraph['qas']:\n", " if qas['answers']:\n", " questions.append((qas['question'], qas['answers'][0]['text']))\n", " return list(set(questions))\n", "\n", "def output_with_highlight(text, highlight):\n", " output = \"
  • \"\n", " i = text.find(highlight)\n", " while True:\n", " if i == -1:\n", " output += text\n", " break\n", " output += text[0:i]\n", " output += ''+text[i:i+len(highlight)]+''\n", " text = text[i+len(highlight):]\n", " i = text.find(highlight)\n", " return output + \"
  • \\n\"\n", "\n", "def display_nearest_neighbors(query_text, answer_text=None):\n", " query_embedding = model.signatures['question_encoder'](tf.constant([query_text]))['outputs'][0]\n", " search_results = index.nearest(query_embedding, n=num_results)\n", "\n", " if answer_text:\n", " result_md = '''\n", "

    Random Question from SQuAD:

    \n", "

      %s

    \n", "

    Answer:

    \n", "

      %s

    \n", " ''' % (query_text , answer_text)\n", " else:\n", " result_md = '''\n", "

    Question:

    \n", "

      %s

    \n", " ''' % query_text\n", "\n", " result_md += '''\n", "

    Retrieved sentences :\n", "

      \n", " '''\n", "\n", " if answer_text:\n", " for s in search_results:\n", " result_md += output_with_highlight(s, answer_text)\n", " else:\n", " for s in search_results:\n", " result_md += '
    1. ' + s + '
    2. \\n'\n", "\n", " result_md += \"
    \"\n", " display(HTML(result_md))" ] }, { "cell_type": "markdown", "metadata": { "id": "1kbkT8i3FL_C" }, "source": [ "Run the following code block to download and extract the SQuAD dataset into:\n", "\n", "* **sentences** is a list of (text, context) tuples - each paragraph from the SQuAD dataset are split into sentences using nltk library and the sentence and paragraph text forms the (text, context) tuple.\n", "* **questions** is a list of (question, answer) tuples.\n", "\n", "Note: You can use this demo to index the SQuAD train dataset or the smaller dev dataset (1.1 or 2.0) by selecting the **squad_url** below.\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "cellView": "both", "execution": { "iopub.execute_input": "2023-05-12T11:15:35.310563Z", "iopub.status.busy": "2023-05-12T11:15:35.310161Z", "iopub.status.idle": "2023-05-12T11:15:35.942766Z", "shell.execute_reply": "2023-05-12T11:15:35.942109Z" }, "id": "iYqV2GAty_Eh" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10455 sentences, 10552 questions extracted from SQuAD https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json\n", "\n", "Example sentence and context:\n", "\n", "sentence:\n", "\n", "('In the United States, scholars argue that there already existed a negotiated '\n", " 'settlement based on equality between both parties prior to 1973.')\n", "\n", "context:\n", "\n", "('In the United States, scholars argue that there already existed a negotiated '\n", " 'settlement based on equality between both parties prior to 1973. The '\n", " 'possibility that the Middle East could become another superpower '\n", " 'confrontation with the USSR was of more concern to the US than oil. Further, '\n", " 'interest groups and government agencies more worried about energy were no '\n", " \"match for Kissinger's dominance. In the US production, distribution and \"\n", " 'price disruptions \"have been held responsible for recessions, periods of '\n", " 'excessive inflation, reduced productivity, and lower economic growth.\"')\n", "\n" ] } ], "source": [ "#@title Download and extract SQuAD data\n", "squad_url = 'https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json' #@param [\"https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v2.0.json\", \"https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v2.0.json\", \"https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v1.1.json\", \"https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json\"]\n", "\n", "squad_json = download_squad(squad_url)\n", "sentences = extract_sentences_from_squad_json(squad_json)\n", "questions = extract_questions_from_squad_json(squad_json)\n", "print(\"%s sentences, %s questions extracted from SQuAD %s\" % (len(sentences), len(questions), squad_url))\n", "\n", "print(\"\\nExample sentence and context:\\n\")\n", "sentence = random.choice(sentences)\n", "print(\"sentence:\\n\")\n", "pprint.pprint(sentence[0])\n", "print(\"\\ncontext:\\n\")\n", "pprint.pprint(sentence[1])\n", "print()" ] }, { "cell_type": "markdown", "metadata": { "id": "9x3u-2uSGbDf" }, "source": [ "The following code block setup the tensorflow graph **g** and **session** with the [Universal Encoder Multilingual Q&A model](https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3)'s **question_encoder** and **response_encoder** signatures." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "execution": { "iopub.execute_input": "2023-05-12T11:15:35.947662Z", "iopub.status.busy": "2023-05-12T11:15:35.947424Z", "iopub.status.idle": "2023-05-12T11:15:50.789485Z", "shell.execute_reply": "2023-05-12T11:15:50.788741Z" }, "id": "44I0uCRQRiFO" }, "outputs": [], "source": [ "#@title Load model from tensorflow hub\n", "module_url = \"https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3\" #@param [\"https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3\", \"https://tfhub.dev/google/universal-sentence-encoder-qa/3\"]\n", "model = hub.load(module_url)\n" ] }, { "cell_type": "markdown", "metadata": { "id": "SCQpDmTZG0O6" }, "source": [ "The following code block compute the embeddings for all the text, context tuples and store them in a [simpleneighbors](https://pypi.org/project/simpleneighbors/) index using the **response_encoder**.\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "execution": { "iopub.execute_input": "2023-05-12T11:15:50.793761Z", "iopub.status.busy": "2023-05-12T11:15:50.793512Z", "iopub.status.idle": "2023-05-12T11:51:51.540854Z", "shell.execute_reply": "2023-05-12T11:51:51.539960Z" }, "id": "FwDUryIfSLp2" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Computing embeddings for 10455 sentences\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "93bce13d65dd462aacfaea91004c1466", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/104 [00:00Random Question from SQuAD:

    \n", "

      Where was Shirey going to be when Fort Oswego was to be attacked?

    \n", "

    Answer:

    \n", "

      planned to attack Fort Niagara

    \n", " \n", "

    Retrieved sentences :\n", "

      \n", "
    1. The city was blockaded by Union forces, who gained control of the nearby Fort Clinch.
    2. \n", "
    3. He had primarily been concerned about the extended supply line to the forts on the Ohio, and had sent Baron Dieskau to lead the defenses at Frontenac against Shirley's expected attack.
    4. \n", "
    5. Building on Vaudreuil's work harassing the Oswego garrison, Montcalm executed a strategic feint by moving his headquarters to Ticonderoga, as if to presage another attack along Lake George.
    6. \n", "
    7. Scouts had reported the weakness of the British supply chain, so he ordered an attack against the forts Shirley had erected at the Oneida Carry.
    8. \n", "
    9. Shirley's efforts to fortify Oswego were bogged down in logistical difficulties, exacerbated by Shirley's inexperience in managing large expeditions.
    10. \n", "
    11. In a bid to gain Newcastle and the Tyne, Cromwell's allies, the Scots, captured the town of Newburn.
    12. \n", "
    13. Menendez proceeded to massacre the defenseless Huguenots, after which he wiped out the Fort Caroline garrison.
    14. \n", "
    15. Faced with this strength, Loudoun returned to New York amid news that a massacre had occurred at Fort William Henry.
    16. \n", "
    17. They escorted Luther to the security of the Wartburg Castle at Eisenach.
    18. \n", "
    19. With Abercrombie pinned down at Albany, Montcalm slipped away and led the successful attack on Oswego in August.
    20. \n", "
    21. Union forces then retreated to Jacksonville and held the city for the remainder of the war.
    22. \n", "
    23. In 1644 the Scots then captured the reinforced fortification on the Lawe in South Shields following a siege.
    24. \n", "
    25. Immediately before the battle, the Venetian fleet had secured a victory in the coast surrounding the city.
    26. \n", "
    27. In addition to renewing the efforts to capture Niagara, Crown Point and Duquesne, he proposed attacks on Fort Frontenac on the north shore of Lake Ontario and an expedition through the wilderness of the Maine district and down the Chaudière River to attack the city of Quebec.
    28. \n", "
    29. When Johnson was seen as the larger threat, Vaudreuil sent Dieskau to Fort St. Frédéric to meet that threat.
    30. \n", "
    31. The southern branch still remained in Quzhou where they lived to this day.
    32. \n", "
    33. Warfare and the long occupation left the city disrupted after the war.
    34. \n", "
    35. While en route, Washington learned of Trent's retreat.
    36. \n", "
    37. On December 12, Washington and his men reached Fort Le Boeuf.
    38. \n", "
    39. The Warsaw Citadel, an impressive 19th-century fortification built after the defeat of the November Uprising, was a place of martyr for the Poles.
    40. \n", "
    41. His orders were to protect the King's land in the Ohio Valley from the British.
    42. \n", "
    43. Traveling to Fort Le Boeuf, he threatened the French with military action, which Marin contemptuously dismissed.
    44. \n", "
    45. In March 1864 a Confederate cavalry confronted a Union expedition resulting in the Battle of Cedar Creek.
    46. \n", "
    47. In the course of the Polish-Bolshevik War of 1920, the huge Battle of Warsaw was fought on the eastern outskirts of the city in which the capital was successfully defended and the Red Army defeated.
    48. \n", "
    49. After the successful Siege of Antioch in 1097, Bohemond began carving out an independent principality around that city.
    50. \n", "
    " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#@title Retrieve nearest neighbors for a random question from SQuAD\n", "num_results = 25 #@param {type:\"slider\", min:5, max:40, step:1}\n", "\n", "query = random.choice(questions)\n", "display_nearest_neighbors(query[0], query[1])" ] } ], "metadata": { "accelerator": "GPU", "colab": { "collapsed_sections": [ "VFMCdVJIIraw" ], "name": "Universal Encoder Q&A Model Retrieval Demo", "private_outputs": true, "provenance": [], "toc_visible": true }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "0a405d490e444b30b594327fffc7bdf9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_12535d502a6247908fc4db07bc72559f", "placeholder": "​", "style": "IPY_MODEL_8fd1a850c421452b8fd92aaaa217d161", "tabbable": null, "tooltip": null, "value": "100%" } }, "12535d502a6247908fc4db07bc72559f": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "47d012abd87d4c12b5b9710ec150af35": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "4da19fffd10d4ca1b96b974c90d4924b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "6664f9d0b3de4aaaba358f64d41c55b7": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "82df8d0fbad34bc297d8a3a001d14db6": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "87ec76f6c7e248f8908df678515a3a41": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_ba89321a7d3743d4b6e1e7b72a3df4ac", "placeholder": "​", "style": "IPY_MODEL_4da19fffd10d4ca1b96b974c90d4924b", "tabbable": null, "tooltip": null, "value": " 104/104 [35:58<00:00, 20.81s/it]" } }, "8a14519b702a4a31aa82d1b651035ef0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_6664f9d0b3de4aaaba358f64d41c55b7", "max": 104.0, "min": 0.0, "orientation": "horizontal", "style": "IPY_MODEL_47d012abd87d4c12b5b9710ec150af35", "tabbable": null, "tooltip": null, "value": 104.0 } }, "8fd1a850c421452b8fd92aaaa217d161": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "93bce13d65dd462aacfaea91004c1466": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_0a405d490e444b30b594327fffc7bdf9", "IPY_MODEL_8a14519b702a4a31aa82d1b651035ef0", "IPY_MODEL_87ec76f6c7e248f8908df678515a3a41" ], "layout": "IPY_MODEL_82df8d0fbad34bc297d8a3a001d14db6", "tabbable": null, "tooltip": null } }, "ba89321a7d3743d4b6e1e7b72a3df4ac": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 0 }