{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "m39L6DJ2r0zN"
      },
      "source": [
        "# BERT Predict classification\n",
        "\n",
        "## 1. Setup the environment\n",
        "\n",
        "### 1.1 Setup colab environment\n",
        "\n",
        "#### 1.1.1 Install packages"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "pwmZ5bBvgGNh",
        "outputId": "1a080856-4e47-4e1d-81d1-d38bb58948a5"
      },
      "outputs": [],
      "source": [
        "!pip install transformers==4.10.3\n",
        "!pip install sentencepiece"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "57zgbn_jr0zR"
      },
      "source": [
        "#### 1.1.2 Use more RAM"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "WF0qFN_g3ekz",
        "outputId": "56e76858-932c-42fd-ace0-37bf11c7b4ce"
      },
      "outputs": [],
      "source": [
        "from psutil import virtual_memory\n",
        "ram_gb = virtual_memory().total / 1e9\n",
        "print('Your runtime has {:.1f} gigabytes of available RAM\\n'.format(ram_gb))\n",
        "\n",
        "if ram_gb < 20:\n",
        "  print('Not using a high-RAM runtime')\n",
        "else:\n",
        "  print('You are using a high-RAM runtime!')"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "vpr71iWGr0zS"
      },
      "source": [
        "#### 1.1.3 Mount GoogleDrive"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "vL0S-s9Uofvn",
        "outputId": "dbe3e901-da63-48b5-d8c6-b8cbda503fef"
      },
      "outputs": [],
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8hzEGHl7gmzk"
      },
      "source": [
        "### 1.2 Setup GPU"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "dPOU-Efhf4ui",
        "outputId": "0bb7fd0e-e2fb-4477-e5f7-b408d0a1ced7"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "No GPU available, using the CPU instead.\n"
          ]
        }
      ],
      "source": [
        "import torch\n",
        "\n",
        "# If there's a GPU available...\n",
        "if torch.cuda.is_available():    \n",
        "    # Tell PyTorch to use the GPU.    \n",
        "    device = torch.device(\"cuda\")\n",
        "    print('There are %d GPU(s) available.' % torch.cuda.device_count())\n",
        "    print('We will use the GPU:', torch.cuda.get_device_name(0))\n",
        "\n",
        "# for MacOS\n",
        "elif torch.backends.mps.is_available() and torch.backends.mps.is_built():\n",
        "    device = torch.device(\"mps\")\n",
        "    print('We will use the GPU')\n",
        "else:\n",
        "    device = torch.device(\"cpu\")\n",
        "    print('No GPU available, using the CPU instead.')\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wSqbrupGMc1M"
      },
      "source": [
        "### 1.3 Import librairies"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "id": "SkErnwgMMbRj"
      },
      "outputs": [],
      "source": [
        "import pandas as pd \n",
        "import numpy as np\n",
        "\n",
        "from transformers import BertTokenizer, BertForSequenceClassification, CamembertTokenizer, TextClassificationPipeline\n",
        "from torch.utils.data import TensorDataset, DataLoader, SequentialSampler\n",
        "\n",
        "import pickle "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "c5QKcXulhNJ-"
      },
      "source": [
        "## 2. Load Data"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "X1A_J8MGr0zV",
        "outputId": "ca5c966c-00a2-4d74-cd1c-576c18f98d3d"
      },
      "outputs": [],
      "source": [
        "#!wget https://geode.liris.cnrs.fr/files/datasets/EDdA/Classification/LGE_withContent.tsv\n",
        "#!wget https://geode.liris.cnrs.fr/EDdA-Classification/datasets/EDdA_dataset_articles_no_superdomain.tsv\n",
        "#!wget https://geode.liris.cnrs.fr/EDdA-Classification/datasets/Parallel_datatset_articles_230215.tsv"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "id": "M2awiee1r0zV"
      },
      "outputs": [],
      "source": [
        "#drive_path = \"drive/MyDrive/Classification-EDdA/\"\n",
        "drive_path = \"../\"\n",
        "#path = \"/Users/lmoncla/git/gitlab.liris/GEODE/EDdA/output/\"\n",
        "path = \"/Users/lmoncla/Nextcloud-LIRIS/GEODE/GEODE - Partage consortium/Corpus/LGE/\"\n",
        "\n",
        "\n",
        "#filepath = \"Parallel_datatset_articles_230215.tsv\"\n",
        "#filepath = \"EDdA_dataset_articles.tsv\"\n",
        "filepath = 'LGE_dataset_articles_230314.tsv'\n",
        "\n",
        "corpus = 'lge'\n",
        "#corpus = ''"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 333
        },
        "id": "erjPU3y8r0zW",
        "outputId": "e2b4a39d-a72b-4e7a-8b26-e709eb983df3"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>uid</th>\n",
              "      <th>lge-volume</th>\n",
              "      <th>lge-numero</th>\n",
              "      <th>lge-head</th>\n",
              "      <th>lge-page</th>\n",
              "      <th>lge-id</th>\n",
              "      <th>lge-content</th>\n",
              "      <th>lge-nbWords</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>lge_1_a-0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>A</td>\n",
              "      <td>0</td>\n",
              "      <td>a-0</td>\n",
              "      <td>A(Ling.). Son vocal et première lettre de notr...</td>\n",
              "      <td>1761.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>lge_1_a-1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>A</td>\n",
              "      <td>1</td>\n",
              "      <td>a-1</td>\n",
              "      <td>A(Paléogr.). C’est à l’alphabet phénicien, on ...</td>\n",
              "      <td>839.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>lge_1_a-2</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-2</td>\n",
              "      <td>A(Log.). Cette voyelle désigne les proposition...</td>\n",
              "      <td>56.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>lge_1_a-3</td>\n",
              "      <td>1</td>\n",
              "      <td>4</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-3</td>\n",
              "      <td>A(Mus.). La lettre a est employée par les musi...</td>\n",
              "      <td>267.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>lge_1_a-4</td>\n",
              "      <td>1</td>\n",
              "      <td>5</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-4</td>\n",
              "      <td>A(Numis.). Dans la numismatique grecque, la le...</td>\n",
              "      <td>67.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "         uid  lge-volume  lge-numero lge-head  lge-page lge-id  \\\n",
              "0  lge_1_a-0           1           1        A         0    a-0   \n",
              "1  lge_1_a-1           1           2        A         1    a-1   \n",
              "2  lge_1_a-2           1           3        A         4    a-2   \n",
              "3  lge_1_a-3           1           4        A         4    a-3   \n",
              "4  lge_1_a-4           1           5        A         4    a-4   \n",
              "\n",
              "                                         lge-content  lge-nbWords  \n",
              "0  A(Ling.). Son vocal et première lettre de notr...       1761.0  \n",
              "1  A(Paléogr.). C’est à l’alphabet phénicien, on ...        839.0  \n",
              "2  A(Log.). Cette voyelle désigne les proposition...         56.0  \n",
              "3  A(Mus.). La lettre a est employée par les musi...        267.0  \n",
              "4  A(Numis.). Dans la numismatique grecque, la le...         67.0  "
            ]
          },
          "execution_count": 6,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df = pd.read_csv(path + filepath, sep=\"\\t\")\n",
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "metadata": {
        "id": "Ndw4UtgWt_MJ"
      },
      "outputs": [],
      "source": [
        "dataset = df[corpus+'-content'].values"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "U6KSUho7r0zX"
      },
      "source": [
        "## 3. Load model and predict\n",
        "\n",
        "### 3.1 BERT / CamemBERT"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "id": "0qDZ86qTr0zX"
      },
      "outputs": [],
      "source": [
        "model_name = \"bert-base-multilingual-cased\"\n",
        "#model_name = \"camembert-base\"\n",
        "#model_path = path + \"models/model_\" + model_name + \"_s10000.pt\"\n",
        "\n",
        "model_path = drive_path + \"models/model_\" + model_name + \"_s10000_superdomains.pt\""
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "metadata": {
        "id": "KEljGX0br0zX"
      },
      "outputs": [],
      "source": [
        "def generate_dataloader(tokenizer, sentences, batch_size = 8, max_len = 512):\n",
        "\n",
        "    # Tokenize all of the sentences and map the tokens to thier word IDs.\n",
        "    input_ids_test = []\n",
        "    # For every sentence...\n",
        "    for sent in sentences:\n",
        "        # `encode` will:\n",
        "        #   (1) Tokenize the sentence.\n",
        "        #   (2) Prepend the `[CLS]` token to the start.\n",
        "        #   (3) Append the `[SEP]` token to the end.\n",
        "        #   (4) Map tokens to their IDs.\n",
        "        encoded_sent = tokenizer.encode(\n",
        "                            sent,                      # Sentence to encode.\n",
        "                            add_special_tokens = True, # Add '[CLS]' and '[SEP]'\n",
        "                            # This function also supports truncation and conversion\n",
        "                            # to pytorch tensors, but I need to do padding, so I\n",
        "                            # can't use these features.\n",
        "                            #max_length = max_len,          # Truncate all sentences.\n",
        "                            #return_tensors = 'pt',     # Return pytorch tensors.\n",
        "                    )\n",
        "        input_ids_test.append(encoded_sent)\n",
        "\n",
        "    # Pad our input tokens\n",
        "    padded_test = []\n",
        "    for i in input_ids_test:\n",
        "        if len(i) > max_len:\n",
        "            padded_test.extend([i[:max_len]])\n",
        "        else:\n",
        "            padded_test.extend([i + [0] * (max_len - len(i))])\n",
        "    input_ids_test = np.array(padded_test)\n",
        "\n",
        "    # Create attention masks\n",
        "    attention_masks = []\n",
        "\n",
        "    # Create a mask of 1s for each token followed by 0s for padding\n",
        "    for seq in input_ids_test:\n",
        "        seq_mask = [float(i>0) for i in seq]\n",
        "        attention_masks.append(seq_mask)\n",
        "\n",
        "    # Convert to tensors.\n",
        "    inputs = torch.tensor(input_ids_test)\n",
        "    masks = torch.tensor(attention_masks)\n",
        "    #set batch size\n",
        "\n",
        "    # Create the DataLoader.\n",
        "    data = TensorDataset(inputs, masks)\n",
        "    prediction_sampler = SequentialSampler(data)\n",
        "\n",
        "    return DataLoader(data, sampler=prediction_sampler, batch_size=batch_size)\n",
        "\n",
        "\n",
        "\n",
        "def predict(model, dataloader, device):\n",
        "\n",
        "    # Put model in evaluation mode\n",
        "    model.eval()\n",
        "\n",
        "    # Tracking variables\n",
        "    predictions_test , true_labels = [], []\n",
        "    pred_labels_ = []\n",
        "    # Predict\n",
        "    for batch in dataloader:\n",
        "    # Add batch to GPU\n",
        "        batch = tuple(t.to(device) for t in batch)\n",
        "\n",
        "        # Unpack the inputs from the dataloader\n",
        "        b_input_ids, b_input_mask = batch\n",
        "\n",
        "        # Telling the model not to compute or store gradients, saving memory and\n",
        "        # speeding up prediction\n",
        "        with torch.no_grad():\n",
        "            # Forward pass, calculate logit predictions\n",
        "            outputs = model(b_input_ids, token_type_ids=None,\n",
        "                            attention_mask=b_input_mask)\n",
        "\n",
        "        logits = outputs[0]\n",
        "        #print(logits)\n",
        "\n",
        "        # Move logits and labels to CPU ???\n",
        "        logits = logits.detach().cpu().numpy()\n",
        "        #print(logits)\n",
        "\n",
        "        # Store predictions and true labels\n",
        "        predictions_test.append(logits)\n",
        "\n",
        "        pred_labels = []\n",
        "        \n",
        "        for i in range(len(predictions_test)):\n",
        "            # The predictions for this batch are a 2-column ndarray (one column for \"0\"\n",
        "            # and one column for \"1\"). Pick the label with the highest value and turn this\n",
        "            # in to a list of 0s and 1s.\n",
        "            pred_labels_i = np.argmax(predictions_test[i], axis=1).flatten()\n",
        "            pred_labels.append(pred_labels_i)\n",
        "\n",
        "    pred_labels_ += [item for sublist in pred_labels for item in sublist]\n",
        "    return pred_labels_\n",
        "\n",
        "\n",
        "\n",
        "#https://discuss.huggingface.co/t/i-have-trained-my-classifier-now-how-do-i-do-predictions/3625/3\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 162,
          "referenced_widgets": [
            "11c285bed74e46a08fbb7bf88715aafa",
            "3fde7318ebc3458cb64f8927fdcbaee3",
            "8d57eb44d9394604981a8f8f97f48b7c",
            "1cb6ed877c2b455b9463b12c2da877d8",
            "5e03651dca944a5f91b675c503feeeac",
            "0521c3cc6abd44ae989ac0701100045d",
            "d12a8ef069af4d79870bd783f2343184",
            "28d38094dcd54d6694e2efad7fea6abb",
            "6f80ea06220b4a498e6169e55cd8800f",
            "3de8b4b0d6494c058589c535dc24dc3e",
            "e0df5e2d4ebd4eb3b126c16dadb2ba62",
            "9be44ba364a344f2b6b2546ae9d61ba8",
            "fe472df31774495c83aa159e116ba2ee",
            "0180ffc200e8466191a11a723c82e43f",
            "a07ac2935a3f4d84971ae9147a854969",
            "af4ae976808042bf929ab17df10530b2",
            "b2277b3d600c43f999b3a07215ac2e13",
            "ebe5e6f8af1e4e04a8a2b5939ac09039",
            "c4ea841cb43747cdbce35f8f9c711cde",
            "2d937fce2e6c4b69816352bd264ded41",
            "64b57e3be2c743b3b0e58d338243c656",
            "6ca9688ac7fa4e638994b91242c0ac87",
            "aa6a7a9106554f85a91150bd65c271d0",
            "ea3f471546734f5994edfdc214319368",
            "04a86b4164fa49de8fd47d4d373e1d81",
            "be067a8a406f41779e42bd35abcbfcf0",
            "7df91507e47d4a6992464293ce002a29",
            "ecef81814a7c4481aa49eb73807bfe4d",
            "2b9b4eac7994405ca9bce38332df2629",
            "4edc5b66f0eb44a0b05876fda90f0d1b",
            "5285a390fb42415289d89585e04c8994",
            "53643db8401846f2af6f15f5cd0c9998",
            "bc4825e1a43f4a20b496d82ea3687e6f",
            "4c46904f8e944d2b834ba9d384b00a8c",
            "ef37bbf1f34e4765b1803a607716d0d1",
            "c2d6041cd6674043953e094791ab9659",
            "e4c43817f44743388e6fd98b8dbb2eda",
            "39636049d60a4bb4bde7d0ef1af25d78",
            "c3e73d423c2c41c0a942331070fda723",
            "087ebcb093bb41c28485bdc762fb5da6",
            "de270f0aa8194e0bb470e693a35d7d6e",
            "2924cdc1348942cfb23f28a5383af3e4",
            "209ff109c8e142dfba37baea2d3d5de7",
            "4203b950e245481590e8105f31301782"
          ]
        },
        "id": "eGKU1J9Ar0zY",
        "outputId": "0a5f7fe5-7b5e-4c11-8a6e-7e85e8478b92"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Loading Bert Tokenizer...\n"
          ]
        }
      ],
      "source": [
        "if model_name == 'bert-base-multilingual-cased' :\n",
        "    print('Loading Bert Tokenizer...')\n",
        "    tokenizer = BertTokenizer.from_pretrained(model_name)\n",
        "elif model_name == 'camembert-base':\n",
        "    print('Loading Camembert Tokenizer...')\n",
        "    tokenizer = CamembertTokenizer.from_pretrained(model_name)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "4lv8lvUar0zZ"
      },
      "source": [
        "\n",
        "https://discuss.huggingface.co/t/an-efficient-way-of-loading-a-model-that-was-saved-with-torch-save/9814\n",
        "\n",
        "https://github.com/huggingface/transformers/issues/2094\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "metadata": {
        "id": "CN8EZst-r0zZ"
      },
      "outputs": [],
      "source": [
        "model = BertForSequenceClassification.from_pretrained(model_path).to(device.type)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "id": "-O6NspVTr0zZ"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Token indices sequence length is longer than the specified maximum sequence length for this model (3408 > 512). Running this sequence through the model will result in indexing errors\n"
          ]
        }
      ],
      "source": [
        "#data_loader = generate_dataloader(tokenizer, data)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "id": "_fzgS5USJeAF"
      },
      "outputs": [],
      "source": [
        "#pred = predict(model, data_loader, device)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 32,
      "metadata": {},
      "outputs": [],
      "source": [
        "# https://huggingface.co/docs/transformers/main_classes/pipelines\n",
        "\n",
        "def data(): #TODO : \n",
        "    for d in dataset:\n",
        "        yield f\"{d}\"\n",
        "\n",
        "pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True, device=device)\n",
        "\n",
        "# https://stackoverflow.com/questions/67849833/how-to-truncate-input-in-the-huggingface-pipeline\n",
        "tokenizer_kwargs = {'padding':True, 'truncation':True, 'max_length':512}"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 75,
      "metadata": {},
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "13 0.9375858902931213 2 0.02119206078350544 7 0.012656883336603642\n",
            "6 0.9926056861877441 7 0.0029342961497604847 8 0.0010190310422331095\n",
            "13 0.9823671579360962 2 0.004123885650187731 1 0.0022031611297279596\n",
            "10 0.9058954119682312 2 0.029458750039339066 7 0.014979332685470581\n",
            "7 0.9861114025115967 2 0.003949114587157965 6 0.0015271356096491218\n",
            "4 0.9868665933609009 5 0.0021403145510703325 15 0.0018120042514055967\n"
          ]
        }
      ],
      "source": [
        "pred = []\n",
        "cpt = 0\n",
        "for out in pipe(data(), **tokenizer_kwargs):\n",
        "    out = sorted(out, key=lambda d: d['score'], reverse=True) \n",
        "    print(int(out[0]['label'][6:]), out[0]['score'], int(out[1]['label'][6:]), out[1]['score'], int(out[2]['label'][6:]), out[2]['score']) # label ### TODO modifier ici\n",
        "    pred.append([int(out[0]['label'][6:]), out[0]['score'], int(out[1]['label'][6:]), out[1]['score'], int(out[2]['label'][6:]), out[2]['score']])\n",
        "    cpt += 1\n",
        "    if cpt == 6:\n",
        "        break\n",
        "\n",
        "pred = np.array(pred)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 34,
      "metadata": {
        "id": "fo6k4li1r0za"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "/usr/local/Caskroom/miniforge/base/envs/geode-classification-py39/lib/python3.9/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator LabelEncoder from version 1.0.2 when using version 1.1.3. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n",
            "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n",
            "  warnings.warn(\n"
          ]
        }
      ],
      "source": [
        "# Load label encoder\n",
        "\n",
        "#encoder_filename = \"models/label_encoder.pkl\"\n",
        "encoder_filename = \"models/label_encoder_superdomains.pkl\"\n",
        "with open(drive_path + encoder_filename, 'rb') as file:\n",
        "      encoder = pickle.load(file)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 72,
      "metadata": {
        "id": "UU7qg7zVr0zb"
      },
      "outputs": [],
      "source": [
        "pred1 = list(encoder.inverse_transform(pred[:,0].astype(int)))\n",
        "pred2 = list(encoder.inverse_transform(pred[:,2].astype(int)))\n",
        "pred3 = list(encoder.inverse_transform(pred[:,4].astype(int)))\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 73,
      "metadata": {},
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "['Philosophie', 'Géographie', 'Philosophie', 'Musique', 'Histoire', 'Commerce']\n",
            "[0.93758589 0.99260569 0.98236716 0.90589541 0.9861114  0.98686659]\n"
          ]
        }
      ],
      "source": [
        "#print(pred1)\n",
        "#print(pred[:,1])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "metadata": {
        "id": "w4eHpBztr0zb"
      },
      "outputs": [],
      "source": [
        "df[corpus+'-superdomainPred1'] = pred1\n",
        "df[corpus+'-superdomainProba1'] = pred[:,1]\n",
        "df[corpus+'-superdomainPred2'] = pred2\n",
        "df[corpus+'-superdomainProba2'] = pred[:,3]\n",
        "df[corpus+'-superdomainPred3'] = pred3\n",
        "df[corpus+'-superdomainProba3'] = pred[:,5]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 18,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 797
        },
        "id": "OCy54lRLr0zb",
        "outputId": "a42d8a75-48b9-431a-9b8e-71e4d7018c6b"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>uid</th>\n",
              "      <th>lge-volume</th>\n",
              "      <th>lge-numero</th>\n",
              "      <th>lge-head</th>\n",
              "      <th>lge-page</th>\n",
              "      <th>lge-id</th>\n",
              "      <th>lge-content</th>\n",
              "      <th>lge-nbWords</th>\n",
              "      <th>lge-superdomainBert</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>lge_1_a-0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>A</td>\n",
              "      <td>0</td>\n",
              "      <td>a-0</td>\n",
              "      <td>A(Ling.). Son vocal et première lettre de notr...</td>\n",
              "      <td>1761.0</td>\n",
              "      <td>Philosophie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>lge_1_a-1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>A</td>\n",
              "      <td>1</td>\n",
              "      <td>a-1</td>\n",
              "      <td>A(Paléogr.). C’est à l’alphabet phénicien, on ...</td>\n",
              "      <td>839.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>lge_1_a-2</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-2</td>\n",
              "      <td>A(Log.). Cette voyelle désigne les proposition...</td>\n",
              "      <td>56.0</td>\n",
              "      <td>Philosophie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>lge_1_a-3</td>\n",
              "      <td>1</td>\n",
              "      <td>4</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-3</td>\n",
              "      <td>A(Mus.). La lettre a est employée par les musi...</td>\n",
              "      <td>267.0</td>\n",
              "      <td>Musique</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>lge_1_a-4</td>\n",
              "      <td>1</td>\n",
              "      <td>5</td>\n",
              "      <td>A</td>\n",
              "      <td>4</td>\n",
              "      <td>a-4</td>\n",
              "      <td>A(Numis.). Dans la numismatique grecque, la le...</td>\n",
              "      <td>67.0</td>\n",
              "      <td>Histoire</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>lge_1_aa-0</td>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "      <td>AA</td>\n",
              "      <td>4</td>\n",
              "      <td>aa-0</td>\n",
              "      <td>AA. Ces deux lettres désignent l’atelier monét...</td>\n",
              "      <td>14.0</td>\n",
              "      <td>Commerce</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>lge_1_aa-1</td>\n",
              "      <td>1</td>\n",
              "      <td>7</td>\n",
              "      <td>AA</td>\n",
              "      <td>4</td>\n",
              "      <td>aa-1</td>\n",
              "      <td>AA. Nom de plusieurs cours d’eau de l’Europe o...</td>\n",
              "      <td>75.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>lge_1_aa-2</td>\n",
              "      <td>1</td>\n",
              "      <td>8</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-2</td>\n",
              "      <td>AA. Rivière de France, prend sa source aux Tro...</td>\n",
              "      <td>165.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>lge_1_aa-3</td>\n",
              "      <td>1</td>\n",
              "      <td>9</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-3</td>\n",
              "      <td>AA. Rivière de Hollande, affluent de la Dommel...</td>\n",
              "      <td>17.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>lge_1_aa-4</td>\n",
              "      <td>1</td>\n",
              "      <td>10</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-4</td>\n",
              "      <td>AA. Nom de deux fleuves de la Russie. Le premi...</td>\n",
              "      <td>71.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "          uid  lge-volume  lge-numero lge-head  lge-page lge-id  \\\n",
              "0   lge_1_a-0           1           1        A         0    a-0   \n",
              "1   lge_1_a-1           1           2        A         1    a-1   \n",
              "2   lge_1_a-2           1           3        A         4    a-2   \n",
              "3   lge_1_a-3           1           4        A         4    a-3   \n",
              "4   lge_1_a-4           1           5        A         4    a-4   \n",
              "5  lge_1_aa-0           1           6       AA         4   aa-0   \n",
              "6  lge_1_aa-1           1           7       AA         4   aa-1   \n",
              "7  lge_1_aa-2           1           8       AA         5   aa-2   \n",
              "8  lge_1_aa-3           1           9       AA         5   aa-3   \n",
              "9  lge_1_aa-4           1          10       AA         5   aa-4   \n",
              "\n",
              "                                         lge-content  lge-nbWords  \\\n",
              "0  A(Ling.). Son vocal et première lettre de notr...       1761.0   \n",
              "1  A(Paléogr.). C’est à l’alphabet phénicien, on ...        839.0   \n",
              "2  A(Log.). Cette voyelle désigne les proposition...         56.0   \n",
              "3  A(Mus.). La lettre a est employée par les musi...        267.0   \n",
              "4  A(Numis.). Dans la numismatique grecque, la le...         67.0   \n",
              "5  AA. Ces deux lettres désignent l’atelier monét...         14.0   \n",
              "6  AA. Nom de plusieurs cours d’eau de l’Europe o...         75.0   \n",
              "7  AA. Rivière de France, prend sa source aux Tro...        165.0   \n",
              "8  AA. Rivière de Hollande, affluent de la Dommel...         17.0   \n",
              "9  AA. Nom de deux fleuves de la Russie. Le premi...         71.0   \n",
              "\n",
              "  lge-superdomainBert  \n",
              "0         Philosophie  \n",
              "1          Géographie  \n",
              "2         Philosophie  \n",
              "3             Musique  \n",
              "4            Histoire  \n",
              "5            Commerce  \n",
              "6          Géographie  \n",
              "7          Géographie  \n",
              "8          Géographie  \n",
              "9          Géographie  "
            ]
          },
          "execution_count": 18,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df.head(10)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 19,
      "metadata": {
        "id": "J9rObbvVr0zc"
      },
      "outputs": [],
      "source": [
        "#df.to_csv(drive_path + \"predictions/EDdA_dataset_articles_superdomainBERT_230313.tsv\", sep=\"\\t\")\n",
        "df.to_csv(drive_path + \"predictions/LGE_dataset_articles_superdomainBERT_230321.tsv\", sep=\"\\t\", index=False)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 20,
      "metadata": {
        "id": "8cX6XBq8_F5T"
      },
      "outputs": [],
      "source": [
        "#df.drop(columns=['contentLGE', 'contentEDdA'], inplace=True)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 21,
      "metadata": {
        "id": "7TD1mbKj_fXH"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>uid</th>\n",
              "      <th>lge-volume</th>\n",
              "      <th>lge-numero</th>\n",
              "      <th>lge-head</th>\n",
              "      <th>lge-page</th>\n",
              "      <th>lge-id</th>\n",
              "      <th>lge-content</th>\n",
              "      <th>lge-nbWords</th>\n",
              "      <th>lge-superdomainBert</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>lge_1_a-1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>A</td>\n",
              "      <td>1</td>\n",
              "      <td>a-1</td>\n",
              "      <td>A(Paléogr.). C’est à l’alphabet phénicien, on ...</td>\n",
              "      <td>839.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>lge_1_aa-1</td>\n",
              "      <td>1</td>\n",
              "      <td>7</td>\n",
              "      <td>AA</td>\n",
              "      <td>4</td>\n",
              "      <td>aa-1</td>\n",
              "      <td>AA. Nom de plusieurs cours d’eau de l’Europe o...</td>\n",
              "      <td>75.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>lge_1_aa-2</td>\n",
              "      <td>1</td>\n",
              "      <td>8</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-2</td>\n",
              "      <td>AA. Rivière de France, prend sa source aux Tro...</td>\n",
              "      <td>165.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>lge_1_aa-3</td>\n",
              "      <td>1</td>\n",
              "      <td>9</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-3</td>\n",
              "      <td>AA. Rivière de Hollande, affluent de la Dommel...</td>\n",
              "      <td>17.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>lge_1_aa-4</td>\n",
              "      <td>1</td>\n",
              "      <td>10</td>\n",
              "      <td>AA</td>\n",
              "      <td>5</td>\n",
              "      <td>aa-4</td>\n",
              "      <td>AA. Nom de deux fleuves de la Russie. Le premi...</td>\n",
              "      <td>71.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>134800</th>\n",
              "      <td>lge_31_zvornix-0</td>\n",
              "      <td>31</td>\n",
              "      <td>7757</td>\n",
              "      <td>ZVORNIX</td>\n",
              "      <td>1370</td>\n",
              "      <td>zvornix-0</td>\n",
              "      <td>ZVORNIX. Ville de Bosnie, sur la r. g. de la D...</td>\n",
              "      <td>27.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>134801</th>\n",
              "      <td>lge_31_zweibrücken-0</td>\n",
              "      <td>31</td>\n",
              "      <td>7758</td>\n",
              "      <td>ZWEIBRÜCKEN</td>\n",
              "      <td>1370</td>\n",
              "      <td>zweibrücken-0</td>\n",
              "      <td>ZWEIBRÜCKEN. Ville de Bavière (V. Deux-Ponts).\\n</td>\n",
              "      <td>6.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>134803</th>\n",
              "      <td>lge_31_zwickau-0</td>\n",
              "      <td>31</td>\n",
              "      <td>7760</td>\n",
              "      <td>ZWICKAU</td>\n",
              "      <td>1370</td>\n",
              "      <td>zwickau-0</td>\n",
              "      <td>ZWICKAU. Ville de Saxe, ch.-l. d’un cercle, su...</td>\n",
              "      <td>92.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>134806</th>\n",
              "      <td>lge_31_zwolle-0</td>\n",
              "      <td>31</td>\n",
              "      <td>7763</td>\n",
              "      <td>ZWOLLE</td>\n",
              "      <td>1371</td>\n",
              "      <td>zwolle-0</td>\n",
              "      <td>ZWOLLE. Ville des Pays-Bas, ch.-l. de la prov....</td>\n",
              "      <td>115.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>134819</th>\n",
              "      <td>lge_31_zyrmi-0</td>\n",
              "      <td>31</td>\n",
              "      <td>7776</td>\n",
              "      <td>ZYRMI</td>\n",
              "      <td>1372</td>\n",
              "      <td>zyrmi-0</td>\n",
              "      <td>ZYRMI. Ville du Soudan. Ancienne capitale du p...</td>\n",
              "      <td>16.0</td>\n",
              "      <td>Géographie</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>50917 rows × 9 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "                         uid  lge-volume  lge-numero     lge-head  lge-page  \\\n",
              "1                  lge_1_a-1           1           2            A         1   \n",
              "6                 lge_1_aa-1           1           7           AA         4   \n",
              "7                 lge_1_aa-2           1           8           AA         5   \n",
              "8                 lge_1_aa-3           1           9           AA         5   \n",
              "9                 lge_1_aa-4           1          10           AA         5   \n",
              "...                      ...         ...         ...          ...       ...   \n",
              "134800      lge_31_zvornix-0          31        7757      ZVORNIX      1370   \n",
              "134801  lge_31_zweibrücken-0          31        7758  ZWEIBRÜCKEN      1370   \n",
              "134803      lge_31_zwickau-0          31        7760      ZWICKAU      1370   \n",
              "134806       lge_31_zwolle-0          31        7763       ZWOLLE      1371   \n",
              "134819        lge_31_zyrmi-0          31        7776        ZYRMI      1372   \n",
              "\n",
              "               lge-id                                        lge-content  \\\n",
              "1                 a-1  A(Paléogr.). C’est à l’alphabet phénicien, on ...   \n",
              "6                aa-1  AA. Nom de plusieurs cours d’eau de l’Europe o...   \n",
              "7                aa-2  AA. Rivière de France, prend sa source aux Tro...   \n",
              "8                aa-3  AA. Rivière de Hollande, affluent de la Dommel...   \n",
              "9                aa-4  AA. Nom de deux fleuves de la Russie. Le premi...   \n",
              "...               ...                                                ...   \n",
              "134800      zvornix-0  ZVORNIX. Ville de Bosnie, sur la r. g. de la D...   \n",
              "134801  zweibrücken-0   ZWEIBRÜCKEN. Ville de Bavière (V. Deux-Ponts).\\n   \n",
              "134803      zwickau-0  ZWICKAU. Ville de Saxe, ch.-l. d’un cercle, su...   \n",
              "134806       zwolle-0  ZWOLLE. Ville des Pays-Bas, ch.-l. de la prov....   \n",
              "134819        zyrmi-0  ZYRMI. Ville du Soudan. Ancienne capitale du p...   \n",
              "\n",
              "        lge-nbWords lge-superdomainBert  \n",
              "1             839.0          Géographie  \n",
              "6              75.0          Géographie  \n",
              "7             165.0          Géographie  \n",
              "8              17.0          Géographie  \n",
              "9              71.0          Géographie  \n",
              "...             ...                 ...  \n",
              "134800         27.0          Géographie  \n",
              "134801          6.0          Géographie  \n",
              "134803         92.0          Géographie  \n",
              "134806        115.0          Géographie  \n",
              "134819         16.0          Géographie  \n",
              "\n",
              "[50917 rows x 9 columns]"
            ]
          },
          "execution_count": 21,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df.loc[(df[corpus+'-superdomainProba1'] == 'Géographie')]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 22,
      "metadata": {},
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(134820, 9)"
            ]
          },
          "execution_count": 22,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": []
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "machine_shape": "hm",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3.9.13 ('geode-classification-py39')",
      "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.15"
    },
    "vscode": {
      "interpreter": {
        "hash": "16fac9c2d845f8e1f8c6fffffe3d3a0def61c7e42da17a08d00f279ad4dea797"
      }
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "0180ffc200e8466191a11a723c82e43f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c4ea841cb43747cdbce35f8f9c711cde",
            "max": 29,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_2d937fce2e6c4b69816352bd264ded41",
            "value": 29
          }
        },
        "04a86b4164fa49de8fd47d4d373e1d81": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4edc5b66f0eb44a0b05876fda90f0d1b",
            "max": 1961828,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_5285a390fb42415289d89585e04c8994",
            "value": 1961828
          }
        },
        "0521c3cc6abd44ae989ac0701100045d": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "087ebcb093bb41c28485bdc762fb5da6": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "11c285bed74e46a08fbb7bf88715aafa": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_3fde7318ebc3458cb64f8927fdcbaee3",
              "IPY_MODEL_8d57eb44d9394604981a8f8f97f48b7c",
              "IPY_MODEL_1cb6ed877c2b455b9463b12c2da877d8"
            ],
            "layout": "IPY_MODEL_5e03651dca944a5f91b675c503feeeac"
          }
        },
        "1cb6ed877c2b455b9463b12c2da877d8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_3de8b4b0d6494c058589c535dc24dc3e",
            "placeholder": "​",
            "style": "IPY_MODEL_e0df5e2d4ebd4eb3b126c16dadb2ba62",
            "value": " 996k/996k [00:00&lt;00:00, 2.00MB/s]"
          }
        },
        "209ff109c8e142dfba37baea2d3d5de7": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "28d38094dcd54d6694e2efad7fea6abb": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2924cdc1348942cfb23f28a5383af3e4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "2b9b4eac7994405ca9bce38332df2629": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2d937fce2e6c4b69816352bd264ded41": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "39636049d60a4bb4bde7d0ef1af25d78": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3de8b4b0d6494c058589c535dc24dc3e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3fde7318ebc3458cb64f8927fdcbaee3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_0521c3cc6abd44ae989ac0701100045d",
            "placeholder": "​",
            "style": "IPY_MODEL_d12a8ef069af4d79870bd783f2343184",
            "value": "Downloading: 100%"
          }
        },
        "4203b950e245481590e8105f31301782": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4c46904f8e944d2b834ba9d384b00a8c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_ef37bbf1f34e4765b1803a607716d0d1",
              "IPY_MODEL_c2d6041cd6674043953e094791ab9659",
              "IPY_MODEL_e4c43817f44743388e6fd98b8dbb2eda"
            ],
            "layout": "IPY_MODEL_39636049d60a4bb4bde7d0ef1af25d78"
          }
        },
        "4edc5b66f0eb44a0b05876fda90f0d1b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5285a390fb42415289d89585e04c8994": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "53643db8401846f2af6f15f5cd0c9998": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5e03651dca944a5f91b675c503feeeac": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "64b57e3be2c743b3b0e58d338243c656": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6ca9688ac7fa4e638994b91242c0ac87": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "6f80ea06220b4a498e6169e55cd8800f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7df91507e47d4a6992464293ce002a29": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8d57eb44d9394604981a8f8f97f48b7c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_28d38094dcd54d6694e2efad7fea6abb",
            "max": 995526,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_6f80ea06220b4a498e6169e55cd8800f",
            "value": 995526
          }
        },
        "9be44ba364a344f2b6b2546ae9d61ba8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_fe472df31774495c83aa159e116ba2ee",
              "IPY_MODEL_0180ffc200e8466191a11a723c82e43f",
              "IPY_MODEL_a07ac2935a3f4d84971ae9147a854969"
            ],
            "layout": "IPY_MODEL_af4ae976808042bf929ab17df10530b2"
          }
        },
        "a07ac2935a3f4d84971ae9147a854969": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_64b57e3be2c743b3b0e58d338243c656",
            "placeholder": "​",
            "style": "IPY_MODEL_6ca9688ac7fa4e638994b91242c0ac87",
            "value": " 29.0/29.0 [00:00&lt;00:00, 1.88kB/s]"
          }
        },
        "aa6a7a9106554f85a91150bd65c271d0": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_ea3f471546734f5994edfdc214319368",
              "IPY_MODEL_04a86b4164fa49de8fd47d4d373e1d81",
              "IPY_MODEL_be067a8a406f41779e42bd35abcbfcf0"
            ],
            "layout": "IPY_MODEL_7df91507e47d4a6992464293ce002a29"
          }
        },
        "af4ae976808042bf929ab17df10530b2": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b2277b3d600c43f999b3a07215ac2e13": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "bc4825e1a43f4a20b496d82ea3687e6f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "be067a8a406f41779e42bd35abcbfcf0": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_53643db8401846f2af6f15f5cd0c9998",
            "placeholder": "​",
            "style": "IPY_MODEL_bc4825e1a43f4a20b496d82ea3687e6f",
            "value": " 1.96M/1.96M [00:00&lt;00:00, 2.16MB/s]"
          }
        },
        "c2d6041cd6674043953e094791ab9659": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_de270f0aa8194e0bb470e693a35d7d6e",
            "max": 625,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_2924cdc1348942cfb23f28a5383af3e4",
            "value": 625
          }
        },
        "c3e73d423c2c41c0a942331070fda723": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "c4ea841cb43747cdbce35f8f9c711cde": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d12a8ef069af4d79870bd783f2343184": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "de270f0aa8194e0bb470e693a35d7d6e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e0df5e2d4ebd4eb3b126c16dadb2ba62": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e4c43817f44743388e6fd98b8dbb2eda": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_209ff109c8e142dfba37baea2d3d5de7",
            "placeholder": "​",
            "style": "IPY_MODEL_4203b950e245481590e8105f31301782",
            "value": " 625/625 [00:00&lt;00:00, 35.2kB/s]"
          }
        },
        "ea3f471546734f5994edfdc214319368": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ecef81814a7c4481aa49eb73807bfe4d",
            "placeholder": "​",
            "style": "IPY_MODEL_2b9b4eac7994405ca9bce38332df2629",
            "value": "Downloading: 100%"
          }
        },
        "ebe5e6f8af1e4e04a8a2b5939ac09039": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ecef81814a7c4481aa49eb73807bfe4d": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ef37bbf1f34e4765b1803a607716d0d1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c3e73d423c2c41c0a942331070fda723",
            "placeholder": "​",
            "style": "IPY_MODEL_087ebcb093bb41c28485bdc762fb5da6",
            "value": "Downloading: 100%"
          }
        },
        "fe472df31774495c83aa159e116ba2ee": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b2277b3d600c43f999b3a07215ac2e13",
            "placeholder": "​",
            "style": "IPY_MODEL_ebe5e6f8af1e4e04a8a2b5939ac09039",
            "value": "Downloading: 100%"
          }
        }
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}