{ "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": "2024-02-02T12:41:17.312783Z", "iopub.status.busy": "2024-02-02T12:41:17.312288Z", "iopub.status.idle": "2024-02-02T12:41:17.316847Z", "shell.execute_reply": "2024-02-02T12:41:17.316109Z" }, "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": "2024-02-02T12:41:17.320592Z", "iopub.status.busy": "2024-02-02T12:41:17.320181Z", "iopub.status.idle": "2024-02-02T12:42:02.249538Z", "shell.execute_reply": "2024-02-02T12:42:02.248421Z" }, "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": "2024-02-02T12:42:02.254327Z", "iopub.status.busy": "2024-02-02T12:42:02.254004Z", "iopub.status.idle": "2024-02-02T12:42:05.791928Z", "shell.execute_reply": "2024-02-02T12:42:05.791034Z" }, "id": "DmeFAuVsyWxg" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2024-02-02 12:42:03.366166: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "2024-02-02 12:42:04.103707: 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", "2024-02-02 12:42:04.103807: 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", "2024-02-02 12:42:04.103818: 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": "2024-02-02T12:42:05.796449Z", "iopub.status.busy": "2024-02-02T12:42:05.795963Z", "iopub.status.idle": "2024-02-02T12:42:06.409759Z", "shell.execute_reply": "2024-02-02T12:42:06.408888Z" }, "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", "('Oxygen gas is increasingly obtained by these non-cryogenic technologies (see '\n", " 'also the related vacuum swing adsorption).')\n", "\n", "context:\n", "\n", "('The other major method of producing O\\n'\n", " '2 gas involves passing a stream of clean, dry air through one bed of a pair '\n", " 'of identical zeolite molecular sieves, which absorbs the nitrogen and '\n", " 'delivers a gas stream that is 90% to 93% O\\n'\n", " '2. Simultaneously, nitrogen gas is released from the other '\n", " 'nitrogen-saturated zeolite bed, by reducing the chamber operating pressure '\n", " 'and diverting part of the oxygen gas from the producer bed through it, in '\n", " 'the reverse direction of flow. After a set cycle time the operation of the '\n", " 'two beds is interchanged, thereby allowing for a continuous supply of '\n", " 'gaseous oxygen to be pumped through a pipeline. This is known as pressure '\n", " 'swing adsorption. Oxygen gas is increasingly obtained by these non-cryogenic '\n", " 'technologies (see also the related vacuum swing adsorption).')\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": "2024-02-02T12:42:06.413609Z", "iopub.status.busy": "2024-02-02T12:42:06.413042Z", "iopub.status.idle": "2024-02-02T12:42:19.508407Z", "shell.execute_reply": "2024-02-02T12:42:19.507375Z" }, "id": "44I0uCRQRiFO" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2024-02-02 12:42:11.161871: E tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:267] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected\n" ] } ], "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": "2024-02-02T12:42:19.512884Z", "iopub.status.busy": "2024-02-02T12:42:19.512579Z", "iopub.status.idle": "2024-02-02T13:06:06.124848Z", "shell.execute_reply": "2024-02-02T13:06:06.123975Z" }, "id": "FwDUryIfSLp2" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Computing embeddings for 10455 sentences\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c6e38427de8f4c07b6830ffd3a1ed1b4", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/104 [00:00Random Question from SQuAD:

    \n", "

      What objects in organisms absorb singlet oxygen to prevent harm?

    \n", "

    Answer:

    \n", "

      Carotenoids

    \n", " \n", "

    Retrieved sentences :\n", "

      \n", "
    1. Trioxygen (O\n", "3) is usually known as ozone and is a very reactive allotrope of oxygen that is damaging to lung tissue.
    2. \n", "
    3. Parts of the immune system of higher organisms create peroxide, superoxide, and singlet oxygen to destroy invading microbes.
    4. \n", "
    5. Reactive oxygen species, such as superoxide ion (O−\n", "2) and hydrogen peroxide (H\n", "2O\n", "2), are dangerous by-products of oxygen use in organisms.
    6. \n", "
    7. Carotenoids in photosynthetic organisms (and possibly also in animals) play a major role in absorbing energy from singlet oxygen and converting it to the unexcited ground state before it can cause harm to tissues.
    8. \n", "
    9. Oxygen is toxic to obligately anaerobic organisms, which were the dominant form of early life on Earth until O\n", "2 began to accumulate in the atmosphere about 2.5 billion years ago during the Great Oxygenation Event, about a billion years after the first appearance of these organisms.
    10. \n", "
    11. Photosynthesis releases oxygen into the atmosphere, while respiration and decay remove it from the atmosphere.
    12. \n", "
    13. Lower levels of reactive oxygen species initiate systemic acquired resistance, triggering defense-molecule production in the rest of the plant.
    14. \n", "
    15. Oxygen gas is poisonous to the anaerobic bacteria that cause gas gangrene, so increasing its partial pressure helps kill them.
    16. \n", "
    17. Oxygen gas (O\n", "2) can be toxic at elevated partial pressures, leading to convulsions and other health problems.
    18. \n", "
    19. Only a few common complex biomolecules, such as squalene and the carotenes, contain no oxygen.
    20. \n", "
    21. Another form (allotrope) of oxygen, ozone (O\n", "3), strongly absorbs UVB radiation and consequently the high-altitude ozone layer helps protect the biosphere from ultraviolet radiation, but is a pollutant near the surface where it is a by-product of smog.
    22. \n", "
    23. Highly concentrated sources of oxygen promote rapid combustion.
    24. \n", "
    25. Bundle sheath chloroplasts do not carry out the light reactions, preventing oxygen from building up in them and disrupting rubisco activity.
    26. \n", "
    27. Chloroplasts stimulate both responses by purposely damaging their photosynthetic system, producing reactive oxygen species.
    28. \n", "
    29. Carbon monoxide poisoning, gas gangrene, and decompression sickness (the 'bends') are sometimes treated using these devices.
    30. \n", "
    31. Reactive oxygen species also play an important role in the hypersensitive response of plants against pathogen attack.
    32. \n", "
    33. All fats, fatty acids, amino acids, and proteins contain oxygen (due to the presence of carbonyl groups in these acids and their ester residues).
    34. \n", "
    35. Oxygen toxicity to the lungs and central nervous system can also occur in deep scuba diving and surface supplied diving.
    36. \n", "
    37. Oxygen, as a supposed mild euphoric, has a history of recreational use in oxygen bars and in sports.
    38. \n", "
    39. Most of the mass of living organisms is oxygen as it is a part of water, the major constituent of lifeforms.
    40. \n", "
    41. Free oxygen also occurs in solution in the world's water bodies.
    42. \n", "
    43. It is also produced in the troposphere by the photolysis of ozone by light of short wavelength, and by the immune system as a source of active oxygen.
    44. \n", "
    45. The O\n", "2 surrounding these other planets is produced solely by ultraviolet radiation impacting oxygen-containing molecules such as carbon dioxide.
    46. \n", "
    47. High levels of reactive oxygen species will cause the hypersensitive response.
    48. \n", "
    49. Acute oxygen toxicity (causing seizures, its most feared effect for divers) can occur by breathing an air mixture with 21% O\n", "2 at 66 m or more of depth; the same thing can occur by breathing 100% O\n", "2 at only 6 m.
    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": "retrieval_with_tf_hub_universal_encoder_qa.ipynb", "toc_visible": true }, "kernelspec": { "display_name": "Python 3", "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.18" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "11b344fa952149a79f9ea9f86247471b": { "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_f664bf5193be4adaa3ec2a108505508d", "max": 104.0, "min": 0.0, "orientation": "horizontal", "style": "IPY_MODEL_4560bee9d0d64df38a58ba7e7abb7169", "tabbable": null, "tooltip": null, "value": 104.0 } }, "397a44eaf66f4dd8a483716bf90c8f0d": { "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 } }, "4560bee9d0d64df38a58ba7e7abb7169": { "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": "" } }, "4c65f1d3d9b640a08c1a1150d8a85283": { "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_4d337d6f0f5740a982831a46760f0f96", "placeholder": "​", "style": "IPY_MODEL_d6a18e5ebe344b44ba4e5269ee8e6044", "tabbable": null, "tooltip": null, "value": " 104/104 [23:44<00:00, 13.62s/it]" } }, "4d337d6f0f5740a982831a46760f0f96": { "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 } }, "7b856f1d9fb64f1892a96baab9d36928": { "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 } }, "a18e57e81ecd4b44801d5c9fe0f02494": { "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_ece75c8e57b54e82bc6324c8306afe95", "placeholder": "​", "style": "IPY_MODEL_7b856f1d9fb64f1892a96baab9d36928", "tabbable": null, "tooltip": null, "value": "100%" } }, "c6e38427de8f4c07b6830ffd3a1ed1b4": { "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_a18e57e81ecd4b44801d5c9fe0f02494", "IPY_MODEL_11b344fa952149a79f9ea9f86247471b", "IPY_MODEL_4c65f1d3d9b640a08c1a1150d8a85283" ], "layout": "IPY_MODEL_397a44eaf66f4dd8a483716bf90c8f0d", "tabbable": null, "tooltip": null } }, "d6a18e5ebe344b44ba4e5269ee8e6044": { "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 } }, "ece75c8e57b54e82bc6324c8306afe95": { "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 } }, "f664bf5193be4adaa3ec2a108505508d": { "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 }