"
+ ],
+ "text/html": [
+ "\n",
+ " \n",
+ " \n",
+ "
\n",
+ " [7104/7104 3:46:15, Epoch 3/3]\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " Step \n",
+ " Training Loss \n",
+ " Validation Loss \n",
+ " Accuracy \n",
+ " F1 \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 1000 \n",
+ " 1.440300 \n",
+ " 0.582373 \n",
+ " 0.853149 \n",
+ " 0.852764 \n",
+ " \n",
+ " \n",
+ " 2000 \n",
+ " 0.703100 \n",
+ " 0.453642 \n",
+ " 0.878297 \n",
+ " 0.878230 \n",
+ " \n",
+ " \n",
+ " 3000 \n",
+ " 0.434700 \n",
+ " 0.409464 \n",
+ " 0.886455 \n",
+ " 0.886492 \n",
+ " \n",
+ " \n",
+ " 4000 \n",
+ " 0.310100 \n",
+ " 0.394801 \n",
+ " 0.889188 \n",
+ " 0.888990 \n",
+ " \n",
+ " \n",
+ " 5000 \n",
+ " 0.245100 \n",
+ " 0.383308 \n",
+ " 0.895168 \n",
+ " 0.895035 \n",
+ " \n",
+ " \n",
+ " 6000 \n",
+ " 0.115700 \n",
+ " 0.379927 \n",
+ " 0.896515 \n",
+ " 0.896743 \n",
+ " \n",
+ " \n",
+ " 7000 \n",
+ " 0.108100 \n",
+ " 0.376985 \n",
+ " 0.898059 \n",
+ " 0.898311 \n",
+ " \n",
+ " \n",
+ "
"
+ ]
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "stream",
+ "name": "stderr",
+ "text": [
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-1000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-1000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-1000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-1000/preprocessor_config.json\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-2000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-2000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-2000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-2000/preprocessor_config.json\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-3000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-3000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-3000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-3000/preprocessor_config.json\n",
+ "Deleting older checkpoint [vit-base-food/checkpoint-1000] due to args.save_total_limit\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-4000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-4000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-4000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-4000/preprocessor_config.json\n",
+ "Deleting older checkpoint [vit-base-food/checkpoint-2000] due to args.save_total_limit\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-5000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-5000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-5000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-5000/preprocessor_config.json\n",
+ "Deleting older checkpoint [vit-base-food/checkpoint-3000] due to args.save_total_limit\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-6000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-6000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-6000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-6000/preprocessor_config.json\n",
+ "Deleting older checkpoint [vit-base-food/checkpoint-4000] due to args.save_total_limit\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./vit-base-food/checkpoint-7000\n",
+ "Configuration saved in ./vit-base-food/checkpoint-7000/config.json\n",
+ "Model weights saved in ./vit-base-food/checkpoint-7000/pytorch_model.bin\n",
+ "Image processor saved in ./vit-base-food/checkpoint-7000/preprocessor_config.json\n",
+ "Deleting older checkpoint [vit-base-food/checkpoint-5000] due to args.save_total_limit\n",
+ "\n",
+ "\n",
+ "Training completed. Do not forget to share your model on huggingface.co/models =)\n",
+ "\n",
+ "\n",
+ "Loading best model from ./vit-base-food/checkpoint-7000 (score: 0.37698468565940857).\n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "TrainOutput(global_step=7104, training_loss=0.47385838654664186, metrics={'train_runtime': 13577.408, 'train_samples_per_second': 16.737, 'train_steps_per_second': 0.523, 'total_flos': 1.76256801415296e+19, 'train_loss': 0.47385838654664186, 'epoch': 3.0})"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 19
+ }
+ ],
+ "source": [
+ "# start training\n",
+ "trainer.train()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "id": "akZ0-H5YQSuJ",
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 211
+ },
+ "outputId": "85b9cf1b-3fca-47ed-b4fe-5de2839e8cd5"
+ },
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stderr",
+ "text": [
+ "***** Running Evaluation *****\n",
+ " Num examples = 25250\n",
+ " Batch size = 8\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ ""
+ ],
+ "text/html": [
+ "\n",
+ " \n",
+ " \n",
+ "
\n",
+ " [3157/3157 08:06]\n",
+ "
\n",
+ " "
+ ]
+ },
+ "metadata": {}
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'eval_loss': 0.37698468565940857,\n",
+ " 'eval_accuracy': 0.8980594059405941,\n",
+ " 'eval_f1': 0.8983106653355424,\n",
+ " 'eval_runtime': 487.0104,\n",
+ " 'eval_samples_per_second': 51.847,\n",
+ " 'eval_steps_per_second': 6.482,\n",
+ " 'epoch': 3.0}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 20
+ }
+ ],
+ "source": [
+ "# trainer.evaluate(dataset[\"test\"])\n",
+ "trainer.evaluate()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "wAZFCk5Gd1p0"
+ },
+ "outputs": [],
+ "source": [
+ "# start tensorboard\n",
+ "# %load_ext tensorboard\n",
+ "%reload_ext tensorboard\n",
+ "%tensorboard --logdir ./vit-base-food/runs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "H_SsuMpFafPe"
+ },
+ "source": [
+ "## Alternatively: Training using PyTorch Loop\n",
+ "Run the two below cells to fine-tune using a regular PyTorch loop if you want."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "C29idUGDd2yW"
+ },
+ "outputs": [],
+ "source": [
+ "# Training loop\n",
+ "from torch.utils.tensorboard import SummaryWriter\n",
+ "from torch.optim import AdamW\n",
+ "from torch.utils.data import DataLoader\n",
+ "\n",
+ "batch_size = 32\n",
+ "\n",
+ "train_dataset_loader = DataLoader(dataset[\"train\"], collate_fn=collate_fn, batch_size=batch_size, shuffle=True)\n",
+ "valid_dataset_loader = DataLoader(dataset[\"validation\"], collate_fn=collate_fn, batch_size=batch_size, shuffle=True)\n",
+ "\n",
+ "# define the optimizer\n",
+ "optimizer = AdamW(model.parameters(), lr=1e-5)\n",
+ "\n",
+ "log_dir = \"./image-classification/tensorboard\"\n",
+ "summary_writer = SummaryWriter(log_dir=log_dir)\n",
+ "\n",
+ "num_epochs = 3\n",
+ "model = model.to(device)\n",
+ "# print some statistics before training\n",
+ "# number of training steps\n",
+ "n_train_steps = num_epochs * len(train_dataset_loader)\n",
+ "# number of validation steps\n",
+ "n_valid_steps = len(valid_dataset_loader)\n",
+ "# current training step\n",
+ "current_step = 0\n",
+ "# logging, eval & save steps\n",
+ "save_steps = 1000\n",
+ "\n",
+ "def compute_metrics(eval_pred):\n",
+ " accuracy_score = accuracy.compute(predictions=eval_pred.predictions, references=eval_pred.label_ids)\n",
+ " f1_score = f1.compute(predictions=eval_pred.predictions, references=eval_pred.label_ids, average=\"macro\")\n",
+ " return {**accuracy_score, **f1_score}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "2v6dNtUcd7-G"
+ },
+ "outputs": [],
+ "source": [
+ "for epoch in range(num_epochs):\n",
+ " # set the model to training mode\n",
+ " model.train()\n",
+ " # initialize the training loss\n",
+ " train_loss = 0\n",
+ " # initialize the progress bar\n",
+ " progress_bar = tqdm(range(current_step, n_train_steps), \"Training\", dynamic_ncols=True, ncols=80)\n",
+ " for batch in train_dataset_loader:\n",
+ " if (current_step+1) % save_steps == 0:\n",
+ " ### evaluation code ###\n",
+ " # evaluate on the validation set\n",
+ " # if the current step is a multiple of the save steps\n",
+ " print()\n",
+ " print(f\"Validation at step {current_step}...\")\n",
+ " print()\n",
+ " # set the model to evaluation mode\n",
+ " model.eval()\n",
+ " # initialize our lists that store the predictions and the labels\n",
+ " predictions, labels = [], []\n",
+ " # initialize the validation loss\n",
+ " valid_loss = 0\n",
+ " for batch in valid_dataset_loader:\n",
+ " # get the batch\n",
+ " pixel_values = batch[\"pixel_values\"].to(device)\n",
+ " label_ids = batch[\"labels\"].to(device)\n",
+ " # forward pass\n",
+ " outputs = model(pixel_values=pixel_values, labels=label_ids)\n",
+ " # get the loss\n",
+ " loss = outputs.loss\n",
+ " valid_loss += loss.item()\n",
+ " # free the GPU memory\n",
+ " logits = outputs.logits.detach().cpu()\n",
+ " # add the predictions to the list\n",
+ " predictions.extend(logits.argmax(dim=-1).tolist())\n",
+ " # add the labels to the list\n",
+ " labels.extend(label_ids.tolist())\n",
+ " # make the EvalPrediction object that the compute_metrics function expects\n",
+ " eval_prediction = EvalPrediction(predictions=predictions, label_ids=labels)\n",
+ " # compute the metrics\n",
+ " metrics = compute_metrics(eval_prediction)\n",
+ " # print the stats\n",
+ " print()\n",
+ " print(f\"Epoch: {epoch}, Step: {current_step}, Train Loss: {train_loss / save_steps:.4f}, \" + \n",
+ " f\"Valid Loss: {valid_loss / n_valid_steps:.4f}, Accuracy: {metrics['accuracy']}, \" +\n",
+ " f\"F1 Score: {metrics['f1']}\")\n",
+ " print()\n",
+ " # log the metrics\n",
+ " summary_writer.add_scalar(\"valid_loss\", valid_loss / n_valid_steps, global_step=current_step)\n",
+ " summary_writer.add_scalar(\"accuracy\", metrics[\"accuracy\"], global_step=current_step)\n",
+ " summary_writer.add_scalar(\"f1\", metrics[\"f1\"], global_step=current_step)\n",
+ " # save the model\n",
+ " model.save_pretrained(f\"./vit-base-food/checkpoint-{current_step}\")\n",
+ " image_processor.save_pretrained(f\"./vit-base-food/checkpoint-{current_step}\")\n",
+ " # get the model back to train mode\n",
+ " model.train()\n",
+ " # reset the train and valid loss\n",
+ " train_loss, valid_loss = 0, 0\n",
+ " ### training code below ###\n",
+ " # get the batch & convert to tensor\n",
+ " pixel_values = batch[\"pixel_values\"].to(device)\n",
+ " labels = batch[\"labels\"].to(device)\n",
+ " # forward pass\n",
+ " outputs = model(pixel_values=pixel_values, labels=labels)\n",
+ " # get the loss\n",
+ " loss = outputs.loss\n",
+ " # backward pass\n",
+ " loss.backward()\n",
+ " # update the weights\n",
+ " optimizer.step()\n",
+ " # zero the gradients\n",
+ " optimizer.zero_grad()\n",
+ " # log the loss\n",
+ " loss_v = loss.item()\n",
+ " train_loss += loss_v\n",
+ " # increment the step\n",
+ " current_step += 1\n",
+ " progress_bar.update(1)\n",
+ " # log the training loss\n",
+ " summary_writer.add_scalar(\"train_loss\", loss_v, global_step=current_step)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Performing Inference"
+ ],
+ "metadata": {
+ "id": "5nyMP4VRC_dG"
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "nuOoflvoen7E"
+ },
+ "outputs": [],
+ "source": [
+ "# load the best model, change the checkpoint number to the best checkpoint\n",
+ "# if the last checkpoint is the best, then ignore this cell\n",
+ "best_checkpoint = 7000\n",
+ "# best_checkpoint = 150\n",
+ "model = ViTForImageClassification.from_pretrained(f\"./vit-base-food/checkpoint-{best_checkpoint}\").to(device)\n",
+ "# model = ViTForImageClassification.from_pretrained(f\"./vit-base-skin-cancer/checkpoint-{best_checkpoint}\").to(device)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 35
+ },
+ "id": "PwI6sf8PPReE",
+ "outputId": "851ba75d-374c-483f-8e32-2fd38de848f0"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "'sushi'"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "string"
+ }
+ },
+ "metadata": {},
+ "execution_count": 25
+ }
+ ],
+ "source": [
+ "get_prediction(model, \"https://images.pexels.com/photos/858496/pexels-photo-858496.jpeg?auto=compress&cs=tinysrgb&w=600&lazy=load\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "id": "pkmjg6hGQ6DZ"
+ },
+ "outputs": [],
+ "source": [
+ "def get_prediction_probs(model, url_or_path, num_classes=3):\n",
+ " # load the image\n",
+ " img = load_image(url_or_path)\n",
+ " # preprocessing the image\n",
+ " pixel_values = image_processor(img, return_tensors=\"pt\")[\"pixel_values\"].to(device)\n",
+ " # perform inference\n",
+ " output = model(pixel_values)\n",
+ " # get the top k classes and probabilities\n",
+ " probs, indices = torch.topk(output.logits.softmax(dim=1), k=num_classes)\n",
+ " # get the class labels\n",
+ " id2label = model.config.id2label\n",
+ " classes = [id2label[idx.item()] for idx in indices[0]]\n",
+ " # convert the probabilities to a list\n",
+ " probs = probs.squeeze().tolist()\n",
+ " # create a dictionary with the class names and probabilities\n",
+ " results = dict(zip(classes, probs))\n",
+ " return results"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "N0pFDs9CRhqX",
+ "outputId": "18f4cc0b-86fe-4575-c7d4-82b832938b56"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'greek_salad': 0.9658474326133728,\n",
+ " 'caesar_salad': 0.019217027351260185,\n",
+ " 'beet_salad': 0.008294313214719296}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 27
+ }
+ ],
+ "source": [
+ "# example 1\n",
+ "get_prediction_probs(model, \"https://images.pexels.com/photos/406152/pexels-photo-406152.jpeg?auto=compress&cs=tinysrgb&w=600\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "urU-gg-gRjkN",
+ "outputId": "6ff8b804-beea-4136-988d-2eb40c732205"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'grilled_cheese_sandwich': 0.9855711460113525,\n",
+ " 'waffles': 0.0030371786560863256,\n",
+ " 'club_sandwich': 0.0017941497499123216}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 28
+ }
+ ],
+ "source": [
+ "# example 2\n",
+ "get_prediction_probs(model, \"https://images.pexels.com/photos/920220/pexels-photo-920220.jpeg?auto=compress&cs=tinysrgb&w=600\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "nHtsyIRLV-3A",
+ "outputId": "bbba9101-6884-4b2b-b7c6-eba4e70fbe10"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'donuts': 0.9919546246528625,\n",
+ " 'cup_cakes': 0.0018467127811163664,\n",
+ " 'beignets': 0.0009919782169163227}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 29
+ }
+ ],
+ "source": [
+ "# example 3\n",
+ "get_prediction_probs(model, \"https://images.pexels.com/photos/3338681/pexels-photo-3338681.jpeg?auto=compress&cs=tinysrgb&w=600\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "qbO_d45dXtwh",
+ "outputId": "ef11eaab-abc9-4519-957e-fbb057d07c8e"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'deviled_eggs': 0.9846165180206299,\n",
+ " 'caprese_salad': 0.0012617064639925957,\n",
+ " 'ravioli': 0.001060450915247202,\n",
+ " 'beet_salad': 0.0008713295101188123,\n",
+ " 'scallops': 0.0005976424436084926,\n",
+ " 'gnocchi': 0.0005376451299525797,\n",
+ " 'fried_calamari': 0.0005195785779505968,\n",
+ " 'caesar_salad': 0.0003912363899871707,\n",
+ " 'samosa': 0.0003842405858449638,\n",
+ " 'dumplings': 0.00036707069375552237}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 30
+ }
+ ],
+ "source": [
+ "# example 4\n",
+ "get_prediction_probs(model, \"https://images.pexels.com/photos/806457/pexels-photo-806457.jpeg?auto=compress&cs=tinysrgb&w=600\", num_classes=10)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "id": "NAhzhcbhXyYA",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "98b811a4-b43f-4c87-b7c2-fcc678281157"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "{'fried_rice': 0.8101670145988464,\n",
+ " 'paella': 0.06818010658025742,\n",
+ " 'steak': 0.015688087791204453}"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 31
+ }
+ ],
+ "source": [
+ "get_prediction_probs(model, \"https://images.pexels.com/photos/1624487/pexels-photo-1624487.jpeg?auto=compress&cs=tinysrgb&w=600\")"
+ ]
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "provenance": [],
+ "collapsed_sections": [
+ "H9ZcQf_HDXl6",
+ "H_SsuMpFafPe"
+ ],
+ "toc_visible": true
+ },
+ "gpuClass": "standard",
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "394913b4097b46a7984797f5d1deaaff": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_d7ac86078f0c4c7da2f137ad1ac478b3",
+ "IPY_MODEL_cc9c87b095054301a8f910ad3a2cf1a5",
+ "IPY_MODEL_c39369786d8843cda8dd4bfc116f42bf"
+ ],
+ "layout": "IPY_MODEL_dc110e5887304c40941cdd68163a4013"
+ }
+ },
+ "d7ac86078f0c4c7da2f137ad1ac478b3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_de81d798249b48c396d64575bad2c358",
+ "placeholder": "",
+ "style": "IPY_MODEL_40687f7092f94f92a50e4d83c7147f2a",
+ "value": "Downloading builder script: 100%"
+ }
+ },
+ "cc9c87b095054301a8f910ad3a2cf1a5": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_2c20eadf22c545a182bec19a81b3d99a",
+ "max": 6208,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_7086056225a44a7fb99f14d9d0a1f4cc",
+ "value": 6208
+ }
+ },
+ "c39369786d8843cda8dd4bfc116f42bf": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_fe7fbb909b154a4eaf05a906dd2a9c78",
+ "placeholder": "",
+ "style": "IPY_MODEL_05ea400f1d864062bacb4e3a69312b4c",
+ "value": " 6.21k/6.21k [00:00<00:00, 317kB/s]"
+ }
+ },
+ "dc110e5887304c40941cdd68163a4013": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "de81d798249b48c396d64575bad2c358": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "40687f7092f94f92a50e4d83c7147f2a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "2c20eadf22c545a182bec19a81b3d99a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "7086056225a44a7fb99f14d9d0a1f4cc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "fe7fbb909b154a4eaf05a906dd2a9c78": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "05ea400f1d864062bacb4e3a69312b4c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "d6e7d1b10c7d4f5daa699d507c11f2d4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_b778df9b11374c55ab77e6df61464af9",
+ "IPY_MODEL_0f5c260e80444e38ab3b3cd8b984b9b5",
+ "IPY_MODEL_a75144c534ac462487e2ee23e69ff6d6"
+ ],
+ "layout": "IPY_MODEL_b3b818659e20499e97e1dcfadac5bdb2"
+ }
+ },
+ "b778df9b11374c55ab77e6df61464af9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_3f06b0e7f671425a84a8ba1eee6b91b4",
+ "placeholder": "",
+ "style": "IPY_MODEL_ca6bcd38cf654331a5cc2a30f6b1eb60",
+ "value": "Downloading metadata: 100%"
+ }
+ },
+ "0f5c260e80444e38ab3b3cd8b984b9b5": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_2a03ed298064406986a3926002e01c50",
+ "max": 5560,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_ad45516b83064a2fb2bfb1b6b4e4a6cc",
+ "value": 5560
+ }
+ },
+ "a75144c534ac462487e2ee23e69ff6d6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_493247940d1f4a1b9f540648539ee570",
+ "placeholder": "",
+ "style": "IPY_MODEL_bf4f4937407e4ff8b99e12a80df51bbf",
+ "value": " 5.56k/5.56k [00:00<00:00, 236kB/s]"
+ }
+ },
+ "b3b818659e20499e97e1dcfadac5bdb2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "3f06b0e7f671425a84a8ba1eee6b91b4": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "ca6bcd38cf654331a5cc2a30f6b1eb60": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "2a03ed298064406986a3926002e01c50": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "ad45516b83064a2fb2bfb1b6b4e4a6cc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "493247940d1f4a1b9f540648539ee570": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "bf4f4937407e4ff8b99e12a80df51bbf": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "df26988483374f13b3f5b5249885314e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_741faf1f52434dc1a50f8f87222d03f9",
+ "IPY_MODEL_c0e1947fff7545a2905b351ca3a37aa7",
+ "IPY_MODEL_ecaf20f7678f4c369c87159eebd764c5"
+ ],
+ "layout": "IPY_MODEL_9f94bd441f5143d09de8e1a2eaaaef47"
+ }
+ },
+ "741faf1f52434dc1a50f8f87222d03f9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_47f36484127b476eb6188c4aea4bdee3",
+ "placeholder": "",
+ "style": "IPY_MODEL_f856eaad87464418971522512a6a49f7",
+ "value": "Downloading readme: 100%"
+ }
+ },
+ "c0e1947fff7545a2905b351ca3a37aa7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_6be3d46ddb524492b317001c7f2327b8",
+ "max": 10337,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_7ff1fe3c688d4b4a9dbd29802bd37a6f",
+ "value": 10337
+ }
+ },
+ "ecaf20f7678f4c369c87159eebd764c5": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_e1ffbf12e5c84a6598375408de9664bb",
+ "placeholder": "",
+ "style": "IPY_MODEL_64b5417ebc974e199543379ef725d1c8",
+ "value": " 10.3k/10.3k [00:00<00:00, 431kB/s]"
+ }
+ },
+ "9f94bd441f5143d09de8e1a2eaaaef47": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "47f36484127b476eb6188c4aea4bdee3": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f856eaad87464418971522512a6a49f7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "6be3d46ddb524492b317001c7f2327b8": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "7ff1fe3c688d4b4a9dbd29802bd37a6f": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "e1ffbf12e5c84a6598375408de9664bb": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "64b5417ebc974e199543379ef725d1c8": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "82acbc3424b14a3583b58739b556045e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_ce51e61458384578b179cac6fd5afaba",
+ "IPY_MODEL_97c3a7df99234301af2afbe263071006",
+ "IPY_MODEL_11b963fc16c14db1b2739fc1ee5d891b"
+ ],
+ "layout": "IPY_MODEL_21643d4f04384d738a3a60dbd22989bf"
+ }
+ },
+ "ce51e61458384578b179cac6fd5afaba": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_048ff92d3dd94d11a8cbfa850f685113",
+ "placeholder": "",
+ "style": "IPY_MODEL_96a3a22da4734c9695730d08a19a0a23",
+ "value": "Downloading data: 100%"
+ }
+ },
+ "97c3a7df99234301af2afbe263071006": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_919af07ec8a44e2e992b7aa4fd995ab9",
+ "max": 4996278331,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_cd5bea65a88948bd8650bbf04e4e1426",
+ "value": 4996278331
+ }
+ },
+ "11b963fc16c14db1b2739fc1ee5d891b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_baca3a29ad0f4b5e8a5b1980337b30bc",
+ "placeholder": "",
+ "style": "IPY_MODEL_6b548b8a9ceb4f31b913196c87c1afae",
+ "value": " 5.00G/5.00G [07:58<00:00, 11.9MB/s]"
+ }
+ },
+ "21643d4f04384d738a3a60dbd22989bf": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "048ff92d3dd94d11a8cbfa850f685113": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "96a3a22da4734c9695730d08a19a0a23": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "919af07ec8a44e2e992b7aa4fd995ab9": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "cd5bea65a88948bd8650bbf04e4e1426": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "baca3a29ad0f4b5e8a5b1980337b30bc": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "6b548b8a9ceb4f31b913196c87c1afae": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "27228900fcc64b8e976c7cf674365f5e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_c081fea03098454ea2b7d58fa7cf44c4",
+ "IPY_MODEL_7429695252fb431593a5716dca6df965",
+ "IPY_MODEL_266cbfbc75c94b888682b24e7c72dfa7"
+ ],
+ "layout": "IPY_MODEL_93f772daaff14419a2d4dba53771c832"
+ }
+ },
+ "c081fea03098454ea2b7d58fa7cf44c4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_542f4c77c6754aecb778cc22775ceb9b",
+ "placeholder": "",
+ "style": "IPY_MODEL_078e919df7e244408b32f1a988975238",
+ "value": "Downloading data files: 100%"
+ }
+ },
+ "7429695252fb431593a5716dca6df965": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_258f358dcafc49de94bd56fb8673c814",
+ "max": 2,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d0f398fcac5741698b0ffb9ffa06d570",
+ "value": 2
+ }
+ },
+ "266cbfbc75c94b888682b24e7c72dfa7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_90b7882f5c6f4495b2d5e60bff88f2e2",
+ "placeholder": "",
+ "style": "IPY_MODEL_02a3804cfb644596845bd94d485842b3",
+ "value": " 2/2 [00:05<00:00, 2.51s/it]"
+ }
+ },
+ "93f772daaff14419a2d4dba53771c832": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "542f4c77c6754aecb778cc22775ceb9b": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "078e919df7e244408b32f1a988975238": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "258f358dcafc49de94bd56fb8673c814": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "d0f398fcac5741698b0ffb9ffa06d570": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "90b7882f5c6f4495b2d5e60bff88f2e2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "02a3804cfb644596845bd94d485842b3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "3a90127f102749d49dc707462fa1493c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_fd48f90d37264a068726b5bb831f0e92",
+ "IPY_MODEL_6f1fc0ddf59941af8a8de728f69f13a9",
+ "IPY_MODEL_cc579e347402418fb3a56a9721608c2f"
+ ],
+ "layout": "IPY_MODEL_7656a7c366d84f868cfbe1fe078005b8"
+ }
+ },
+ "fd48f90d37264a068726b5bb831f0e92": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_68cc9adc5ffd4bd7b7603f523c799bdb",
+ "placeholder": "",
+ "style": "IPY_MODEL_04bd3974f26d4fc286d011eaabb4a00f",
+ "value": "Downloading data: 100%"
+ }
+ },
+ "6f1fc0ddf59941af8a8de728f69f13a9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_16ca0d5112a84f7badd1ae6897871981",
+ "max": 1468812,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_905b964876754e62bb806d6d46dc2be2",
+ "value": 1468812
+ }
+ },
+ "cc579e347402418fb3a56a9721608c2f": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_fe5cb317415544f2a9e66936e90a292a",
+ "placeholder": "",
+ "style": "IPY_MODEL_43f04b940546468eaea59dcca38a00aa",
+ "value": " 1.47M/1.47M [00:01<00:00, 1.53MB/s]"
+ }
+ },
+ "7656a7c366d84f868cfbe1fe078005b8": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "68cc9adc5ffd4bd7b7603f523c799bdb": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "04bd3974f26d4fc286d011eaabb4a00f": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "16ca0d5112a84f7badd1ae6897871981": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "905b964876754e62bb806d6d46dc2be2": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "fe5cb317415544f2a9e66936e90a292a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "43f04b940546468eaea59dcca38a00aa": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "c85eb3cb9e364d65bf81da8d8695384d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_37705344130d4089845dfd50b66a2eca",
+ "IPY_MODEL_ec688e6024494c149700188621c7a28f",
+ "IPY_MODEL_a209766c96454174a5ca2571cc2821dc"
+ ],
+ "layout": "IPY_MODEL_38983df51690455397d3c3e95b512024"
+ }
+ },
+ "37705344130d4089845dfd50b66a2eca": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_8fe4d9d70fc34de19885c5b423cc635d",
+ "placeholder": "",
+ "style": "IPY_MODEL_05aba2b03a9a445b911b57a80f977e28",
+ "value": "Downloading data: 100%"
+ }
+ },
+ "ec688e6024494c149700188621c7a28f": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_d07eee50d63249ce8c888abbbd85d7f7",
+ "max": 489429,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_722edf64d41d420194d108bd34d1e6b4",
+ "value": 489429
+ }
+ },
+ "a209766c96454174a5ca2571cc2821dc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_7732563834ed46dd8e19e520674f6cac",
+ "placeholder": "",
+ "style": "IPY_MODEL_69be31cf3de941c4bf06a4e6359f387d",
+ "value": " 489k/489k [00:00<00:00, 475kB/s]"
+ }
+ },
+ "38983df51690455397d3c3e95b512024": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "8fe4d9d70fc34de19885c5b423cc635d": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "05aba2b03a9a445b911b57a80f977e28": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "d07eee50d63249ce8c888abbbd85d7f7": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "722edf64d41d420194d108bd34d1e6b4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "7732563834ed46dd8e19e520674f6cac": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "69be31cf3de941c4bf06a4e6359f387d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "59228c17fb39460aa14997c501c4c528": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_d39827e795f9429cb64945e1502a921e",
+ "IPY_MODEL_ada54ada913c4f4089eee58693114187",
+ "IPY_MODEL_b20d87aa3e3a4d92b341430f99b6b024"
+ ],
+ "layout": "IPY_MODEL_81305cbb90c14bc786948bb44dbf526c"
+ }
+ },
+ "d39827e795f9429cb64945e1502a921e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_3e91f992f5b54955ab60166a40a987e5",
+ "placeholder": "",
+ "style": "IPY_MODEL_f241423e2fa04e7892b6eb47d2e2dceb",
+ "value": "Generating train split: 100%"
+ }
+ },
+ "ada54ada913c4f4089eee58693114187": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_c663a31f4e6d4ac09c87af993cca9d42",
+ "max": 75750,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_1a2e6f5312a447098815e440921e8300",
+ "value": 75750
+ }
+ },
+ "b20d87aa3e3a4d92b341430f99b6b024": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_d68f6fe6a47a4092b0b723814cdf1cf9",
+ "placeholder": "",
+ "style": "IPY_MODEL_5a6861eb4b9146528fa37592cc731b78",
+ "value": " 75750/75750 [01:39<00:00, 1027.45 examples/s]"
+ }
+ },
+ "81305cbb90c14bc786948bb44dbf526c": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": "hidden",
+ "width": null
+ }
+ },
+ "3e91f992f5b54955ab60166a40a987e5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f241423e2fa04e7892b6eb47d2e2dceb": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "c663a31f4e6d4ac09c87af993cca9d42": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1a2e6f5312a447098815e440921e8300": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "d68f6fe6a47a4092b0b723814cdf1cf9": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "5a6861eb4b9146528fa37592cc731b78": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "0acd2ec0c2a64e2997230aee8d6b9ef3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_01f46ddb169f4502877985907b2e1e79",
+ "IPY_MODEL_1512e241a3d64139b425a3455d296dea",
+ "IPY_MODEL_4f037323ba2b42b98690f3d91334396d"
+ ],
+ "layout": "IPY_MODEL_aabbc7f40589421da8bbc8db5d60e77c"
+ }
+ },
+ "01f46ddb169f4502877985907b2e1e79": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_0fbacc4d6aba42e78c9860211748a856",
+ "placeholder": "",
+ "style": "IPY_MODEL_10f639dda72d4b7d90c62818a72228af",
+ "value": "Generating validation split: 100%"
+ }
+ },
+ "1512e241a3d64139b425a3455d296dea": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_5dd098e322264b2394134b40b7911cc1",
+ "max": 25250,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_1594e53020c44d53a034a61849f78dcc",
+ "value": 25250
+ }
+ },
+ "4f037323ba2b42b98690f3d91334396d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_5840ce91a0444924b6c4163e69ae27e4",
+ "placeholder": "",
+ "style": "IPY_MODEL_63a3932c41294fa29ef2c7f15778bed6",
+ "value": " 25250/25250 [01:15<00:00, 361.28 examples/s]"
+ }
+ },
+ "aabbc7f40589421da8bbc8db5d60e77c": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": "hidden",
+ "width": null
+ }
+ },
+ "0fbacc4d6aba42e78c9860211748a856": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "10f639dda72d4b7d90c62818a72228af": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "5dd098e322264b2394134b40b7911cc1": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1594e53020c44d53a034a61849f78dcc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "5840ce91a0444924b6c4163e69ae27e4": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "63a3932c41294fa29ef2c7f15778bed6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "dfae6990fa884f9fa6f4c87c066ee755": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_321a0e1e91b64e0dad1d477a2c43e23e",
+ "IPY_MODEL_32e54fe28f2f4cccaff447ce9ef7c06f",
+ "IPY_MODEL_2b14498cf8b0494e9e2e0811b46f54bb"
+ ],
+ "layout": "IPY_MODEL_674e9f6cc69449cfba4945405595d701"
+ }
+ },
+ "321a0e1e91b64e0dad1d477a2c43e23e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_220d07d0e921487ab80efddc00fc2266",
+ "placeholder": "",
+ "style": "IPY_MODEL_b9522ba2b7224356853cb6a7aad3ac9c",
+ "value": "100%"
+ }
+ },
+ "32e54fe28f2f4cccaff447ce9ef7c06f": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_34a8a32af56f4a1fb533c10cf9fb19df",
+ "max": 2,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d2124b2edfcd4a13ab43c80e8c47c370",
+ "value": 2
+ }
+ },
+ "2b14498cf8b0494e9e2e0811b46f54bb": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_df00071dc70c4876a173d05fd3d69cc5",
+ "placeholder": "",
+ "style": "IPY_MODEL_85b91e440a6c49ccabd656bf7f0aa460",
+ "value": " 2/2 [00:00<00:00, 1.13it/s]"
+ }
+ },
+ "674e9f6cc69449cfba4945405595d701": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "220d07d0e921487ab80efddc00fc2266": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "b9522ba2b7224356853cb6a7aad3ac9c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "34a8a32af56f4a1fb533c10cf9fb19df": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "d2124b2edfcd4a13ab43c80e8c47c370": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "df00071dc70c4876a173d05fd3d69cc5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "85b91e440a6c49ccabd656bf7f0aa460": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "38389509624645cf977798472b81886c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_7814affd5f7c4d37922f6729bd43e80e",
+ "IPY_MODEL_b50f4aafb0b04804996bc53c470abec7",
+ "IPY_MODEL_3858fb5541764508a41a4ad515b4a8ed"
+ ],
+ "layout": "IPY_MODEL_0c45f0e8448843eb924ae8c30f596b48"
+ }
+ },
+ "7814affd5f7c4d37922f6729bd43e80e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_c964271a79a54d15b592d9d112e30ee4",
+ "placeholder": "",
+ "style": "IPY_MODEL_9da2abd12ac948faab8e5eb33a4f2dcc",
+ "value": "Resolving data files: 100%"
+ }
+ },
+ "b50f4aafb0b04804996bc53c470abec7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_64be2fb177104b59b448e44f0b556132",
+ "max": 2000,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_1654fb11f5be495395999ad6a6c31ebb",
+ "value": 2000
+ }
+ },
+ "3858fb5541764508a41a4ad515b4a8ed": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_b9ba1b7fc4d44b5f953ee60193de735a",
+ "placeholder": "",
+ "style": "IPY_MODEL_2e6f253fc8e9450fad110fc47510c111",
+ "value": " 2000/2000 [00:00<00:00, 25298.90it/s]"
+ }
+ },
+ "0c45f0e8448843eb924ae8c30f596b48": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c964271a79a54d15b592d9d112e30ee4": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "9da2abd12ac948faab8e5eb33a4f2dcc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "64be2fb177104b59b448e44f0b556132": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1654fb11f5be495395999ad6a6c31ebb": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "b9ba1b7fc4d44b5f953ee60193de735a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "2e6f253fc8e9450fad110fc47510c111": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "e9657262a4714ecf8884f6354f32c6a3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_f503ed30c9ed4b1a84e3b3110f5671c8",
+ "IPY_MODEL_e089f32f5c0e40989a6f036ed8df44a3",
+ "IPY_MODEL_a5ca7aa6e2d1434ba84e75555806f79b"
+ ],
+ "layout": "IPY_MODEL_fc3dd9a26c044045949264eaa26da93f"
+ }
+ },
+ "f503ed30c9ed4b1a84e3b3110f5671c8": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_ae9cfa0636354fd3a663f80c022c0b38",
+ "placeholder": "",
+ "style": "IPY_MODEL_137a450619fc4630b7754d3539908288",
+ "value": "Resolving data files: 100%"
+ }
+ },
+ "e089f32f5c0e40989a6f036ed8df44a3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_c00d60b00d2f4d22be325af0cb10b234",
+ "max": 600,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_c9518d498ce54f2c9bafde7914ddc51b",
+ "value": 600
+ }
+ },
+ "a5ca7aa6e2d1434ba84e75555806f79b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_ec62031c9a6240069a52da7354173622",
+ "placeholder": "",
+ "style": "IPY_MODEL_4706d251c340427ebb468e4d8a333031",
+ "value": " 600/600 [00:00<00:00, 21124.67it/s]"
+ }
+ },
+ "fc3dd9a26c044045949264eaa26da93f": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "ae9cfa0636354fd3a663f80c022c0b38": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "137a450619fc4630b7754d3539908288": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "c00d60b00d2f4d22be325af0cb10b234": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c9518d498ce54f2c9bafde7914ddc51b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "ec62031c9a6240069a52da7354173622": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "4706d251c340427ebb468e4d8a333031": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "b799085f7ff84b4496a64587066d4645": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_b3324a67f18449faaec765ea2248a6d8",
+ "IPY_MODEL_bd77d6d98d0249b3bc99c94d46e7d7a1",
+ "IPY_MODEL_8060cd481cdd4229878a871e9ae411d5"
+ ],
+ "layout": "IPY_MODEL_5a2db2886a72478da3ec0b67f8e88c48"
+ }
+ },
+ "b3324a67f18449faaec765ea2248a6d8": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_a99e7f4228fb4a8e8589e30677ccde74",
+ "placeholder": "",
+ "style": "IPY_MODEL_c4f8b2b6f66c4108a12944505952c1ea",
+ "value": "Resolving data files: 100%"
+ }
+ },
+ "bd77d6d98d0249b3bc99c94d46e7d7a1": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_c069ba18441347d2875a8c366b23c3ff",
+ "max": 150,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_0cafd43406ac46c6b307adb6c36746df",
+ "value": 150
+ }
+ },
+ "8060cd481cdd4229878a871e9ae411d5": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_42a4cd25bb6a46a9a3b4fe4b6da96eab",
+ "placeholder": "",
+ "style": "IPY_MODEL_c02ba744e0414508bc0e24e015c5ef57",
+ "value": " 150/150 [00:00<00:00, 6579.78it/s]"
+ }
+ },
+ "5a2db2886a72478da3ec0b67f8e88c48": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "a99e7f4228fb4a8e8589e30677ccde74": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c4f8b2b6f66c4108a12944505952c1ea": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "c069ba18441347d2875a8c366b23c3ff": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "0cafd43406ac46c6b307adb6c36746df": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "42a4cd25bb6a46a9a3b4fe4b6da96eab": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c02ba744e0414508bc0e24e015c5ef57": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "017d3b681a1248eeaac5787621356258": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_83c008a35cb24407ae96ac46a6ca4c2a",
+ "IPY_MODEL_4895214231854f0ab17dc98a711772b3",
+ "IPY_MODEL_e34ff62351d8441593698b13d46bc18e"
+ ],
+ "layout": "IPY_MODEL_a66a957b6c15453c8a525bcaf2f2a805"
+ }
+ },
+ "83c008a35cb24407ae96ac46a6ca4c2a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_f4bc4c6164624dcab5f8fe95e7ad5a31",
+ "placeholder": "",
+ "style": "IPY_MODEL_4171150fd5394d4989498ce951839a96",
+ "value": "100%"
+ }
+ },
+ "4895214231854f0ab17dc98a711772b3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_4cfcbd9389734994997e4f0812f018c8",
+ "max": 3,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_6fd1258d4d374358ba261425b5260740",
+ "value": 3
+ }
+ },
+ "e34ff62351d8441593698b13d46bc18e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_a21b1102a4d842b394adba0a1e758a39",
+ "placeholder": "",
+ "style": "IPY_MODEL_27ab1ed3b5dd413991017b9fecc0903c",
+ "value": " 3/3 [00:00<00:00, 43.84it/s]"
+ }
+ },
+ "a66a957b6c15453c8a525bcaf2f2a805": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f4bc4c6164624dcab5f8fe95e7ad5a31": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "4171150fd5394d4989498ce951839a96": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "4cfcbd9389734994997e4f0812f018c8": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "6fd1258d4d374358ba261425b5260740": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "a21b1102a4d842b394adba0a1e758a39": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "27ab1ed3b5dd413991017b9fecc0903c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "a6f5330da3834963b3a47f9f9bb6a657": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_9a0cee1fc0644c768a1e7cfc7bb65469",
+ "IPY_MODEL_c303a871150b40cf9209fc3f6da02e7d",
+ "IPY_MODEL_9422c52eef304328a65551949c4eb982"
+ ],
+ "layout": "IPY_MODEL_7834179cb085439c96b265e34ca19309"
+ }
+ },
+ "9a0cee1fc0644c768a1e7cfc7bb65469": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_2e7a21ab2dfc4858bd7d43451b16a179",
+ "placeholder": "",
+ "style": "IPY_MODEL_9e3e30be4469468d8451dc6761d16bf6",
+ "value": "Downloading builder script: 100%"
+ }
+ },
+ "c303a871150b40cf9209fc3f6da02e7d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_343707c48e984b26a09c4adc25a510a5",
+ "max": 4203,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_444820c45f1241c59d0f7d1082e4c8d7",
+ "value": 4203
+ }
+ },
+ "9422c52eef304328a65551949c4eb982": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_1933b7094ac4474abc1f48605ca4e0c4",
+ "placeholder": "",
+ "style": "IPY_MODEL_db1683f3d8f44d4797dbc2a0f808bd2a",
+ "value": " 4.20k/4.20k [00:00<00:00, 293kB/s]"
+ }
+ },
+ "7834179cb085439c96b265e34ca19309": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "2e7a21ab2dfc4858bd7d43451b16a179": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "9e3e30be4469468d8451dc6761d16bf6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "343707c48e984b26a09c4adc25a510a5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "444820c45f1241c59d0f7d1082e4c8d7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "1933b7094ac4474abc1f48605ca4e0c4": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "db1683f3d8f44d4797dbc2a0f808bd2a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "40eaac98a5b642b28298028de5b0a8f0": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HBoxModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_9185dd3b67964f1191210a7b104c4a88",
+ "IPY_MODEL_5280d259979548ae9b302d3bfd06a1bd",
+ "IPY_MODEL_1aa0c864c04d42329974b10668dd5eb7"
+ ],
+ "layout": "IPY_MODEL_a2699e131c4448d5bcc890f1f0c22c63"
+ }
+ },
+ "9185dd3b67964f1191210a7b104c4a88": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_f40b643bece248458e3373e19f456325",
+ "placeholder": "",
+ "style": "IPY_MODEL_dcf80cee15294d12aa9f5f2648a95028",
+ "value": "Downloading builder script: 100%"
+ }
+ },
+ "5280d259979548ae9b302d3bfd06a1bd": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "FloatProgressModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_1d0d738bddde42df9c434fe77f5c0307",
+ "max": 6771,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_c8aeb58e12b8427bb547022d7076a38b",
+ "value": 6771
+ }
+ },
+ "1aa0c864c04d42329974b10668dd5eb7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "HTMLModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_04e02d2b23c149389db0cb519880b175",
+ "placeholder": "",
+ "style": "IPY_MODEL_0f67af90cad747b99865abef12dd16a9",
+ "value": " 6.77k/6.77k [00:00<00:00, 270kB/s]"
+ }
+ },
+ "a2699e131c4448d5bcc890f1f0c22c63": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f40b643bece248458e3373e19f456325": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "dcf80cee15294d12aa9f5f2648a95028": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "1d0d738bddde42df9c434fe77f5c0307": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c8aeb58e12b8427bb547022d7076a38b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "ProgressStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "04e02d2b23c149389db0cb519880b175": {
+ "model_module": "@jupyter-widgets/base",
+ "model_name": "LayoutModel",
+ "model_module_version": "1.2.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "0f67af90cad747b99865abef12dd16a9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_name": "DescriptionStyleModel",
+ "model_module_version": "1.5.0",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ }
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
\ No newline at end of file
diff --git a/machine-learning/finetuning-vit-image-classification/README.md b/machine-learning/finetuning-vit-image-classification/README.md
new file mode 100644
index 00000000..faa5b872
--- /dev/null
+++ b/machine-learning/finetuning-vit-image-classification/README.md
@@ -0,0 +1 @@
+# [How to Fine Tune ViT for Image Classification using Huggingface Transformers in Python](https://www.thepythoncode.com/article/finetune-vit-for-image-classification-using-transformers-in-python)
\ No newline at end of file
diff --git a/machine-learning/finetuning-vit-image-classification/finetuning_vit_for_image_classification.py b/machine-learning/finetuning-vit-image-classification/finetuning_vit_for_image_classification.py
new file mode 100644
index 00000000..32328a9c
--- /dev/null
+++ b/machine-learning/finetuning-vit-image-classification/finetuning_vit_for_image_classification.py
@@ -0,0 +1,446 @@
+# %%
+!pip install transformers evaluate datasets
+
+# %%
+import requests
+import torch
+from PIL import Image
+from transformers import *
+from tqdm import tqdm
+
+device = "cuda" if torch.cuda.is_available() else "cpu"
+
+# %%
+# the model name
+model_name = "google/vit-base-patch16-224"
+# load the image processor
+image_processor = ViTImageProcessor.from_pretrained(model_name)
+# loading the pre-trained model
+model = ViTForImageClassification.from_pretrained(model_name).to(device)
+
+# %%
+import urllib.parse as parse
+import os
+
+# a function to determine whether a string is a URL or not
+def is_url(https://github.com/string):
+ try:
+ result = parse.urlparse(string)
+ return all([result.scheme, result.netloc, result.path])
+ except:
+ return False
+
+# a function to load an image
+def load_image(image_path):
+ if is_url(https://github.com/image_path):
+ return Image.open(requests.get(image_path, stream=True).raw)
+ elif os.path.exists(image_path):
+ return Image.open(image_path)
+
+# %%
+def get_prediction(model, url_or_path):
+ # load the image
+ img = load_image(url_or_path)
+ # preprocessing the image
+ pixel_values = image_processor(img, return_tensors="pt")["pixel_values"].to(device)
+ # perform inference
+ output = model(pixel_values)
+ # get the label id and return the class name
+ return model.config.id2label[int(output.logits.softmax(dim=1).argmax())]
+
+# %%
+get_prediction(model, "http://images.cocodataset.org/test-stuff2017/000000000128.jpg")
+
+# %% [markdown]
+# # Loading our Dataset
+
+# %%
+from datasets import load_dataset
+
+# download & load the dataset
+ds = load_dataset("food101")
+
+# %% [markdown]
+# ## Loading a Custom Dataset using `ImageFolder`
+# Run the three below cells to load a custom dataset (that's not in the Hub) using `ImageFolder`
+
+# %%
+import requests
+from tqdm import tqdm
+
+def get_file(url):
+ response = requests.get(url, stream=True)
+ total_size = int(response.headers.get('content-length', 0))
+ filename = None
+ content_disposition = response.headers.get('content-disposition')
+ if content_disposition:
+ parts = content_disposition.split(';')
+ for part in parts:
+ if 'filename' in part:
+ filename = part.split('=')[1].strip('"')
+ if not filename:
+ filename = os.path.basename(url)
+ block_size = 1024 # 1 Kibibyte
+ tqdm_bar = tqdm(total=total_size, unit='iB', unit_scale=True)
+ with open(filename, 'wb') as file:
+ for data in response.iter_content(block_size):
+ tqdm_bar.update(len(data))
+ file.write(data)
+ tqdm_bar.close()
+ print(f"Downloaded {filename} ({total_size} bytes)")
+ return filename
+
+# %%
+import zipfile
+import os
+
+def download_and_extract_dataset():
+ # dataset from https://github.com/udacity/dermatologist-ai
+ # 5.3GB
+ train_url = "https://s3-us-west-1.amazonaws.com/udacity-dlnfd/datasets/skin-cancer/train.zip"
+ # 824.5MB
+ valid_url = "https://s3-us-west-1.amazonaws.com/udacity-dlnfd/datasets/skin-cancer/valid.zip"
+ # 5.1GB
+ test_url = "https://s3-us-west-1.amazonaws.com/udacity-dlnfd/datasets/skin-cancer/test.zip"
+ for i, download_link in enumerate([valid_url, train_url, test_url]):
+ data_dir = get_file(download_link)
+ print("Extracting", download_link)
+ with zipfile.ZipFile(data_dir, "r") as z:
+ z.extractall("data")
+ # remove the temp file
+ os.remove(data_dir)
+
+# comment the below line if you already downloaded the dataset
+download_and_extract_dataset()
+
+# %%
+from datasets import load_dataset
+
+# load the custom dataset
+ds = load_dataset("imagefolder", data_dir="data")
+
+# %% [markdown]
+# # Exploring the Data
+
+# %%
+ds
+
+# %%
+labels = ds["train"].features["label"]
+labels
+
+# %%
+labels.int2str(ds["train"][532]["label"])
+
+# %%
+import random
+import matplotlib.pyplot as plt
+
+def show_image_grid(dataset, split, grid_size=(4,4)):
+ # Select random images from the given split
+ indices = random.sample(range(len(dataset[split])), grid_size[0]*grid_size[1])
+ images = [dataset[split][i]["image"] for i in indices]
+ labels = [dataset[split][i]["label"] for i in indices]
+
+ # Display the images in a grid
+ fig, axes = plt.subplots(nrows=grid_size[0], ncols=grid_size[1], figsize=(8,8))
+ for i, ax in enumerate(axes.flat):
+ ax.imshow(images[i])
+ ax.axis('off')
+ ax.set_title(ds["train"].features["label"].int2str(labels[i]))
+
+ plt.show()
+
+# %%
+show_image_grid(ds, "train")
+
+# %% [markdown]
+# # Preprocessing the Data
+
+# %%
+def transform(examples):
+ # convert all images to RGB format, then preprocessing it
+ # using our image processor
+ inputs = image_processor([img.convert("RGB") for img in examples["image"]], return_tensors="pt")
+ # we also shouldn't forget about the labels
+ inputs["labels"] = examples["label"]
+ return inputs
+
+# %%
+# use the with_transform() method to apply the transform to the dataset on the fly during training
+dataset = ds.with_transform(transform)
+
+# %%
+for item in dataset["train"]:
+ print(item["pixel_values"].shape)
+ print(item["labels"])
+ break
+
+# %%
+# extract the labels for our dataset
+labels = ds["train"].features["label"].names
+labels
+
+# %%
+import torch
+
+def collate_fn(batch):
+ return {
+ "pixel_values": torch.stack([x["pixel_values"] for x in batch]),
+ "labels": torch.tensor([x["labels"] for x in batch]),
+ }
+
+# %% [markdown]
+# # Defining the Metrics
+
+# %%
+from evaluate import load
+import numpy as np
+
+# load the accuracy and f1 metrics from the evaluate module
+accuracy = load("accuracy")
+f1 = load("f1")
+
+def compute_metrics(eval_pred):
+ # compute the accuracy and f1 scores & return them
+ accuracy_score = accuracy.compute(predictions=np.argmax(eval_pred.predictions, axis=1), references=eval_pred.label_ids)
+ f1_score = f1.compute(predictions=np.argmax(eval_pred.predictions, axis=1), references=eval_pred.label_ids, average="macro")
+ return {**accuracy_score, **f1_score}
+
+# %% [markdown]
+# # Training the Model
+
+# %%
+# load the ViT model
+model = ViTForImageClassification.from_pretrained(
+ model_name,
+ num_labels=len(labels),
+ id2label={str(i): c for i, c in enumerate(labels)},
+ label2id={c: str(i) for i, c in enumerate(labels)},
+ ignore_mismatched_sizes=True,
+)
+
+# %%
+from transformers import TrainingArguments
+
+training_args = TrainingArguments(
+ output_dir="./vit-base-food", # output directory
+ # output_dir="./vit-base-skin-cancer",
+ per_device_train_batch_size=32, # batch size per device during training
+ evaluation_strategy="steps", # evaluation strategy to adopt during training
+ num_train_epochs=3, # total number of training epochs
+ # fp16=True, # use mixed precision
+ save_steps=1000, # number of update steps before saving checkpoint
+ eval_steps=1000, # number of update steps before evaluating
+ logging_steps=1000, # number of update steps before logging
+ # save_steps=50,
+ # eval_steps=50,
+ # logging_steps=50,
+ save_total_limit=2, # limit the total amount of checkpoints on disk
+ remove_unused_columns=False, # remove unused columns from the dataset
+ push_to_hub=False, # do not push the model to the hub
+ report_to='tensorboard', # report metrics to tensorboard
+ load_best_model_at_end=True, # load the best model at the end of training
+)
+
+
+# %%
+from transformers import Trainer
+
+trainer = Trainer(
+ model=model, # the instantiated 🤗 Transformers model to be trained
+ args=training_args, # training arguments, defined above
+ data_collator=collate_fn, # the data collator that will be used for batching
+ compute_metrics=compute_metrics, # the metrics function that will be used for evaluation
+ train_dataset=dataset["train"], # training dataset
+ eval_dataset=dataset["validation"], # evaluation dataset
+ tokenizer=image_processor, # the processor that will be used for preprocessing the images
+)
+
+# %%
+# start training
+trainer.train()
+
+# %%
+# trainer.evaluate(dataset["test"])
+trainer.evaluate()
+
+# %%
+# start tensorboard
+# %load_ext tensorboard
+%reload_ext tensorboard
+%tensorboard --logdir ./vit-base-food/runs
+
+# %% [markdown]
+# ## Alternatively: Training using PyTorch Loop
+# Run the two below cells to fine-tune using a regular PyTorch loop if you want.
+
+# %%
+# Training loop
+from torch.utils.tensorboard import SummaryWriter
+from torch.optim import AdamW
+from torch.utils.data import DataLoader
+
+batch_size = 32
+
+train_dataset_loader = DataLoader(dataset["train"], collate_fn=collate_fn, batch_size=batch_size, shuffle=True)
+valid_dataset_loader = DataLoader(dataset["validation"], collate_fn=collate_fn, batch_size=batch_size, shuffle=True)
+
+# define the optimizer
+optimizer = AdamW(model.parameters(), lr=1e-5)
+
+log_dir = "./image-classification/tensorboard"
+summary_writer = SummaryWriter(log_dir=log_dir)
+
+num_epochs = 3
+model = model.to(device)
+# print some statistics before training
+# number of training steps
+n_train_steps = num_epochs * len(train_dataset_loader)
+# number of validation steps
+n_valid_steps = len(valid_dataset_loader)
+# current training step
+current_step = 0
+# logging, eval & save steps
+save_steps = 1000
+
+def compute_metrics(eval_pred):
+ accuracy_score = accuracy.compute(predictions=eval_pred.predictions, references=eval_pred.label_ids)
+ f1_score = f1.compute(predictions=eval_pred.predictions, references=eval_pred.label_ids, average="macro")
+ return {**accuracy_score, **f1_score}
+
+# %%
+for epoch in range(num_epochs):
+ # set the model to training mode
+ model.train()
+ # initialize the training loss
+ train_loss = 0
+ # initialize the progress bar
+ progress_bar = tqdm(range(current_step, n_train_steps), "Training", dynamic_ncols=True, ncols=80)
+ for batch in train_dataset_loader:
+ if (current_step+1) % save_steps == 0:
+ ### evaluation code ###
+ # evaluate on the validation set
+ # if the current step is a multiple of the save steps
+ print()
+ print(f"Validation at step {current_step}...")
+ print()
+ # set the model to evaluation mode
+ model.eval()
+ # initialize our lists that store the predictions and the labels
+ predictions, labels = [], []
+ # initialize the validation loss
+ valid_loss = 0
+ for batch in valid_dataset_loader:
+ # get the batch
+ pixel_values = batch["pixel_values"].to(device)
+ label_ids = batch["labels"].to(device)
+ # forward pass
+ outputs = model(pixel_values=pixel_values, labels=label_ids)
+ # get the loss
+ loss = outputs.loss
+ valid_loss += loss.item()
+ # free the GPU memory
+ logits = outputs.logits.detach().cpu()
+ # add the predictions to the list
+ predictions.extend(logits.argmax(dim=-1).tolist())
+ # add the labels to the list
+ labels.extend(label_ids.tolist())
+ # make the EvalPrediction object that the compute_metrics function expects
+ eval_prediction = EvalPrediction(predictions=predictions, label_ids=labels)
+ # compute the metrics
+ metrics = compute_metrics(eval_prediction)
+ # print the stats
+ print()
+ print(f"Epoch: {epoch}, Step: {current_step}, Train Loss: {train_loss / save_steps:.4f}, " +
+ f"Valid Loss: {valid_loss / n_valid_steps:.4f}, Accuracy: {metrics['accuracy']}, " +
+ f"F1 Score: {metrics['f1']}")
+ print()
+ # log the metrics
+ summary_writer.add_scalar("valid_loss", valid_loss / n_valid_steps, global_step=current_step)
+ summary_writer.add_scalar("accuracy", metrics["accuracy"], global_step=current_step)
+ summary_writer.add_scalar("f1", metrics["f1"], global_step=current_step)
+ # save the model
+ model.save_pretrained(f"./vit-base-food/checkpoint-{current_step}")
+ image_processor.save_pretrained(f"./vit-base-food/checkpoint-{current_step}")
+ # get the model back to train mode
+ model.train()
+ # reset the train and valid loss
+ train_loss, valid_loss = 0, 0
+ ### training code below ###
+ # get the batch & convert to tensor
+ pixel_values = batch["pixel_values"].to(device)
+ labels = batch["labels"].to(device)
+ # forward pass
+ outputs = model(pixel_values=pixel_values, labels=labels)
+ # get the loss
+ loss = outputs.loss
+ # backward pass
+ loss.backward()
+ # update the weights
+ optimizer.step()
+ # zero the gradients
+ optimizer.zero_grad()
+ # log the loss
+ loss_v = loss.item()
+ train_loss += loss_v
+ # increment the step
+ current_step += 1
+ progress_bar.update(1)
+ # log the training loss
+ summary_writer.add_scalar("train_loss", loss_v, global_step=current_step)
+
+
+# %% [markdown]
+# # Performing Inference
+
+# %%
+# load the best model, change the checkpoint number to the best checkpoint
+# if the last checkpoint is the best, then ignore this cell
+best_checkpoint = 7000
+# best_checkpoint = 150
+model = ViTForImageClassification.from_pretrained(f"./vit-base-food/checkpoint-{best_checkpoint}").to(device)
+# model = ViTForImageClassification.from_pretrained(f"./vit-base-skin-cancer/checkpoint-{best_checkpoint}").to(device)
+
+# %%
+get_prediction(model, "https://images.pexels.com/photos/858496/pexels-photo-858496.jpeg?auto=compress&cs=tinysrgb&w=600&lazy=load")
+
+# %%
+def get_prediction_probs(model, url_or_path, num_classes=3):
+ # load the image
+ img = load_image(url_or_path)
+ # preprocessing the image
+ pixel_values = image_processor(img, return_tensors="pt")["pixel_values"].to(device)
+ # perform inference
+ output = model(pixel_values)
+ # get the top k classes and probabilities
+ probs, indices = torch.topk(output.logits.softmax(dim=1), k=num_classes)
+ # get the class labels
+ id2label = model.config.id2label
+ classes = [id2label[idx.item()] for idx in indices[0]]
+ # convert the probabilities to a list
+ probs = probs.squeeze().tolist()
+ # create a dictionary with the class names and probabilities
+ results = dict(zip(classes, probs))
+ return results
+
+# %%
+# example 1
+get_prediction_probs(model, "https://images.pexels.com/photos/406152/pexels-photo-406152.jpeg?auto=compress&cs=tinysrgb&w=600")
+
+# %%
+# example 2
+get_prediction_probs(model, "https://images.pexels.com/photos/920220/pexels-photo-920220.jpeg?auto=compress&cs=tinysrgb&w=600")
+
+# %%
+# example 3
+get_prediction_probs(model, "https://images.pexels.com/photos/3338681/pexels-photo-3338681.jpeg?auto=compress&cs=tinysrgb&w=600")
+
+# %%
+# example 4
+get_prediction_probs(model, "https://images.pexels.com/photos/806457/pexels-photo-806457.jpeg?auto=compress&cs=tinysrgb&w=600", num_classes=10)
+
+# %%
+get_prediction_probs(model, "https://images.pexels.com/photos/1624487/pexels-photo-1624487.jpeg?auto=compress&cs=tinysrgb&w=600")
+
+
diff --git a/machine-learning/finetuning-vit-image-classification/requirements.txt b/machine-learning/finetuning-vit-image-classification/requirements.txt
new file mode 100644
index 00000000..f39fc918
--- /dev/null
+++ b/machine-learning/finetuning-vit-image-classification/requirements.txt
@@ -0,0 +1,4 @@
+torch
+transformers
+evaluate
+datasets
diff --git a/machine-learning/hog-feature-extraction/hog.ipynb b/machine-learning/hog-feature-extraction/hog.ipynb
index 0b6c2852..8158380a 100644
--- a/machine-learning/hog-feature-extraction/hog.ipynb
+++ b/machine-learning/hog-feature-extraction/hog.ipynb
@@ -69,7 +69,7 @@
"source": [
"#creating hog features\n",
"fd, hog_image = hog(resized_img, orientations=9, pixels_per_cell=(8, 8),\n",
- " \tcells_per_block=(2, 2), visualize=True, multichannel=True)\n",
+ " \tcells_per_block=(2, 2), visualize=True, channel_axis=2)\n",
"print(fd.shape)\n",
"plt.axis(\"off\")\n",
"plt.imshow(hog_image, cmap=\"gray\")"
@@ -94,4 +94,4 @@
"source": []
}
]
-}
\ No newline at end of file
+}
diff --git a/machine-learning/hog-feature-extraction/hog.py b/machine-learning/hog-feature-extraction/hog.py
index be7c0fed..1adb2acf 100644
--- a/machine-learning/hog-feature-extraction/hog.py
+++ b/machine-learning/hog-feature-extraction/hog.py
@@ -19,7 +19,7 @@
#creating hog features
fd, hog_image = hog(resized_img, orientations=9, pixels_per_cell=(8, 8),
- cells_per_block=(2, 2), visualize=True, multichannel=True)
+ cells_per_block=(2, 2), visualize=True, channel_axis=-1)
print(fd.shape)
print(hog_image.shape)
plt.axis("off")
@@ -28,4 +28,4 @@
# save the images
plt.imsave("resized_img.jpg", resized_img)
-plt.imsave("hog_image.jpg", hog_image, cmap="gray")
\ No newline at end of file
+plt.imsave("hog_image.jpg", hog_image, cmap="gray")
diff --git a/machine-learning/kmeans-image-segmentation/refactored_kmeans_segmentation.py b/machine-learning/kmeans-image-segmentation/refactored_kmeans_segmentation.py
new file mode 100644
index 00000000..639f5307
--- /dev/null
+++ b/machine-learning/kmeans-image-segmentation/refactored_kmeans_segmentation.py
@@ -0,0 +1,55 @@
+import cv2
+import numpy as np
+import matplotlib.pyplot as plt
+import sys
+
+def read_image(file_path):
+ """Read the image and convert it to RGB."""
+ image = cv2.imread(file_path)
+ return cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
+
+def preprocess_image(image):
+ """Reshape the image to a 2D array of pixels and 3 color values (RGB) and convert to float."""
+ pixel_values = image.reshape((-1, 3))
+ return np.float32(pixel_values)
+
+def perform_kmeans_clustering(pixel_values, k=3):
+ """Perform k-means clustering on the pixel values."""
+ criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 100, 0.2)
+ compactness, labels, centers = cv2.kmeans(pixel_values, k, None, criteria, 10, cv2.KMEANS_RANDOM_CENTERS)
+ return compactness, labels, np.uint8(centers)
+
+def create_segmented_image(pixel_values, labels, centers):
+ """Create a segmented image using the cluster centroids."""
+ segmented_image = centers[labels.flatten()]
+ return segmented_image.reshape(image.shape)
+
+def create_masked_image(image, labels, cluster_to_disable):
+ """Create a masked image by disabling a specific cluster."""
+ masked_image = np.copy(image).reshape((-1, 3))
+ masked_image[labels.flatten() == cluster_to_disable] = [0, 0, 0]
+ return masked_image.reshape(image.shape)
+
+def display_image(image):
+ """Display the image using matplotlib."""
+ plt.imshow(image)
+ plt.show()
+
+if __name__ == "__main__":
+ image_path = sys.argv[1]
+ k = int(sys.argv[2])
+ # read the image
+ image = read_image(image_path)
+ # preprocess the image
+ pixel_values = preprocess_image(image)
+ # compactness is the sum of squared distance from each point to their corresponding centers
+ compactness, labels, centers = perform_kmeans_clustering(pixel_values, k)
+ # create the segmented image
+ segmented_image = create_segmented_image(pixel_values, labels, centers)
+ # display the image
+ display_image(segmented_image)
+ # disable only the cluster number 2 (turn the pixel into black)
+ cluster_to_disable = 2
+ # create the masked image
+ masked_image = create_masked_image(image, labels, cluster_to_disable)
+ display_image(masked_image)
diff --git a/machine-learning/nlp/bleu-score/README.md b/machine-learning/nlp/bleu-score/README.md
new file mode 100644
index 00000000..00804391
--- /dev/null
+++ b/machine-learning/nlp/bleu-score/README.md
@@ -0,0 +1 @@
+# [How to Calculate the BLEU Score in Python](https://www.thepythoncode.com/article/bleu-score-in-python)
\ No newline at end of file
diff --git a/machine-learning/nlp/bleu-score/bleu_score.py b/machine-learning/nlp/bleu-score/bleu_score.py
new file mode 100644
index 00000000..e80cfa11
--- /dev/null
+++ b/machine-learning/nlp/bleu-score/bleu_score.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+"""BLEU Score.ipynb
+
+Automatically generated by Colaboratory.
+
+Original file is located at
+ https://colab.research.google.com/drive/1dSsETrstp-EEGMX46nc-m_jw00nzkaNZ
+"""
+
+from nltk.translate.bleu_score import sentence_bleu, corpus_bleu
+
+# Prepare the reference sentences
+reference1 = ['I', 'love', 'eating', 'ice', 'cream']
+reference2 = ['I', 'enjoy', 'eating', 'ice', 'cream']
+
+# Prepare the candidate sentence
+translation = ['I', 'love', 'eating', 'ice', 'cream']
+
+# Calculate the BLEU score for a single sentence
+bleu_score = sentence_bleu([reference1, reference2], translation)
+print("BLEU Score: ", bleu_score)
+
+# Prepare the reference sentences and candidate sentences for multiple translations
+references = [['I', 'love', 'eating', 'ice', 'cream'], ['He', 'enjoys', 'eating', 'cake']]
+translations = [['I', 'love', 'eating', 'ice', 'cream'], ['He', 'likes', 'to', 'eat', 'cake']]
+
+# Create a list of reference lists
+references_list = [[ref] for ref in references]
+
+# Calculate BLEU score for the entire corpus
+bleu_score_corpus = corpus_bleu(references_list, translations)
+print("Corpus BLEU Score: ", bleu_score_corpus)
+
diff --git a/machine-learning/nlp/bleu-score/requirements.txt b/machine-learning/nlp/bleu-score/requirements.txt
new file mode 100644
index 00000000..13b03ed0
--- /dev/null
+++ b/machine-learning/nlp/bleu-score/requirements.txt
@@ -0,0 +1 @@
+ntlk
\ No newline at end of file
diff --git a/machine-learning/nlp/rouge-score/README.md b/machine-learning/nlp/rouge-score/README.md
new file mode 100644
index 00000000..21d86a14
--- /dev/null
+++ b/machine-learning/nlp/rouge-score/README.md
@@ -0,0 +1 @@
+# [How to Calculate ROUGE Score in Python](https://www.thepythoncode.com/article/calculate-rouge-score-in-python)
\ No newline at end of file
diff --git a/machine-learning/nlp/rouge-score/requirements.txt b/machine-learning/nlp/rouge-score/requirements.txt
new file mode 100644
index 00000000..7f26c102
--- /dev/null
+++ b/machine-learning/nlp/rouge-score/requirements.txt
@@ -0,0 +1 @@
+rouge-score
\ No newline at end of file
diff --git a/machine-learning/nlp/rouge-score/rouge.py b/machine-learning/nlp/rouge-score/rouge.py
new file mode 100644
index 00000000..4b00c4c7
--- /dev/null
+++ b/machine-learning/nlp/rouge-score/rouge.py
@@ -0,0 +1,22 @@
+from rouge_score import rouge_scorer
+
+scorer = rouge_scorer.RougeScorer(['rouge1', 'rouge2', 'rougeL'], use_stemmer=True)
+
+# Single reference
+candidate_summary = "the cat was found under the bed"
+reference_summary = "the cat was under the bed"
+scores = scorer.score(reference_summary, candidate_summary)
+for key in scores:
+ print(f'{key}: {scores[key]}')
+
+# Multiple references
+candidate_summary = "the cat was found under the bed"
+reference_summaries = ["the cat was under the bed", "found a cat under the bed"]
+scores = {key: [] for key in ['rouge1', 'rouge2', 'rougeL']}
+for ref in reference_summaries:
+ temp_scores = scorer.score(ref, candidate_summary)
+ for key in temp_scores:
+ scores[key].append(temp_scores[key])
+
+for key in scores:
+ print(f'{key}:\n{scores[key]}')
\ No newline at end of file
diff --git a/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb
new file mode 100644
index 00000000..952a0f75
--- /dev/null
+++ b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb
@@ -0,0 +1,1010 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "E2Cu87RMWw-P"
+ },
+ "source": [
+ "### 1. Install and import the required packages"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "4Px8aik4VaOY"
+ },
+ "outputs": [],
+ "source": [
+ "!pip install transformers sentence-transformers datasets"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "RUsTXFi1bNRI"
+ },
+ "outputs": [],
+ "source": [
+ "from datasets import load_dataset\n",
+ "from sentence_transformers import SentenceTransformer, models\n",
+ "from transformers import BertTokenizer\n",
+ "from transformers import get_linear_schedule_with_warmup\n",
+ "import torch\n",
+ "from torch.optim import AdamW\n",
+ "from torch.utils.data import DataLoader\n",
+ "from tqdm import tqdm\n",
+ "import time\n",
+ "import datetime\n",
+ "import random\n",
+ "import numpy as np\n",
+ "import pandas as pd"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "zMdAdDQbzWmC"
+ },
+ "source": [
+ "### 2. Use Google Colab's GPU for training"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "wB7TNNSrziMu",
+ "outputId": "53715022-a7af-439f-f978-637799295f85"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "There are 1 GPU(s) available.\n",
+ "We will use the GPU: Tesla T4\n"
+ ]
+ }
+ ],
+ "source": [
+ "if torch.cuda.is_available(): \n",
+ " device = torch.device(\"cuda\")\n",
+ " print(f'There are {torch.cuda.device_count()} GPU(s) available.')\n",
+ " print('We will use the GPU:', torch.cuda.get_device_name(0))\n",
+ "else:\n",
+ " print('No GPU available, using the CPU instead.')\n",
+ " device = torch.device(\"cpu\")"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "kQ1Eel-3W-5b"
+ },
+ "source": [
+ "### **3.** Load and preview the Semantic Textual Similarity Benchmark (STSB) dataset"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "mgwlDDjtWM71"
+ },
+ "outputs": [],
+ "source": [
+ "# Load the English version of the STSB dataset\n",
+ "dataset = load_dataset(\"stsb_multi_mt\", \"en\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "BtUWgi0h_DjR",
+ "outputId": "bcd36c5b-7a37-4c8c-8bb5-8a46e7ed4d5c"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "DatasetDict({\n",
+ " train: Dataset({\n",
+ " features: ['sentence1', 'sentence2', 'similarity_score'],\n",
+ " num_rows: 5749\n",
+ " })\n",
+ " test: Dataset({\n",
+ " features: ['sentence1', 'sentence2', 'similarity_score'],\n",
+ " num_rows: 1379\n",
+ " })\n",
+ " dev: Dataset({\n",
+ " features: ['sentence1', 'sentence2', 'similarity_score'],\n",
+ " num_rows: 1500\n",
+ " })\n",
+ "})\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(dataset)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "FEHZl4WeWv6r",
+ "outputId": "69885fad-1282-48e8-ab5e-29da8c548a85"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "A sample from the STSB dataset's training split:\n",
+ "{'sentence1': 'A man is slicing potatoes.', 'sentence2': 'A woman is peeling potato.', 'similarity_score': 2.200000047683716}\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(\"A sample from the STSB dataset's training split:\")\n",
+ "print(dataset['train'][98])"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "OjMKsIuxYv6D"
+ },
+ "source": [
+ "### **4.** Define the dataset loader class\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "f2Hc2uwabgJa"
+ },
+ "outputs": [],
+ "source": [
+ "# Instantiate the BERT tokenizer\n",
+ "# You can use larger variants of the model, here we're using the base model\n",
+ "tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "uEI1p5-SaM8t"
+ },
+ "outputs": [],
+ "source": [
+ "class STSBDataset(torch.utils.data.Dataset):\n",
+ "\n",
+ " def __init__(self, dataset):\n",
+ "\n",
+ " # Normalize the similarity scores in the dataset\n",
+ " similarity_scores = [i['similarity_score'] for i in dataset]\n",
+ " self.normalized_similarity_scores = [i/5.0 for i in similarity_scores]\n",
+ " self.first_sentences = [i['sentence1'] for i in dataset]\n",
+ " self.second_sentences = [i['sentence2'] for i in dataset]\n",
+ " self.concatenated_sentences = [[str(x), str(y)] for x,y in zip(self.first_sentences, self.second_sentences)]\n",
+ "\n",
+ " def __len__(self):\n",
+ "\n",
+ " return len(self.concatenated_sentences)\n",
+ "\n",
+ " def get_batch_labels(self, idx):\n",
+ "\n",
+ " return torch.tensor(self.normalized_similarity_scores[idx])\n",
+ "\n",
+ " def get_batch_texts(self, idx):\n",
+ "\n",
+ " return tokenizer(self.concatenated_sentences[idx], padding='max_length', max_length=128, truncation=True, return_tensors=\"pt\")\n",
+ "\n",
+ " def __getitem__(self, idx):\n",
+ "\n",
+ " batch_texts = self.get_batch_texts(idx)\n",
+ " batch_y = self.get_batch_labels(idx)\n",
+ "\n",
+ " return batch_texts, batch_y\n",
+ "\n",
+ "\n",
+ "def collate_fn(texts):\n",
+ "\n",
+ " input_ids = texts['input_ids']\n",
+ " attention_masks = texts['attention_mask']\n",
+ "\n",
+ " features = [{'input_ids': input_id, 'attention_mask': attention_mask}\n",
+ " for input_id, attention_mask in zip(input_ids, attention_masks)]\n",
+ "\n",
+ " return features"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "w9ICUkr20JbP"
+ },
+ "source": [
+ "### 5. Define the model class based on BERT"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "EgTYEHC8b7kb"
+ },
+ "outputs": [],
+ "source": [
+ "class BertForSTS(torch.nn.Module):\n",
+ "\n",
+ " def __init__(self):\n",
+ "\n",
+ " super(BertForSTS, self).__init__()\n",
+ " self.bert = models.Transformer('bert-base-uncased', max_seq_length=128)\n",
+ " self.pooling_layer = models.Pooling(self.bert.get_word_embedding_dimension())\n",
+ " self.sts_bert = SentenceTransformer(modules=[self.bert, self.pooling_layer])\n",
+ "\n",
+ " def forward(self, input_data):\n",
+ " output = self.sts_bert(input_data)['sentence_embedding']\n",
+ " return output"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "yMNCebmb4Hlt"
+ },
+ "outputs": [],
+ "source": [
+ "# Instantiate the model and move it to GPU\n",
+ "model = BertForSTS()\n",
+ "model.to(device)"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "IXqIA_D_2nYC"
+ },
+ "source": [
+ "### 6. Define the Cosine Similarity loss function"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "ty7Q630Ob96f"
+ },
+ "outputs": [],
+ "source": [
+ "class CosineSimilarityLoss(torch.nn.Module):\n",
+ "\n",
+ " def __init__(self, loss_fn=torch.nn.MSELoss(), transform_fn=torch.nn.Identity()):\n",
+ " super(CosineSimilarityLoss, self).__init__()\n",
+ " self.loss_fn = loss_fn\n",
+ " self.transform_fn = transform_fn\n",
+ " self.cos_similarity = torch.nn.CosineSimilarity(dim=1)\n",
+ "\n",
+ " def forward(self, inputs, labels):\n",
+ " emb_1 = torch.stack([inp[0] for inp in inputs])\n",
+ " emb_2 = torch.stack([inp[1] for inp in inputs])\n",
+ " outputs = self.transform_fn(self.cos_similarity(emb_1, emb_2))\n",
+ " return self.loss_fn(outputs, labels.squeeze())"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "B688H4qY26ZG"
+ },
+ "source": [
+ "### 7. Prepare the training and validation data split"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "PrQvEJgC4VeB",
+ "outputId": "2ce3100a-727a-4909-9481-7d6ff0464c12"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "5,749 training samples\n",
+ "1,500 validation samples\n"
+ ]
+ }
+ ],
+ "source": [
+ "train_ds = STSBDataset(dataset['train'])\n",
+ "val_ds = STSBDataset(dataset['dev'])\n",
+ "\n",
+ "# Create a 90-10 train-validation split.\n",
+ "train_size = len(train_ds)\n",
+ "val_size = len(val_ds)\n",
+ "\n",
+ "print('{:>5,} training samples'.format(train_size))\n",
+ "print('{:>5,} validation samples'.format(val_size))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "eUPorlzExygm"
+ },
+ "outputs": [],
+ "source": [
+ "batch_size = 8\n",
+ "\n",
+ "train_dataloader = DataLoader(\n",
+ " train_ds, # The training samples.\n",
+ " num_workers = 4,\n",
+ " batch_size = batch_size, # Use this batch size.\n",
+ " shuffle=True # Select samples randomly for each batch\n",
+ " )\n",
+ "\n",
+ "validation_dataloader = DataLoader(\n",
+ " val_ds,\n",
+ " num_workers = 4,\n",
+ " batch_size = batch_size # Use the same batch size\n",
+ " )"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "5avkJtGn2-al"
+ },
+ "source": [
+ "### 8. Define the Optimizer and Scheduler"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "lB_HcVbl3EZw"
+ },
+ "outputs": [],
+ "source": [
+ "optimizer = AdamW(model.parameters(),\n",
+ " lr = 1e-6)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "RVT3cA_-3NPP"
+ },
+ "outputs": [],
+ "source": [
+ "epochs = 8\n",
+ "\n",
+ "# Total number of training steps is [number of batches] x [number of epochs]. \n",
+ "total_steps = len(train_dataloader) * epochs\n",
+ "\n",
+ "scheduler = get_linear_schedule_with_warmup(optimizer, \n",
+ " num_warmup_steps = 0,\n",
+ " num_training_steps = total_steps)"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "zyIxF_7J3ep5"
+ },
+ "source": [
+ "### 9. Define a helper function for formatting the elapsed training time as `hh:mm:ss`"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "JH7_0ASp3oDW"
+ },
+ "outputs": [],
+ "source": [
+ "# Takes a time in seconds and returns a string hh:mm:ss\n",
+ "def format_time(elapsed):\n",
+ " # Round to the nearest second.\n",
+ " elapsed_rounded = int(round((elapsed)))\n",
+ " \n",
+ " # Format as hh:mm:ss\n",
+ " return str(datetime.timedelta(seconds=elapsed_rounded))"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "jJFhpUJp92Qe"
+ },
+ "source": [
+ "### 10. Define the training function, and start the training loop"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "vdeUXU915NE5"
+ },
+ "outputs": [],
+ "source": [
+ "def train():\n",
+ " seed_val = 42\n",
+ "\n",
+ " criterion = CosineSimilarityLoss()\n",
+ " criterion = criterion.to(device)\n",
+ "\n",
+ " random.seed(seed_val)\n",
+ " torch.manual_seed(seed_val)\n",
+ "\n",
+ " # We'll store a number of quantities such as training and validation loss, \n",
+ " # validation accuracy, and timings.\n",
+ " training_stats = []\n",
+ " total_t0 = time.time()\n",
+ "\n",
+ " for epoch_i in range(0, epochs):\n",
+ " \n",
+ " # ========================================\n",
+ " # Training\n",
+ " # ========================================\n",
+ "\n",
+ " print(\"\")\n",
+ " print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))\n",
+ " print('Training...')\n",
+ "\n",
+ " t0 = time.time()\n",
+ "\n",
+ " total_train_loss = 0\n",
+ "\n",
+ " model.train()\n",
+ "\n",
+ " # For each batch of training data...\n",
+ " for train_data, train_label in tqdm(train_dataloader):\n",
+ "\n",
+ " train_data['input_ids'] = train_data['input_ids'].to(device)\n",
+ " train_data['attention_mask'] = train_data['attention_mask'].to(device)\n",
+ "\n",
+ " train_data = collate_fn(train_data)\n",
+ " model.zero_grad()\n",
+ "\n",
+ " output = [model(feature) for feature in train_data]\n",
+ "\n",
+ " loss = criterion(output, train_label.to(device))\n",
+ " total_train_loss += loss.item()\n",
+ "\n",
+ " loss.backward()\n",
+ " torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)\n",
+ " optimizer.step()\n",
+ " scheduler.step()\n",
+ "\n",
+ " \n",
+ " # Calculate the average loss over all of the batches.\n",
+ " avg_train_loss = total_train_loss / len(train_dataloader) \n",
+ " \n",
+ " # Measure how long this epoch took.\n",
+ " training_time = format_time(time.time() - t0)\n",
+ "\n",
+ " print(\"\")\n",
+ " print(\" Average training loss: {0:.5f}\".format(avg_train_loss))\n",
+ " print(\" Training epoch took: {:}\".format(training_time))\n",
+ " \n",
+ " # ========================================\n",
+ " # Validation\n",
+ " # ========================================\n",
+ "\n",
+ " print(\"\")\n",
+ " print(\"Running Validation...\")\n",
+ "\n",
+ " t0 = time.time()\n",
+ "\n",
+ " model.eval()\n",
+ "\n",
+ " total_eval_accuracy = 0\n",
+ " total_eval_loss = 0\n",
+ " nb_eval_steps = 0\n",
+ "\n",
+ " # Evaluate data for one epoch\n",
+ " for val_data, val_label in tqdm(validation_dataloader):\n",
+ "\n",
+ " val_data['input_ids'] = val_data['input_ids'].to(device)\n",
+ " val_data['attention_mask'] = val_data['attention_mask'].to(device)\n",
+ "\n",
+ " val_data = collate_fn(val_data)\n",
+ "\n",
+ " with torch.no_grad(): \n",
+ " output = [model(feature) for feature in val_data]\n",
+ "\n",
+ " loss = criterion(output, val_label.to(device))\n",
+ " total_eval_loss += loss.item()\n",
+ "\n",
+ " # Calculate the average loss over all of the batches.\n",
+ " avg_val_loss = total_eval_loss / len(validation_dataloader)\n",
+ " \n",
+ " # Measure how long the validation run took.\n",
+ " validation_time = format_time(time.time() - t0)\n",
+ " \n",
+ " print(\" Validation Loss: {0:.5f}\".format(avg_val_loss))\n",
+ " print(\" Validation took: {:}\".format(validation_time))\n",
+ "\n",
+ " # Record all statistics from this epoch.\n",
+ " training_stats.append(\n",
+ " {\n",
+ " 'epoch': epoch_i + 1,\n",
+ " 'Training Loss': avg_train_loss,\n",
+ " 'Valid. Loss': avg_val_loss,\n",
+ " 'Training Time': training_time,\n",
+ " 'Validation Time': validation_time\n",
+ " }\n",
+ " )\n",
+ "\n",
+ " print(\"\")\n",
+ " print(\"Training complete!\")\n",
+ "\n",
+ " print(\"Total training took {:} (h:mm:ss)\".format(format_time(time.time()-total_t0)))\n",
+ "\n",
+ " return model, training_stats"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "CoWW_TnZgSRf"
+ },
+ "outputs": [],
+ "source": [
+ "# Launch the training\n",
+ "model, training_stats = train()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 331
+ },
+ "id": "nEgMWBU7fzXh",
+ "outputId": "2adcb8b2-7fb3-422e-d08e-cf701c0240cf"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " Training Loss \n",
+ " Valid. Loss \n",
+ " Training Time \n",
+ " Validation Time \n",
+ " \n",
+ " \n",
+ " epoch \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 0.032639 \n",
+ " 0.037972 \n",
+ " 0:05:29 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 0.030737 \n",
+ " 0.035472 \n",
+ " 0:05:28 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 0.027920 \n",
+ " 0.033640 \n",
+ " 0:05:29 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 0.025090 \n",
+ " 0.032185 \n",
+ " 0:05:29 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 5 \n",
+ " 0.023217 \n",
+ " 0.030802 \n",
+ " 0:05:27 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 6 \n",
+ " 0.021199 \n",
+ " 0.030223 \n",
+ " 0:05:29 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 7 \n",
+ " 0.019567 \n",
+ " 0.029389 \n",
+ " 0:05:28 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ " 8 \n",
+ " 0.017866 \n",
+ " 0.028664 \n",
+ " 0:05:29 \n",
+ " 0:00:28 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " "
+ ],
+ "text/plain": [
+ " Training Loss Valid. Loss Training Time Validation Time\n",
+ "epoch \n",
+ "1 0.032639 0.037972 0:05:29 0:00:28\n",
+ "2 0.030737 0.035472 0:05:28 0:00:28\n",
+ "3 0.027920 0.033640 0:05:29 0:00:28\n",
+ "4 0.025090 0.032185 0:05:29 0:00:28\n",
+ "5 0.023217 0.030802 0:05:27 0:00:28\n",
+ "6 0.021199 0.030223 0:05:29 0:00:28\n",
+ "7 0.019567 0.029389 0:05:28 0:00:28\n",
+ "8 0.017866 0.028664 0:05:29 0:00:28"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Create a DataFrame from our training statistics\n",
+ "df_stats = pd.DataFrame(data=training_stats)\n",
+ "\n",
+ "# Use the 'epoch' as the row index\n",
+ "df_stats = df_stats.set_index('epoch')\n",
+ "\n",
+ "# Display the table\n",
+ "df_stats"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "X7ahIyP4zsXp",
+ "outputId": "ddd2fa70-5a34-4db3-b6ee-b784d59bfb2d"
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "WARNING:datasets.builder:Found cached dataset stsb_multi_mt (/root/.cache/huggingface/datasets/stsb_multi_mt/en/1.0.0/a5d260e4b7aa82d1ab7379523a005a366d9b124c76a5a5cf0c4c5365458b0ba9)\n"
+ ]
+ }
+ ],
+ "source": [
+ "test_dataset = load_dataset(\"stsb_multi_mt\", name=\"en\", split=\"test\")\n",
+ "\n",
+ "# Prepare the data\n",
+ "first_sent = [i['sentence1'] for i in test_dataset]\n",
+ "second_sent = [i['sentence2'] for i in test_dataset]\n",
+ "full_text = [[str(x), str(y)] for x,y in zip(first_sent, second_sent)]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "wD7oPneMkUhe"
+ },
+ "outputs": [],
+ "source": [
+ "model.eval()\n",
+ "\n",
+ "def predict_similarity(sentence_pair):\n",
+ " \n",
+ " test_input = tokenizer(sentence_pair, padding='max_length', max_length=128, truncation=True, return_tensors=\"pt\").to(device)\n",
+ " test_input['input_ids'] = test_input['input_ids']\n",
+ " test_input['attention_mask'] = test_input['attention_mask']\n",
+ " del test_input['token_type_ids']\n",
+ "\n",
+ " output = model(test_input)\n",
+ " sim = torch.nn.functional.cosine_similarity(output[0], output[1], dim=0).item()\n",
+ "\n",
+ " return sim"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "e-lGkcofz6hS",
+ "outputId": "dd20141d-0496-4426-a97d-0c020612106d"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sentence 1: A cat is walking around a house.\n",
+ "Sentence 2: A woman is peeling potato.\n",
+ "Predicted similarity score: 0.01\n"
+ ]
+ }
+ ],
+ "source": [
+ "example_1 = full_text[100]\n",
+ "print(f\"Sentence 1: {example_1[0]}\")\n",
+ "print(f\"Sentence 2: {example_1[1]}\")\n",
+ "print(f\"Predicted similarity score: {round(predict_similarity(example_1), 2)}\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "ViwfU0M2DOgh",
+ "outputId": "e677ea0a-4ac8-4d38-e0d8-06baa71bbcb9"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sentence 1: Two men are playing football.\n",
+ "Sentence 2: Two men are practicing football.\n",
+ "Predicted similarity score: 0.84\n"
+ ]
+ }
+ ],
+ "source": [
+ "example_2 = full_text[130]\n",
+ "print(f\"Sentence 1: {example_2[0]}\")\n",
+ "print(f\"Sentence 2: {example_2[1]}\")\n",
+ "print(f\"Predicted similarity score: {round(predict_similarity(example_2), 2)}\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "sGn-H7ARDnBG",
+ "outputId": "ea5b057d-40f4-4c9c-896e-ebe6223a6635"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sentence 1: It varies by the situation.\n",
+ "Sentence 2: This varies by institution.\n",
+ "Predicted similarity score: 0.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "example_3 = full_text[812]\n",
+ "print(f\"Sentence 1: {example_3[0]}\")\n",
+ "print(f\"Sentence 2: {example_3[1]}\")\n",
+ "print(f\"Predicted similarity score: {round(predict_similarity(example_3), 2)}\")"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "_XovRH0VkXXs"
+ },
+ "source": [
+ "### Last but not least, save your model!"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Om3wskAQkaJP"
+ },
+ "outputs": [],
+ "source": [
+ "PATH = 'your/path/here'\n",
+ "torch.save(model.state_dict(), PATH)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "wCe1I2soj-Kj"
+ },
+ "outputs": [],
+ "source": [
+ "# In order to load the model\n",
+ "# First, you have to create an instance of the model's class\n",
+ "# And use the saving path for the loading\n",
+ "# Don't forget to set the model to the evaluation state using .eval()\n",
+ "\n",
+ "model = BertForSTS()\n",
+ "model.load_state_dict(torch.load(PATH))\n",
+ "model.eval()"
+ ]
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "gpuType": "T4",
+ "provenance": []
+ },
+ "gpuClass": "standard",
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python",
+ "version": "3.9.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py
new file mode 100644
index 00000000..fd025d2e
--- /dev/null
+++ b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py
@@ -0,0 +1,390 @@
+# %% [markdown]
+# ### 1. Install and import the required packages
+
+# %%
+!pip install transformers sentence-transformers datasets
+
+# %%
+from datasets import load_dataset
+from sentence_transformers import SentenceTransformer, models
+from transformers import BertTokenizer
+from transformers import get_linear_schedule_with_warmup
+import torch
+from torch.optim import AdamW
+from torch.utils.data import DataLoader
+from tqdm import tqdm
+import time
+import datetime
+import random
+import numpy as np
+import pandas as pd
+
+# %% [markdown]
+# ### 2. Use Google Colab's GPU for training
+
+# %%
+if torch.cuda.is_available():
+ device = torch.device("cuda")
+ print(f'There are {torch.cuda.device_count()} GPU(s) available.')
+ print('We will use the GPU:', torch.cuda.get_device_name(0))
+else:
+ print('No GPU available, using the CPU instead.')
+ device = torch.device("cpu")
+
+# %% [markdown]
+# ### **3.** Load and preview the Semantic Textual Similarity Benchmark (STSB) dataset
+
+# %%
+# Load the English version of the STSB dataset
+dataset = load_dataset("stsb_multi_mt", "en")
+
+# %%
+print(dataset)
+
+# %%
+print("A sample from the STSB dataset's training split:")
+print(dataset['train'][98])
+
+# %% [markdown]
+# ### **4.** Define the dataset loader class
+#
+
+# %%
+# Instantiate the BERT tokenizer
+# You can use larger variants of the model, here we're using the base model
+tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
+
+# %%
+class STSBDataset(torch.utils.data.Dataset):
+
+ def __init__(self, dataset):
+
+ # Normalize the similarity scores in the dataset
+ similarity_scores = [i['similarity_score'] for i in dataset]
+ self.normalized_similarity_scores = [i/5.0 for i in similarity_scores]
+ self.first_sentences = [i['sentence1'] for i in dataset]
+ self.second_sentences = [i['sentence2'] for i in dataset]
+ self.concatenated_sentences = [[str(x), str(y)] for x,y in zip(self.first_sentences, self.second_sentences)]
+
+ def __len__(self):
+
+ return len(self.concatenated_sentences)
+
+ def get_batch_labels(self, idx):
+
+ return torch.tensor(self.normalized_similarity_scores[idx])
+
+ def get_batch_texts(self, idx):
+
+ return tokenizer(self.concatenated_sentences[idx], padding='max_length', max_length=128, truncation=True, return_tensors="pt")
+
+ def __getitem__(self, idx):
+
+ batch_texts = self.get_batch_texts(idx)
+ batch_y = self.get_batch_labels(idx)
+
+ return batch_texts, batch_y
+
+
+def collate_fn(texts):
+
+ input_ids = texts['input_ids']
+ attention_masks = texts['attention_mask']
+
+ features = [{'input_ids': input_id, 'attention_mask': attention_mask}
+ for input_id, attention_mask in zip(input_ids, attention_masks)]
+
+ return features
+
+# %% [markdown]
+# ### 5. Define the model class based on BERT
+
+# %%
+class BertForSTS(torch.nn.Module):
+
+ def __init__(self):
+
+ super(BertForSTS, self).__init__()
+ self.bert = models.Transformer('bert-base-uncased', max_seq_length=128)
+ self.pooling_layer = models.Pooling(self.bert.get_word_embedding_dimension())
+ self.sts_bert = SentenceTransformer(modules=[self.bert, self.pooling_layer])
+
+ def forward(self, input_data):
+ output = self.sts_bert(input_data)['sentence_embedding']
+ return output
+
+# %%
+# Instantiate the model and move it to GPU
+model = BertForSTS()
+model.to(device)
+
+# %% [markdown]
+# ### 6. Define the Cosine Similarity loss function
+
+# %%
+class CosineSimilarityLoss(torch.nn.Module):
+
+ def __init__(self, loss_fn=torch.nn.MSELoss(), transform_fn=torch.nn.Identity()):
+ super(CosineSimilarityLoss, self).__init__()
+ self.loss_fn = loss_fn
+ self.transform_fn = transform_fn
+ self.cos_similarity = torch.nn.CosineSimilarity(dim=1)
+
+ def forward(self, inputs, labels):
+ emb_1 = torch.stack([inp[0] for inp in inputs])
+ emb_2 = torch.stack([inp[1] for inp in inputs])
+ outputs = self.transform_fn(self.cos_similarity(emb_1, emb_2))
+ return self.loss_fn(outputs, labels.squeeze())
+
+# %% [markdown]
+# ### 7. Prepare the training and validation data split
+
+# %%
+train_ds = STSBDataset(dataset['train'])
+val_ds = STSBDataset(dataset['dev'])
+
+# Create a 90-10 train-validation split.
+train_size = len(train_ds)
+val_size = len(val_ds)
+
+print('{:>5,} training samples'.format(train_size))
+print('{:>5,} validation samples'.format(val_size))
+
+# %%
+batch_size = 8
+
+train_dataloader = DataLoader(
+ train_ds, # The training samples.
+ num_workers = 4,
+ batch_size = batch_size, # Use this batch size.
+ shuffle=True # Select samples randomly for each batch
+ )
+
+validation_dataloader = DataLoader(
+ val_ds,
+ num_workers = 4,
+ batch_size = batch_size # Use the same batch size
+ )
+
+# %% [markdown]
+# ### 8. Define the Optimizer and Scheduler
+
+# %%
+optimizer = AdamW(model.parameters(),
+ lr = 1e-6)
+
+# %%
+epochs = 8
+
+# Total number of training steps is [number of batches] x [number of epochs].
+total_steps = len(train_dataloader) * epochs
+
+scheduler = get_linear_schedule_with_warmup(optimizer,
+ num_warmup_steps = 0,
+ num_training_steps = total_steps)
+
+# %% [markdown]
+# ### 9. Define a helper function for formatting the elapsed training time as `hh:mm:ss`
+
+# %%
+# Takes a time in seconds and returns a string hh:mm:ss
+def format_time(elapsed):
+ # Round to the nearest second.
+ elapsed_rounded = int(round((elapsed)))
+
+ # Format as hh:mm:ss
+ return str(datetime.timedelta(seconds=elapsed_rounded))
+
+# %% [markdown]
+# ### 10. Define the training function, and start the training loop
+
+# %%
+def train():
+ seed_val = 42
+
+ criterion = CosineSimilarityLoss()
+ criterion = criterion.to(device)
+
+ random.seed(seed_val)
+ torch.manual_seed(seed_val)
+
+ # We'll store a number of quantities such as training and validation loss,
+ # validation accuracy, and timings.
+ training_stats = []
+ total_t0 = time.time()
+
+ for epoch_i in range(0, epochs):
+
+ # ========================================
+ # Training
+ # ========================================
+
+ print("")
+ print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))
+ print('Training...')
+
+ t0 = time.time()
+
+ total_train_loss = 0
+
+ model.train()
+
+ # For each batch of training data...
+ for train_data, train_label in tqdm(train_dataloader):
+
+ train_data['input_ids'] = train_data['input_ids'].to(device)
+ train_data['attention_mask'] = train_data['attention_mask'].to(device)
+
+ train_data = collate_fn(train_data)
+ model.zero_grad()
+
+ output = [model(feature) for feature in train_data]
+
+ loss = criterion(output, train_label.to(device))
+ total_train_loss += loss.item()
+
+ loss.backward()
+ torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
+ optimizer.step()
+ scheduler.step()
+
+
+ # Calculate the average loss over all of the batches.
+ avg_train_loss = total_train_loss / len(train_dataloader)
+
+ # Measure how long this epoch took.
+ training_time = format_time(time.time() - t0)
+
+ print("")
+ print(" Average training loss: {0:.5f}".format(avg_train_loss))
+ print(" Training epoch took: {:}".format(training_time))
+
+ # ========================================
+ # Validation
+ # ========================================
+
+ print("")
+ print("Running Validation...")
+
+ t0 = time.time()
+
+ model.eval()
+
+ total_eval_accuracy = 0
+ total_eval_loss = 0
+ nb_eval_steps = 0
+
+ # Evaluate data for one epoch
+ for val_data, val_label in tqdm(validation_dataloader):
+
+ val_data['input_ids'] = val_data['input_ids'].to(device)
+ val_data['attention_mask'] = val_data['attention_mask'].to(device)
+
+ val_data = collate_fn(val_data)
+
+ with torch.no_grad():
+ output = [model(feature) for feature in val_data]
+
+ loss = criterion(output, val_label.to(device))
+ total_eval_loss += loss.item()
+
+ # Calculate the average loss over all of the batches.
+ avg_val_loss = total_eval_loss / len(validation_dataloader)
+
+ # Measure how long the validation run took.
+ validation_time = format_time(time.time() - t0)
+
+ print(" Validation Loss: {0:.5f}".format(avg_val_loss))
+ print(" Validation took: {:}".format(validation_time))
+
+ # Record all statistics from this epoch.
+ training_stats.append(
+ {
+ 'epoch': epoch_i + 1,
+ 'Training Loss': avg_train_loss,
+ 'Valid. Loss': avg_val_loss,
+ 'Training Time': training_time,
+ 'Validation Time': validation_time
+ }
+ )
+
+ print("")
+ print("Training complete!")
+
+ print("Total training took {:} (h:mm:ss)".format(format_time(time.time()-total_t0)))
+
+ return model, training_stats
+
+# %%
+# Launch the training
+model, training_stats = train()
+
+# %%
+# Create a DataFrame from our training statistics
+df_stats = pd.DataFrame(data=training_stats)
+
+# Use the 'epoch' as the row index
+df_stats = df_stats.set_index('epoch')
+
+# Display the table
+df_stats
+
+# %%
+test_dataset = load_dataset("stsb_multi_mt", name="en", split="test")
+
+# Prepare the data
+first_sent = [i['sentence1'] for i in test_dataset]
+second_sent = [i['sentence2'] for i in test_dataset]
+full_text = [[str(x), str(y)] for x,y in zip(first_sent, second_sent)]
+
+# %%
+model.eval()
+
+def predict_similarity(sentence_pair):
+
+ test_input = tokenizer(sentence_pair, padding='max_length', max_length=128, truncation=True, return_tensors="pt").to(device)
+ test_input['input_ids'] = test_input['input_ids']
+ test_input['attention_mask'] = test_input['attention_mask']
+ del test_input['token_type_ids']
+
+ output = model(test_input)
+ sim = torch.nn.functional.cosine_similarity(output[0], output[1], dim=0).item()
+
+ return sim
+
+# %%
+example_1 = full_text[100]
+print(f"Sentence 1: {example_1[0]}")
+print(f"Sentence 2: {example_1[1]}")
+print(f"Predicted similarity score: {round(predict_similarity(example_1), 2)}")
+
+# %%
+example_2 = full_text[130]
+print(f"Sentence 1: {example_2[0]}")
+print(f"Sentence 2: {example_2[1]}")
+print(f"Predicted similarity score: {round(predict_similarity(example_2), 2)}")
+
+# %%
+example_3 = full_text[812]
+print(f"Sentence 1: {example_3[0]}")
+print(f"Sentence 2: {example_3[1]}")
+print(f"Predicted similarity score: {round(predict_similarity(example_3), 2)}")
+
+# %% [markdown]
+# ### Last but not least, save your model!
+
+# %%
+PATH = 'your/path/here'
+torch.save(model.state_dict(), PATH)
+
+# %%
+# In order to load the model
+# First, you have to create an instance of the model's class
+# And use the saving path for the loading
+# Don't forget to set the model to the evaluation state using .eval()
+
+model = BertForSTS()
+model.load_state_dict(torch.load(PATH))
+model.eval()
+
+
diff --git a/machine-learning/nlp/semantic-textual-similarity/README.md b/machine-learning/nlp/semantic-textual-similarity/README.md
new file mode 100644
index 00000000..20745c3f
--- /dev/null
+++ b/machine-learning/nlp/semantic-textual-similarity/README.md
@@ -0,0 +1 @@
+# [How to Fine Tune BERT for Semantic Textual Similarity using Transformers in Python](https://www.thepythoncode.com/article/finetune-bert-for-semantic-textual-similarity-in-python)
\ No newline at end of file
diff --git a/machine-learning/nlp/semantic-textual-similarity/requirements.txt b/machine-learning/nlp/semantic-textual-similarity/requirements.txt
new file mode 100644
index 00000000..c481c303
--- /dev/null
+++ b/machine-learning/nlp/semantic-textual-similarity/requirements.txt
@@ -0,0 +1,6 @@
+transformers
+sentence-transformers
+datasets
+tqdm
+numpy
+pandas
\ No newline at end of file
diff --git a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb
index 1d65f262..941eff4c 100644
--- a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb
+++ b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb
@@ -2,79 +2,18 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 87,
+ "execution_count": null,
"metadata": {
- "colab": {
- "base_uri": "https://localhost:8080/"
- },
- "id": "KqiF_SjMysD0",
- "outputId": "308ec248-ce64-4e77-ba44-36b4d3c0c9db"
+ "id": "KqiF_SjMysD0"
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Requirement already satisfied: transformers==4.11.2 in /usr/local/lib/python3.7/dist-packages (4.11.2)\n",
- "Requirement already satisfied: datasets in /usr/local/lib/python3.7/dist-packages (1.15.1)\n",
- "Requirement already satisfied: soundfile in /usr/local/lib/python3.7/dist-packages (0.10.3.post1)\n",
- "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.7/dist-packages (0.1.96)\n",
- "Requirement already satisfied: torchaudio in /usr/local/lib/python3.7/dist-packages (0.10.0+cu111)\n",
- "Collecting pydub\n",
- " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
- "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (21.3)\n",
- "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (4.62.3)\n",
- "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (1.19.5)\n",
- "Requirement already satisfied: tokenizers<0.11,>=0.10.1 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (0.10.3)\n",
- "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (2.23.0)\n",
- "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (2019.12.20)\n",
- "Requirement already satisfied: huggingface-hub>=0.0.17 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (0.1.2)\n",
- "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (4.8.2)\n",
- "Requirement already satisfied: sacremoses in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (0.0.46)\n",
- "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (6.0)\n",
- "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers==4.11.2) (3.4.0)\n",
- "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub>=0.0.17->transformers==4.11.2) (3.10.0.2)\n",
- "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers==4.11.2) (3.0.6)\n",
- "Requirement already satisfied: multiprocess in /usr/local/lib/python3.7/dist-packages (from datasets) (0.70.12.2)\n",
- "Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from datasets) (1.1.5)\n",
- "Requirement already satisfied: dill in /usr/local/lib/python3.7/dist-packages (from datasets) (0.3.4)\n",
- "Requirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from datasets) (3.8.1)\n",
- "Requirement already satisfied: pyarrow!=4.0.0,>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (3.0.0)\n",
- "Requirement already satisfied: fsspec[http]>=2021.05.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (2021.11.0)\n",
- "Requirement already satisfied: xxhash in /usr/local/lib/python3.7/dist-packages (from datasets) (2.0.2)\n",
- "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.11.2) (3.0.4)\n",
- "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.11.2) (2.10)\n",
- "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.11.2) (1.24.3)\n",
- "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers==4.11.2) (2021.10.8)\n",
- "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.7/dist-packages (from soundfile) (1.15.0)\n",
- "Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.0->soundfile) (2.21)\n",
- "Requirement already satisfied: torch==1.10.0 in /usr/local/lib/python3.7/dist-packages (from torchaudio) (1.10.0+cu111)\n",
- "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (5.2.0)\n",
- "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (2.0.7)\n",
- "Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (0.13.0)\n",
- "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (21.2.0)\n",
- "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.2.0)\n",
- "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (4.0.1)\n",
- "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.2.0)\n",
- "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.7.2)\n",
- "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers==4.11.2) (3.6.0)\n",
- "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2.8.2)\n",
- "Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2018.9)\n",
- "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n",
- "Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers==4.11.2) (7.1.2)\n",
- "Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers==4.11.2) (1.1.0)\n",
- "Installing collected packages: pydub\n",
- "Successfully installed pydub-0.25.1\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "!pip install transformers==4.11.2 datasets soundfile sentencepiece torchaudio pyaudio"
+ "!pip install transformers==4.28.1 soundfile sentencepiece torchaudio pydub"
]
},
{
"cell_type": "code",
- "execution_count": 73,
+ "execution_count": null,
"metadata": {
"id": "IA7sFGYoywJv"
},
@@ -85,179 +24,42 @@
"import soundfile as sf\n",
"# import librosa\n",
"import os\n",
- "import torchaudio"
+ "import torchaudio\n",
+ "\n",
+ "device = \"cuda:0\" if torch.cuda.is_available() else \"cpu\""
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "VJBoe7N6PSZO"
+ },
+ "source": [
+ "# Wav2Vec2.0 Models\n"
]
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": null,
"metadata": {
- "colab": {
- "base_uri": "https://localhost:8080/",
- "height": 314,
- "referenced_widgets": [
- "45eeb549b03649d9be138001aeb7843c",
- "9b1de65486e5484eb61ba378e9e1cefa",
- "dc7a3b598c4d45bd9b8d1239c33b510b",
- "de6abb9a77ca49549a873cdf65858cda",
- "60473b3b063141699845d72b877d752a",
- "e5c9003f439147f2a57578d68a947f6a",
- "4cdba09932964730b0917c67b10fb689",
- "9bfd8b36f86847dda8578ae272316b21",
- "42675b60ec444fa393f48779f6a5fc59",
- "bd6cde59f35f4022ab7e9fc3f93104a9",
- "bd82c30b3a7c45b4af2a9064339fe84e",
- "ed2a73a73d054eb6a7d2294bedd368ca",
- "b5d0cb0d69aa4df59b8c53d4f70c5345",
- "12b41877be1d410dbd44c54b4dfa21b1",
- "3b08026412914f058ceccad5ca69ab9e",
- "11581f616a1547e4af2fa8059361e120",
- "4133b4fc83b64cd5918400a2541c11ad",
- "fb5bf22faf6348819bf9bd484dbf05e2",
- "eabcbeba261740e08f09cc1513b337ad",
- "2c5a040ed23740f189c0d729386c1b71",
- "ac569cb10d074b6da5033b8b3b34c731",
- "ea67e226c77847aeb178f6d030a4b26e",
- "675eefa2dbdc40e0a5a5517dc9eb00d6",
- "c32e11c41bb34c68a339e9ed9a713fbc",
- "7172e9a2593b4210ba309e6bdb4dc187",
- "29f9a88a8b9741ba9f656e88be31b67f",
- "3b2c2a7b03fb4b64857ef1da1cff90ec",
- "f602a96212f64ff0b2c7430e9e402855",
- "1a3c25f5cf92427eaddec3acf849f04b",
- "39bcdcc9f44949889ab68ea961bc9cbf",
- "7af8e7f6e148418f880e86685f65acaf",
- "25d85c7ae4db4347a0563773aca93fe8",
- "524e25298b9944a0b27ee4ebe8a5526e",
- "b9326a9c7f594cda90f683e299928300",
- "24690773f20c4f1a917b0e847c254423",
- "d094c60966894d87b89a3f690bed522c",
- "249faed19a95434ba146a227a0f14dba",
- "59d686351f37454e96821ca29ceff7ee",
- "c82cc9105e684f14a6a4c2b6a0d2b0c5",
- "e03c1e027d5c414394cae1688974e8dd",
- "3ac0ec899a3d46fc85fa634326665e1b",
- "04614cbf754241899b0d8513e23851ed",
- "72ebaf4b55314d599b8165f706a49230",
- "0489efb30abc428582a028a93d228ed5",
- "444cd62dd6f345d9a714085ea14c1682",
- "ca8a8d5d3e2a42638f1b68050fcce963",
- "66c8cada44244df18c473fd868ea0a8a",
- "5f55acf0d5ce40279d21e48b5ac4345c",
- "f69d665f4fcc401397d0091dc425b001",
- "b5f26ca150b24c9e918a14acac198f54",
- "eec27fed27e24c27be025c83d22b61cf",
- "dafb418d0995486cb4d3099d23ec67b8",
- "9f121c61473b4a8b8eeff16b4b6f9d5d",
- "c66ba171d6864e76b33884dcc53b1d1c",
- "e61138f39e7641ec93671c21a645720a"
- ]
- },
- "id": "OXVa9QG2cmD7",
- "outputId": "ac34bf2c-a409-4510-dc65-ba6838253fde"
+ "id": "OXVa9QG2cmD7"
},
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "45eeb549b03649d9be138001aeb7843c",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Downloading: 0%| | 0.00/291 [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "ed2a73a73d054eb6a7d2294bedd368ca",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Downloading: 0%| | 0.00/162 [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "675eefa2dbdc40e0a5a5517dc9eb00d6",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Downloading: 0%| | 0.00/85.0 [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "b9326a9c7f594cda90f683e299928300",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Downloading: 0%| | 0.00/1.57k [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. \n",
- "The tokenizer class you load from this checkpoint is 'Wav2Vec2CTCTokenizer'. \n",
- "The class this function is called from is 'Wav2Vec2Tokenizer'.\n",
- "/usr/local/lib/python3.7/dist-packages/transformers/models/wav2vec2/tokenization_wav2vec2.py:423: FutureWarning: The class `Wav2Vec2Tokenizer` is deprecated and will be removed in version 5 of Transformers. Please use `Wav2Vec2Processor` or `Wav2Vec2CTCTokenizer` instead.\n",
- " FutureWarning,\n"
- ]
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "444cd62dd6f345d9a714085ea14c1682",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Downloading: 0%| | 0.00/1.18G [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/wav2vec2-large-960h-lv60-self and are newly initialized: ['wav2vec2.masked_spec_embed']\n",
- "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "# model_name = \"facebook/wav2vec2-base-960h\" # 360MB\n",
- "model_name = \"facebook/wav2vec2-large-960h-lv60-self\" # 1.18GB\n",
+ "# wav2vec2_model_name = \"facebook/wav2vec2-base-960h\" # 360MB\n",
+ "wav2vec2_model_name = \"facebook/wav2vec2-large-960h-lv60-self\" # pretrained 1.26GB\n",
+ "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-english\" # English-only, 1.26GB\n",
+ "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-arabic\" # Arabic-only, 1.26GB\n",
+ "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-spanish\" # Spanish-only, 1.26GB\n",
"\n",
- "processor = Wav2Vec2Processor.from_pretrained(model_name)\n",
- "model = Wav2Vec2ForCTC.from_pretrained(model_name)"
+ "wav2vec2_processor = Wav2Vec2Processor.from_pretrained(wav2vec2_model_name)\n",
+ "wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name).to(device)"
]
},
{
"cell_type": "code",
- "execution_count": 92,
+ "execution_count": 2,
"metadata": {
"id": "GdEIJtkzEzSN"
},
@@ -268,20 +70,20 @@
"# audio_url = \"http://www.fit.vutbr.cz/~motlicek/sympatex/f2btrop6.0.wav/"\n",
"# audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/16-122828-0002.wav/"\n",
"audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/30-4447-0004.wav/"\n",
+ "# audio_url = \"https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav/"\n",
"# audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/7601-291468-0006.wav/"\n",
- "# audio_url = \"https://file-examples-com.github.io/uploads/2017/11/file_example_WAV_1MG.wav/"\n",
"# audio_url = \"http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav/""
]
},
{
"cell_type": "code",
- "execution_count": 93,
+ "execution_count": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "pFm8rwjMt7TC",
- "outputId": "32fc4e5d-6e2a-4c51-d780-fb6fb53a0af2"
+ "outputId": "8fec671b-67b6-4733-9d5a-d8a2a1e92793"
},
"outputs": [
{
@@ -290,7 +92,7 @@
"(16000, torch.Size([274000]))"
]
},
- "execution_count": 93,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -306,13 +108,13 @@
},
{
"cell_type": "code",
- "execution_count": 94,
+ "execution_count": 6,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
- "id": "r_cwT9GL3Zji",
- "outputId": "a159c7bb-d13b-48e9-cd51-2385998e0bdf"
+ "id": "563Nf3xsMnJE",
+ "outputId": "f18bfd81-cf2b-49ef-e76b-cd4967bd2488"
},
"outputs": [
{
@@ -321,7 +123,7 @@
"torch.Size([274000])"
]
},
- "execution_count": 94,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -335,13 +137,13 @@
},
{
"cell_type": "code",
- "execution_count": 95,
+ "execution_count": 9,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "qtTD3gIyeNwK",
- "outputId": "0971ac8f-f7ae-4171-bf41-255635127a27"
+ "outputId": "5892959b-4e24-4e51-b3e6-294f18c2eb51"
},
"outputs": [
{
@@ -350,26 +152,26 @@
"torch.Size([1, 274000])"
]
},
- "execution_count": 95,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# tokenize our wav\n",
- "input_values = processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"]\n",
+ "input_values = wav2vec2_processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"].to(device)\n",
"input_values.shape"
]
},
{
"cell_type": "code",
- "execution_count": 96,
+ "execution_count": 10,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "_O7cCe7veTgB",
- "outputId": "9ed19a1c-ae50-4ac6-a593-db13faa65d0e"
+ "outputId": "5c275a78-356a-4801-d538-ff9d2395de8a"
},
"outputs": [
{
@@ -378,26 +180,26 @@
"torch.Size([1, 856, 32])"
]
},
- "execution_count": 96,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# perform inference\n",
- "logits = model(input_values)[\"logits\"]\n",
+ "logits = wav2vec2_model(input_values)[\"logits\"]\n",
"logits.shape"
]
},
{
"cell_type": "code",
- "execution_count": 97,
+ "execution_count": 11,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Gx6XWoTRejR0",
- "outputId": "098cb0d6-ea48-4b7b-ea2c-dbcabdcb1426"
+ "outputId": "013597c8-693f-4dcf-e82e-5da6b39c205b"
},
"outputs": [
{
@@ -406,7 +208,7 @@
"torch.Size([1, 856])"
]
},
- "execution_count": 97,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -419,14 +221,14 @@
},
{
"cell_type": "code",
- "execution_count": 98,
+ "execution_count": 12,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
- "height": 52
+ "height": 54
},
"id": "tyWIw6rJeyN-",
- "outputId": "c758d70c-4967-43a2-bf7a-e1e9cb20010c"
+ "outputId": "ed070c05-2f53-4880-cfb4-4a2e2936ee0d"
},
"outputs": [
{
@@ -438,55 +240,63 @@
"'and missus goddard three ladies almost always at the service of an invitation from hartfield and who were fetched and carried home so often that mister woodhouse thought it no hardship for either james or the horses had it taken place only once a year it would have been a grievance'"
]
},
- "execution_count": 98,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# decode the IDs to text\n",
- "transcription = processor.decode(predicted_ids[0])\n",
+ "transcription = wav2vec2_processor.decode(predicted_ids[0])\n",
"transcription.lower()"
]
},
{
"cell_type": "code",
- "execution_count": 100,
+ "execution_count": 3,
"metadata": {
- "id": "Oj3dTjqnmHmf"
+ "id": "TJpRO65uqP30"
},
"outputs": [],
"source": [
- "def get_transcription(audio_path):\n",
+ "def load_audio(audio_path):\n",
+ " \"\"\"Load the audio file & convert to 16,000 sampling rate\"\"\"\n",
" # load our wav file\n",
" speech, sr = torchaudio.load(audio_path)\n",
- " speech = speech.squeeze()\n",
- " # or using librosa\n",
- " # speech, sr = librosa.load(audio_file, sr=16000)\n",
- " # resample from whatever the audio sampling rate to 16000\n",
" resampler = torchaudio.transforms.Resample(sr, 16000)\n",
" speech = resampler(speech)\n",
- " # tokenize our wav\n",
- " input_values = processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"]\n",
+ " return speech.squeeze()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "id": "XDYMY4ZZLl9Q"
+ },
+ "outputs": [],
+ "source": [
+ "def get_transcription_wav2vec2(audio_path, model, processor):\n",
+ " speech = load_audio(audio_path)\n",
+ " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"].to(device)\n",
" # perform inference\n",
- " logits = model(input_values)[\"logits\"]\n",
+ " logits = model(input_features)[\"logits\"]\n",
" # use argmax to get the predicted IDs\n",
" predicted_ids = torch.argmax(logits, dim=-1)\n",
- " # decode the IDs to text\n",
- " transcription = processor.decode(predicted_ids[0])\n",
+ " transcription = processor.batch_decode(predicted_ids)[0]\n",
" return transcription.lower()"
]
},
{
"cell_type": "code",
- "execution_count": 101,
+ "execution_count": 17,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
- "height": 52
+ "height": 36
},
"id": "ien5Vqre7MRg",
- "outputId": "75fd419e-7ede-411c-c6b6-a786144425ac"
+ "outputId": "f28ed270-5cae-4f74-ea97-7fa35d1df8ac"
},
"outputs": [
{
@@ -495,106 +305,244 @@
"type": "string"
},
"text/plain": [
- "'and missus goddard three ladies almost always at the service of an invitation from hartfield and who were fetched and carried home so often that mister woodhouse thought it no hardship for either james or the horses had it taken place only once a year it would have been a grievance'"
+ "'a late is a big tool grab every dish of sugar'"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "get_transcription_wav2vec2(\"http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav/", \n",
+ " wav2vec2_model, \n",
+ " wav2vec2_processor)"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "OLqN2g1vpjIP"
+ },
+ "source": [
+ "# Whisper Models"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "H5emZREQp5Gv"
+ },
+ "outputs": [],
+ "source": [
+ "# whisper_model_name = \"openai/whisper-tiny.en\" # English-only, ~ 151 MB\n",
+ "# whisper_model_name = \"openai/whisper-base.en\" # English-only, ~ 290 MB\n",
+ "# whisper_model_name = \"openai/whisper-small.en\" # English-only, ~ 967 MB\n",
+ "# whisper_model_name = \"openai/whisper-medium.en\" # English-only, ~ 3.06 GB\n",
+ "# whisper_model_name = \"openai/whisper-tiny\" # multilingual, ~ 151 MB\n",
+ "# whisper_model_name = \"openai/whisper-base\" # multilingual, ~ 290 MB\n",
+ "# whisper_model_name = \"openai/whisper-small\" # multilingual, ~ 967 MB\n",
+ "whisper_model_name = \"openai/whisper-medium\" # multilingual, ~ 3.06 GB\n",
+ "# whisper_model_name = \"openai/whisper-large-v2\" # multilingual, ~ 6.17 GB\n",
+ "\n",
+ "whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name)\n",
+ "whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "id": "jkJSZ1QQqiQ-"
+ },
+ "outputs": [],
+ "source": [
+ "input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors=\"pt\").input_features.to(device)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "id": "8lZGLPw9yYOx"
+ },
+ "outputs": [],
+ "source": [
+ "forced_decoder_ids = whisper_processor.get_decoder_prompt_ids(language=\"english\", task=\"transcribe\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "CyFAkTqSyvfy",
+ "outputId": "24efe50f-6467-4e5b-d5ee-6c101df9566d"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[(1, 50259), (2, 50359), (3, 50363)]"
]
},
- "execution_count": 101,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "get_transcription(audio_url)"
+ "forced_decoder_ids"
]
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 15,
"metadata": {
"colab": {
- "base_uri": "https://localhost:8080/",
- "height": 50,
- "referenced_widgets": [
- "15b1685016ea4c27af7a73ca31e54504",
- "d65226b4aaf04587990ff1b05bc837c6",
- "9fe212aa47694fc2a87c9f59561fa2d4"
- ]
+ "base_uri": "https://localhost:8080/"
},
- "id": "GZTvRVznIcn_",
- "outputId": "b8e128d3-e9c0-445f-80c8-b6d11ba9448b"
+ "id": "N3kN0ieAs4y6",
+ "outputId": "af61865c-db65-449d-9f76-f90dec77c544"
},
"outputs": [
{
- "name": "stdout",
+ "data": {
+ "text/plain": [
+ "torch.Size([1, 80, 3000])"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "input_features.shape"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "FwN0416XsI4s",
+ "outputId": "92f436a4-6af4-42d2-d774-94af91e2c57e"
+ },
+ "outputs": [
+ {
+ "name": "stderr",
"output_type": "stream",
"text": [
- "Recording...\n",
- "Finished recording.\n"
+ "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1313: UserWarning: Using `max_length`'s default (448) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation.\n",
+ " warnings.warn(\n"
]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "torch.Size([1, 68])"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
}
],
"source": [
- "import pyaudio\n",
- "import wave\n",
- "\n",
- "# the file name output you want to record into\n",
- "filename = \"recorded.wav\"\n",
- "# set the chunk size of 1024 samples\n",
- "chunk = 1024\n",
- "# sample format\n",
- "FORMAT = pyaudio.paInt16\n",
- "# mono, change to 2 if you want stereo\n",
- "channels = 1\n",
- "# 44100 samples per second\n",
- "sample_rate = 16000\n",
- "record_seconds = 10\n",
- "# initialize PyAudio object\n",
- "p = pyaudio.PyAudio()\n",
- "# open stream object as input & output\n",
- "stream = p.open(format=FORMAT,\n",
- " channels=channels,\n",
- " rate=sample_rate,\n",
- " input=True,\n",
- " output=True,\n",
- " frames_per_buffer=chunk)\n",
- "frames = []\n",
- "print(\"Recording...\")\n",
- "for i in range(int(sample_rate / chunk * record_seconds)):\n",
- " data = stream.read(chunk)\n",
- " # if you want to hear your voice while recording\n",
- " # stream.write(data)\n",
- " frames.append(data)\n",
- "print(\"Finished recording.\")\n",
- "# stop and close stream\n",
- "stream.stop_stream()\n",
- "stream.close()\n",
- "# terminate pyaudio object\n",
- "p.terminate()\n",
- "# save audio file\n",
- "# open the file in 'write bytes' mode\n",
- "wf = wave.open(filename, \"wb\")\n",
- "# set the channels\n",
- "wf.setnchannels(channels)\n",
- "# set the sample format\n",
- "wf.setsampwidth(p.get_sample_size(FORMAT))\n",
- "# set the sample rate\n",
- "wf.setframerate(sample_rate)\n",
- "# write the frames as bytes\n",
- "wf.writeframes(b\"\".join(frames))\n",
- "# close the file\n",
- "wf.close()"
+ "predicted_ids = whisper_model.generate(input_features, forced_decoder_ids=forced_decoder_ids)\n",
+ "predicted_ids.shape"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "HCIe1xoALIzi",
+ "outputId": "6bb77e6c-449c-4308-d43f-30721578299a"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[' and Mrs. Goddard, three ladies almost always at the service of an invitation from Hartfield, and who were fetched and carried home so often that Mr. Woodhouse sought it no hardship for either James or the horses. Had it taken place only once a year it would have been a grievance.']"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=True)\n",
+ "transcription"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "aK7gu9L1sNJh",
+ "outputId": "9e66ff70-dc26-4de8-da20-d0598c7c0f21"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['<|startoftranscript|><|en|><|transcribe|><|notimestamps|> and Mrs. Goddard, three ladies almost always at the service of an invitation from Hartfield, and who were fetched and carried home so often that Mr. Woodhouse sought it no hardship for either James or the horses. Had it taken place only once a year it would have been a grievance.<|endoftext|>']"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=False)\n",
+ "transcription"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "id": "V1MIY7i37bg5"
+ },
+ "outputs": [],
+ "source": [
+ "def get_transcription_whisper(audio_path, model, processor, language=\"english\", skip_special_tokens=True):\n",
+ " # resample from whatever the audio sampling rate to 16000\n",
+ " speech = load_audio(audio_path)\n",
+ " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000).input_features.to(device)\n",
+ " forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task=\"transcribe\")\n",
+ " # print(forced_decoder_ids)\n",
+ " predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)\n",
+ " transcription = processor.batch_decode(predicted_ids, skip_special_tokens=skip_special_tokens)[0]\n",
+ " return transcription"
]
},
{
"cell_type": "code",
- "execution_count": 103,
+ "execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
- "height": 102
+ "height": 35
},
- "id": "HPJwZgYh7Ph3",
- "outputId": "71d2008a-a94e-4b66-c501-27034e50c0d7"
+ "id": "04bekvh4GEQN",
+ "outputId": "1edc0912-de09-4a69-b8c4-ca3fb7130c28"
},
"outputs": [
{
@@ -603,1713 +551,393 @@
"type": "string"
},
"text/plain": [
- "\"albertanstein was a german born theoretical physicist widely acknowledged to be one of the greatest physicists of all time anstein is best known for developing the theory of relativity but he also made important contributions to the development of the theory of quanto mechanics relativity and quantom mechanics are together the two pillars of modern physics his mass energy equivalent formula e equals m c squared which arises from relativity theory has been dubbed the world's most famous equation his work is also known for its influence on the philosophy of science he received the one thousand nineteen twenty one noble prize in physics for his serv\""
+ "' ورجح التقرير الذي أعده معهد أبحاث هضبة التبت في الأكاديمية الصينية للعلوم أن تستمر درجات الحرارة ومستويات الرتوبة في الارتفاع طوال هذا القرن.'"
]
},
- "execution_count": 103,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "get_transcription(\"recorded.wav\")"
+ "arabic_transcription = get_transcription_whisper(\"https://datasets-server.huggingface.co/assets/arabic_speech_corpus/--/clean/train/0/audio/audio.wav/",\n",
+ " whisper_model,\n",
+ " whisper_processor,\n",
+ " language=\"arabic\",\n",
+ " skip_special_tokens=True)\n",
+ "arabic_transcription"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
- "id": "-AWFT-oZPcFs"
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 35
+ },
+ "id": "FAHA98CgHols",
+ "outputId": "7ea44035-e008-4ff2-9727-46706e725f73"
},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "colab": {
- "machine_shape": "hm",
- "name": "AutomaticSpeechRecognition-PythonCodeTutorial.ipynb",
- "provenance": []
- },
- "kernelspec": {
- "display_name": "Python 3",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "string"
+ },
+ "text/plain": [
+ "' ¿Cuál es la fecha de tu cumpleaños?'"
+ ]
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "spanish_transcription = get_transcription_whisper(\"https://www.lightbulblanguages.co.uk/resources/sp-audio/cual-es-la-fecha-cumple.mp3/",\n",
+ " whisper_model,\n",
+ " whisper_processor,\n",
+ " language=\"spanish\",\n",
+ " skip_special_tokens=True)\n",
+ "spanish_transcription"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "QTZlrT-B21VC"
},
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.8.7"
+ "outputs": [],
+ "source": [
+ "from transformers.models.whisper.tokenization_whisper import TO_LANGUAGE_CODE \n",
+ "# supported languages\n",
+ "TO_LANGUAGE_CODE "
+ ]
},
- "widgets": {
- "application/vnd.jupyter.widget-state+json": {
- "04614cbf754241899b0d8513e23851ed": {
- "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
- }
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "6cZZ7MeTUv0S"
+ },
+ "source": [
+ "# Transcribe your Voice"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
},
- "0489efb30abc428582a028a93d228ed5": {
- "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
- }
+ "id": "3FdjIsOlKBRJ",
+ "outputId": "5df28a41-0943-4d6f-c7b3-446b26c9c906"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "/content/silero-models\n"
+ ]
+ }
+ ],
+ "source": [
+ "!git clone -q --depth 1 https://github.com/snakers4/silero-models\n",
+ "\n",
+ "%cd silero-models"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 110,
+ "referenced_widgets": [
+ "1c348712a37045239a35b41430756d4d",
+ "32d1d0fb4ee748108d01fa01fbfb5473",
+ "8035a1813fce41cfad51849aea43a446"
+ ]
},
- "11581f616a1547e4af2fa8059361e120": {
- "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_ea67e226c77847aeb178f6d030a4b26e",
- "placeholder": "",
- "style": "IPY_MODEL_ac569cb10d074b6da5033b8b3b34c731",
- "value": " 162/162 [00:00<00:00, 5.39kB/s]"
- }
+ "id": "GZTvRVznIcn_",
+ "outputId": "f1772b6a-6eaa-4c4e-fbaa-ccdbad8ea2c7"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Starting recording for 20 seconds...\n"
+ ]
},
- "12b41877be1d410dbd44c54b4dfa21b1": {
- "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_fb5bf22faf6348819bf9bd484dbf05e2",
- "placeholder": "",
- "style": "IPY_MODEL_4133b4fc83b64cd5918400a2541c11ad",
- "value": "Downloading: 100%"
- }
+ {
+ "data": {
+ "application/javascript": "\n const sleep = time => new Promise(resolve => setTimeout(resolve, time))\n const b2text = blob => new Promise(resolve => {\n const reader = new FileReader()\n reader.onloadend = e => resolve(e.srcElement.result)\n reader.readAsDataURL(blob)\n })\n var record = time => new Promise(async resolve => {\n stream = await navigator.mediaDevices.getUserMedia({ audio: true })\n recorder = new MediaRecorder(stream)\n chunks = []\n recorder.ondataavailable = e => chunks.push(e.data)\n recorder.start()\n await sleep(time)\n recorder.onstop = async ()=>{\n blob = new Blob(chunks)\n text = await b2text(blob)\n resolve(text)\n }\n recorder.stop()\n })\n ",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
},
- "15b1685016ea4c27af7a73ca31e54504": {
- "model_module": "@jupyter-widgets/controls",
- "model_module_version": "1.5.0",
- "model_name": "ButtonModel",
- "state": {
- "_dom_classes": [],
- "_model_module": "@jupyter-widgets/controls",
- "_model_module_version": "1.5.0",
- "_model_name": "ButtonModel",
- "_view_count": null,
- "_view_module": "@jupyter-widgets/controls",
- "_view_module_version": "1.5.0",
- "_view_name": "ButtonView",
- "button_style": "",
- "description": "Record Speech",
- "disabled": false,
- "icon": "",
- "layout": "IPY_MODEL_9fe212aa47694fc2a87c9f59561fa2d4",
- "style": "IPY_MODEL_d65226b4aaf04587990ff1b05bc837c6",
- "tooltip": ""
- }
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Finished recording!\n"
+ ]
},
- "1a3c25f5cf92427eaddec3acf849f04b": {
- "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
- }
- },
- "24690773f20c4f1a917b0e847c254423": {
- "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
- }
- },
- "249faed19a95434ba146a227a0f14dba": {
- "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_04614cbf754241899b0d8513e23851ed",
- "max": 1606,
- "min": 0,
- "orientation": "horizontal",
- "style": "IPY_MODEL_3ac0ec899a3d46fc85fa634326665e1b",
- "value": 1606
- }
- },
- "25d85c7ae4db4347a0563773aca93fe8": {
- "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": ""
- }
- },
- "29f9a88a8b9741ba9f656e88be31b67f": {
- "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_7af8e7f6e148418f880e86685f65acaf",
- "max": 85,
- "min": 0,
- "orientation": "horizontal",
- "style": "IPY_MODEL_39bcdcc9f44949889ab68ea961bc9cbf",
- "value": 85
- }
- },
- "2c5a040ed23740f189c0d729386c1b71": {
- "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
- }
- },
- "39bcdcc9f44949889ab68ea961bc9cbf": {
- "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": ""
- }
- },
- "3ac0ec899a3d46fc85fa634326665e1b": {
- "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": ""
- }
- },
- "3b08026412914f058ceccad5ca69ab9e": {
- "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_2c5a040ed23740f189c0d729386c1b71",
- "max": 162,
- "min": 0,
- "orientation": "horizontal",
- "style": "IPY_MODEL_eabcbeba261740e08f09cc1513b337ad",
- "value": 162
- }
- },
- "3b2c2a7b03fb4b64857ef1da1cff90ec": {
- "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_524e25298b9944a0b27ee4ebe8a5526e",
- "placeholder": "",
- "style": "IPY_MODEL_25d85c7ae4db4347a0563773aca93fe8",
- "value": " 85.0/85.0 [00:00<00:00, 2.81kB/s]"
- }
- },
- "4133b4fc83b64cd5918400a2541c11ad": {
- "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": ""
- }
- },
- "42675b60ec444fa393f48779f6a5fc59": {
- "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
- }
- },
- "444cd62dd6f345d9a714085ea14c1682": {
- "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_66c8cada44244df18c473fd868ea0a8a",
- "IPY_MODEL_5f55acf0d5ce40279d21e48b5ac4345c",
- "IPY_MODEL_f69d665f4fcc401397d0091dc425b001"
- ],
- "layout": "IPY_MODEL_ca8a8d5d3e2a42638f1b68050fcce963"
- }
- },
- "45eeb549b03649d9be138001aeb7843c": {
- "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_dc7a3b598c4d45bd9b8d1239c33b510b",
- "IPY_MODEL_de6abb9a77ca49549a873cdf65858cda",
- "IPY_MODEL_60473b3b063141699845d72b877d752a"
- ],
- "layout": "IPY_MODEL_9b1de65486e5484eb61ba378e9e1cefa"
- }
- },
- "4cdba09932964730b0917c67b10fb689": {
- "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
- }
- },
- "524e25298b9944a0b27ee4ebe8a5526e": {
- "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
- }
- },
- "59d686351f37454e96821ca29ceff7ee": {
- "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_0489efb30abc428582a028a93d228ed5",
- "placeholder": "",
- "style": "IPY_MODEL_72ebaf4b55314d599b8165f706a49230",
- "value": " 1.57k/1.57k [00:00<00:00, 47.9kB/s]"
- }
- },
- "5f55acf0d5ce40279d21e48b5ac4345c": {
- "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_9f121c61473b4a8b8eeff16b4b6f9d5d",
- "max": 1262055246,
- "min": 0,
- "orientation": "horizontal",
- "style": "IPY_MODEL_dafb418d0995486cb4d3099d23ec67b8",
- "value": 1262055246
- }
- },
- "60473b3b063141699845d72b877d752a": {
- "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_bd82c30b3a7c45b4af2a9064339fe84e",
- "placeholder": "",
- "style": "IPY_MODEL_bd6cde59f35f4022ab7e9fc3f93104a9",
- "value": " 291/291 [00:00<00:00, 9.64kB/s]"
- }
- },
- "66c8cada44244df18c473fd868ea0a8a": {
- "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_eec27fed27e24c27be025c83d22b61cf",
- "placeholder": "",
- "style": "IPY_MODEL_b5f26ca150b24c9e918a14acac198f54",
- "value": "Downloading: 100%"
- }
- },
- "675eefa2dbdc40e0a5a5517dc9eb00d6": {
- "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_7172e9a2593b4210ba309e6bdb4dc187",
- "IPY_MODEL_29f9a88a8b9741ba9f656e88be31b67f",
- "IPY_MODEL_3b2c2a7b03fb4b64857ef1da1cff90ec"
- ],
- "layout": "IPY_MODEL_c32e11c41bb34c68a339e9ed9a713fbc"
- }
- },
- "7172e9a2593b4210ba309e6bdb4dc187": {
- "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_1a3c25f5cf92427eaddec3acf849f04b",
- "placeholder": "",
- "style": "IPY_MODEL_f602a96212f64ff0b2c7430e9e402855",
- "value": "Downloading: 100%"
- }
- },
- "72ebaf4b55314d599b8165f706a49230": {
- "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": ""
- }
- },
- "7af8e7f6e148418f880e86685f65acaf": {
- "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
- }
- },
- "9b1de65486e5484eb61ba378e9e1cefa": {
- "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
- }
- },
- "9bfd8b36f86847dda8578ae272316b21": {
- "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": ""
- }
- },
- "9f121c61473b4a8b8eeff16b4b6f9d5d": {
- "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
- }
- },
- "9fe212aa47694fc2a87c9f59561fa2d4": {
- "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
- }
- },
- "ac569cb10d074b6da5033b8b3b34c731": {
- "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": ""
- }
- },
- "b5d0cb0d69aa4df59b8c53d4f70c5345": {
- "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
- }
- },
- "b5f26ca150b24c9e918a14acac198f54": {
- "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": ""
- }
- },
- "b9326a9c7f594cda90f683e299928300": {
- "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_d094c60966894d87b89a3f690bed522c",
- "IPY_MODEL_249faed19a95434ba146a227a0f14dba",
- "IPY_MODEL_59d686351f37454e96821ca29ceff7ee"
- ],
- "layout": "IPY_MODEL_24690773f20c4f1a917b0e847c254423"
- }
- },
- "bd6cde59f35f4022ab7e9fc3f93104a9": {
- "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": ""
- }
- },
- "bd82c30b3a7c45b4af2a9064339fe84e": {
- "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
- }
- },
- "c32e11c41bb34c68a339e9ed9a713fbc": {
- "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
- }
- },
- "c66ba171d6864e76b33884dcc53b1d1c": {
- "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": ""
- }
- },
- "c82cc9105e684f14a6a4c2b6a0d2b0c5": {
- "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": ""
- }
- },
- "ca8a8d5d3e2a42638f1b68050fcce963": {
- "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
- }
- },
- "d094c60966894d87b89a3f690bed522c": {
- "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_e03c1e027d5c414394cae1688974e8dd",
- "placeholder": "",
- "style": "IPY_MODEL_c82cc9105e684f14a6a4c2b6a0d2b0c5",
- "value": "Downloading: 100%"
- }
- },
- "d65226b4aaf04587990ff1b05bc837c6": {
- "model_module": "@jupyter-widgets/controls",
- "model_module_version": "1.5.0",
- "model_name": "ButtonStyleModel",
- "state": {
- "_model_module": "@jupyter-widgets/controls",
- "_model_module_version": "1.5.0",
- "_model_name": "ButtonStyleModel",
- "_view_count": null,
- "_view_module": "@jupyter-widgets/base",
- "_view_module_version": "1.2.0",
- "_view_name": "StyleView",
- "button_color": null,
- "font_weight": ""
- }
- },
- "dafb418d0995486cb4d3099d23ec67b8": {
- "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": ""
- }
- },
- "dc7a3b598c4d45bd9b8d1239c33b510b": {
- "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_4cdba09932964730b0917c67b10fb689",
- "placeholder": "",
- "style": "IPY_MODEL_e5c9003f439147f2a57578d68a947f6a",
- "value": "Downloading: 100%"
- }
- },
- "de6abb9a77ca49549a873cdf65858cda": {
- "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_42675b60ec444fa393f48779f6a5fc59",
- "max": 291,
- "min": 0,
- "orientation": "horizontal",
- "style": "IPY_MODEL_9bfd8b36f86847dda8578ae272316b21",
- "value": 291
- }
- },
- "e03c1e027d5c414394cae1688974e8dd": {
- "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
- }
- },
- "e5c9003f439147f2a57578d68a947f6a": {
- "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": ""
- }
- },
- "e61138f39e7641ec93671c21a645720a": {
- "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
- }
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " \n",
+ " Your browser does not support the audio element.\n",
+ " \n",
+ " "
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from IPython.display import Audio, display, clear_output\n",
+ "from colab_utils import record_audio\n",
+ "import ipywidgets as widgets\n",
+ "from scipy.io import wavfile\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "record_seconds = 20#@param {type:\"number\", min:1, max:10, step:1}\n",
+ "sample_rate = 16000\n",
+ "\n",
+ "def _record_audio(b):\n",
+ " clear_output()\n",
+ " audio = record_audio(record_seconds)\n",
+ " display(Audio(audio, rate=sample_rate, autoplay=True))\n",
+ " wavfile.write('recorded.wav', sample_rate, (32767*audio).numpy().astype(np.int16))\n",
+ "\n",
+ "button = widgets.Button(description=\"Record Speech\")\n",
+ "button.on_click(_record_audio)\n",
+ "display(button)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
},
- "ea67e226c77847aeb178f6d030a4b26e": {
- "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
- }
+ "id": "K0Ka85iA2gUC",
+ "outputId": "e7dc81d0-442a-4440-a58e-0288af34be8a"
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/usr/local/lib/python3.9/dist-packages/transformers/generation/utils.py:1313: UserWarning: Using `max_length`'s default (448) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation.\n",
+ " warnings.warn(\n"
+ ]
},
- "eabcbeba261740e08f09cc1513b337ad": {
- "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": ""
- }
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Whisper: In 1905, Einstein published four groundbreaking papers. These outlined the theory of the photoelectric effect, explained Brownian motion, introduced special relativity, and demonstrated mass-energy equivalence. Einstein thought that the laws of\n",
+ "Wav2vec2: in nineteen o five ennstein published foreground brickin papers thise outlined the theory of the photo electric effect explained brownin motion introduced special relativity and demonstrated mass energy equivalents ennstein thought that the laws\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(\"Whisper:\", get_transcription_whisper(\"recorded.wav\", whisper_model, whisper_processor))\n",
+ "print(\"Wav2vec2:\", get_transcription_wav2vec2(\"recorded.wav\", wav2vec2_model, wav2vec2_processor))"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "UbQxYoBXl9c7"
+ },
+ "source": [
+ "# Transcribing Long Audio Samples"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "id": "HLbh4VJxkxJp"
+ },
+ "outputs": [],
+ "source": [
+ "def get_long_transcription_whisper(audio_path, pipe, return_timestamps=True, \n",
+ " chunk_length_s=10, stride_length_s=2):\n",
+ " \"\"\"Get the transcription of a long audio file using the Whisper model\"\"\"\n",
+ " return pipe(load_audio(audio_path).numpy(), return_timestamps=return_timestamps,\n",
+ " chunk_length_s=chunk_length_s, stride_length_s=stride_length_s)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "2QypuIDAk5QK"
+ },
+ "outputs": [],
+ "source": [
+ "# initialize the pipeline\n",
+ "pipe = pipeline(\"automatic-speech-recognition\", \n",
+ " model=whisper_model_name, device=device)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "MwsBPkdSk7jn",
+ "outputId": "96b0582a-0743-45ec-d833-7ca21ffa706d"
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Disabling tokenizer parallelism, we're using DataLoader multithreading already\n"
+ ]
+ }
+ ],
+ "source": [
+ "# get the transcription of a sample long audio file\n",
+ "output = get_long_transcription_whisper(\n",
+ " \"https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav/", \n",
+ " pipe, chunk_length_s=10, stride_length_s=1)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 72
+ },
+ "id": "5xON5pvWlEEK",
+ "outputId": "179d7522-1f09-4176-84bf-5b6f2d85fd28"
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "string"
+ },
+ "text/plain": [
+ "' The horse trotted around the field at a brisk pace. Find the twin who stole the pearl necklace. Cut the cord that binds the box tightly. The The red tape bound the smuggled food. Look in the corner to find the tan shirt. The cold drizzle will halt the bond drive. Nine men were hired to dig the ruins. The junkyard had a moldy smell. The flint sputtered and lit a pine torch. Soak the cloth and drown the sharp odor..'"
+ ]
+ },
+ "execution_count": 23,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "output[\"text\"]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
},
- "ed2a73a73d054eb6a7d2294bedd368ca": {
+ "id": "AEjVdbKXk96r",
+ "outputId": "0daaf33a-a397-4a6c-dc3f-d56e5b678c83"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(0.0, 6.0) : The horse trotted around the field at a brisk pace.\n",
+ "(6.0, 12.8) : Find the twin who stole the pearl necklace.\n",
+ "(12.8, 21.0) : Cut the cord that binds the box tightly. The The red tape bound the smuggled food.\n",
+ "(21.0, 38.0) : Look in the corner to find the tan shirt. The cold drizzle will halt the bond drive. Nine men were hired to dig the ruins.\n",
+ "(38.0, 58.0) : The junkyard had a moldy smell. The flint sputtered and lit a pine torch. Soak the cloth and drown the sharp odor..\n"
+ ]
+ }
+ ],
+ "source": [
+ "for chunk in output[\"chunks\"]:\n",
+ " # print the timestamp and the text\n",
+ " print(chunk[\"timestamp\"], \":\", chunk[\"text\"])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "QsReWl7zlJt9"
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "gpuType": "T4",
+ "machine_shape": "hm",
+ "provenance": []
+ },
+ "gpuClass": "standard",
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "1c348712a37045239a35b41430756d4d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
- "model_name": "HBoxModel",
+ "model_name": "ButtonModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
- "_model_name": "HBoxModel",
+ "_model_name": "ButtonModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
- "_view_name": "HBoxView",
- "box_style": "",
- "children": [
- "IPY_MODEL_12b41877be1d410dbd44c54b4dfa21b1",
- "IPY_MODEL_3b08026412914f058ceccad5ca69ab9e",
- "IPY_MODEL_11581f616a1547e4af2fa8059361e120"
- ],
- "layout": "IPY_MODEL_b5d0cb0d69aa4df59b8c53d4f70c5345"
+ "_view_name": "ButtonView",
+ "button_style": "",
+ "description": "Record Speech",
+ "disabled": false,
+ "icon": "",
+ "layout": "IPY_MODEL_32d1d0fb4ee748108d01fa01fbfb5473",
+ "style": "IPY_MODEL_8035a1813fce41cfad51849aea43a446",
+ "tooltip": ""
}
},
- "eec27fed27e24c27be025c83d22b61cf": {
+ "32d1d0fb4ee748108d01fa01fbfb5473": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
@@ -2361,92 +989,20 @@
"width": null
}
},
- "f602a96212f64ff0b2c7430e9e402855": {
+ "8035a1813fce41cfad51849aea43a446": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
- "model_name": "DescriptionStyleModel",
+ "model_name": "ButtonStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
- "_model_name": "DescriptionStyleModel",
+ "_model_name": "ButtonStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
- "description_width": ""
- }
- },
- "f69d665f4fcc401397d0091dc425b001": {
- "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_e61138f39e7641ec93671c21a645720a",
- "placeholder": "",
- "style": "IPY_MODEL_c66ba171d6864e76b33884dcc53b1d1c",
- "value": " 1.18G/1.18G [00:31<00:00, 44.3MB/s]"
- }
- },
- "fb5bf22faf6348819bf9bd484dbf05e2": {
- "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
+ "button_color": null,
+ "font_weight": ""
}
}
}
diff --git a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py
index fa0add32..8cd7f7ba 100644
--- a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py
+++ b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py
@@ -1,5 +1,5 @@
# %%
-# !pip install transformers==4.11.2 datasets soundfile sentencepiece torchaudio pyaudio
+!pip install transformers==4.28.1 soundfile sentencepiece torchaudio pydub
# %%
from transformers import *
@@ -9,12 +9,21 @@
import os
import torchaudio
+device = "cuda:0" if torch.cuda.is_available() else "cpu"
+
+# %% [markdown]
+# # Wav2Vec2.0 Models
+#
+
# %%
-# model_name = "facebook/wav2vec2-base-960h" # 360MB
-model_name = "facebook/wav2vec2-large-960h-lv60-self" # 1.18GB
+# wav2vec2_model_name = "facebook/wav2vec2-base-960h" # 360MB
+wav2vec2_model_name = "facebook/wav2vec2-large-960h-lv60-self" # pretrained 1.26GB
+# wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-english" # English-only, 1.26GB
+# wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-arabic" # Arabic-only, 1.26GB
+# wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-spanish" # Spanish-only, 1.26GB
-processor = Wav2Vec2Processor.from_pretrained(model_name)
-model = Wav2Vec2ForCTC.from_pretrained(model_name)
+wav2vec2_processor = Wav2Vec2Processor.from_pretrained(wav2vec2_model_name)
+wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name).to(device)
# %%
# audio_url = "http://www.fit.vutbr.cz/~motlicek/sympatex/f2bjrop1.0.wav"
@@ -22,8 +31,8 @@
# audio_url = "http://www.fit.vutbr.cz/~motlicek/sympatex/f2btrop6.0.wav"
# audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/16-122828-0002.wav"
audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/30-4447-0004.wav"
+# audio_url = "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav"
# audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/7601-291468-0006.wav"
-# audio_url = "https://file-examples-com.github.io/uploads/2017/11/file_example_WAV_1MG.wav"
# audio_url = "http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav"
# %%
@@ -42,12 +51,12 @@
# %%
# tokenize our wav
-input_values = processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"]
+input_values = wav2vec2_processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"].to(device)
input_values.shape
# %%
# perform inference
-logits = model(input_values)["logits"]
+logits = wav2vec2_model(input_values)["logits"]
logits.shape
# %%
@@ -57,85 +66,168 @@
# %%
# decode the IDs to text
-transcription = processor.decode(predicted_ids[0])
+transcription = wav2vec2_processor.decode(predicted_ids[0])
transcription.lower()
# %%
-def get_transcription(audio_path):
+def load_audio(audio_path):
+ """Load the audio file & convert to 16,000 sampling rate"""
# load our wav file
speech, sr = torchaudio.load(audio_path)
- speech = speech.squeeze()
- # or using librosa
- # speech, sr = librosa.load(audio_file, sr=16000)
- # resample from whatever the audio sampling rate to 16000
resampler = torchaudio.transforms.Resample(sr, 16000)
speech = resampler(speech)
- # tokenize our wav
- input_values = processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"]
+ return speech.squeeze()
+
+# %%
+def get_transcription_wav2vec2(audio_path, model, processor):
+ speech = load_audio(audio_path)
+ input_features = processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"].to(device)
# perform inference
- logits = model(input_values)["logits"]
+ logits = model(input_features)["logits"]
# use argmax to get the predicted IDs
predicted_ids = torch.argmax(logits, dim=-1)
- # decode the IDs to text
- transcription = processor.decode(predicted_ids[0])
+ transcription = processor.batch_decode(predicted_ids)[0]
return transcription.lower()
# %%
-get_transcription(audio_url)
+get_transcription_wav2vec2("http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav",
+ wav2vec2_model,
+ wav2vec2_processor)
+
+# %% [markdown]
+# # Whisper Models
+
+# %%
+# whisper_model_name = "openai/whisper-tiny.en" # English-only, ~ 151 MB
+# whisper_model_name = "openai/whisper-base.en" # English-only, ~ 290 MB
+# whisper_model_name = "openai/whisper-small.en" # English-only, ~ 967 MB
+# whisper_model_name = "openai/whisper-medium.en" # English-only, ~ 3.06 GB
+# whisper_model_name = "openai/whisper-tiny" # multilingual, ~ 151 MB
+# whisper_model_name = "openai/whisper-base" # multilingual, ~ 290 MB
+# whisper_model_name = "openai/whisper-small" # multilingual, ~ 967 MB
+whisper_model_name = "openai/whisper-medium" # multilingual, ~ 3.06 GB
+# whisper_model_name = "openai/whisper-large-v2" # multilingual, ~ 6.17 GB
+
+whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name)
+whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device)
+
+# %%
+input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors="pt").input_features.to(device)
+
+# %%
+forced_decoder_ids = whisper_processor.get_decoder_prompt_ids(language="english", task="transcribe")
+
+# %%
+forced_decoder_ids
+
+# %%
+input_features.shape
+
+# %%
+predicted_ids = whisper_model.generate(input_features, forced_decoder_ids=forced_decoder_ids)
+predicted_ids.shape
+
+# %%
+transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=True)
+transcription
+
+# %%
+transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=False)
+transcription
+
+# %%
+def get_transcription_whisper(audio_path, model, processor, language="english", skip_special_tokens=True):
+ # resample from whatever the audio sampling rate to 16000
+ speech = load_audio(audio_path)
+ input_features = processor(speech, return_tensors="pt", sampling_rate=16000).input_features
+ forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task="transcribe")
+ # print(forced_decoder_ids)
+ predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)
+ transcription = processor.batch_decode(predicted_ids, skip_special_tokens=skip_special_tokens)[0]
+ return transcription
+
+# %%
+arabic_transcription = get_transcription_whisper("https://datasets-server.huggingface.co/assets/arabic_speech_corpus/--/clean/train/0/audio/audio.wav",
+ whisper_model,
+ whisper_processor,
+ language="arabic",
+ skip_special_tokens=True)
+arabic_transcription
+
+# %%
+spanish_transcription = get_transcription_whisper("https://www.lightbulblanguages.co.uk/resources/sp-audio/cual-es-la-fecha-cumple.mp3",
+ whisper_model,
+ whisper_processor,
+ language="spanish",
+ skip_special_tokens=True)
+spanish_transcription
+
+# %%
+from transformers.models.whisper.tokenization_whisper import TO_LANGUAGE_CODE
+# supported languages
+TO_LANGUAGE_CODE
+
+# %% [markdown]
+# # Transcribe your Voice
# %%
-import pyaudio
-import wave
+!git clone -q --depth 1 https://github.com/snakers4/silero-models
-# the file name output you want to record into
-filename = "recorded.wav"
-# set the chunk size of 1024 samples
-chunk = 1024
-# sample format
-FORMAT = pyaudio.paInt16
-# mono, change to 2 if you want stereo
-channels = 1
-# 44100 samples per second
+%cd silero-models
+
+# %%
+from IPython.display import Audio, display, clear_output
+from colab_utils import record_audio
+import ipywidgets as widgets
+from scipy.io import wavfile
+import numpy as np
+
+
+record_seconds = 20#@param {type:"number", min:1, max:10, step:1}
sample_rate = 16000
-record_seconds = 10
-# initialize PyAudio object
-p = pyaudio.PyAudio()
-# open stream object as input & output
-stream = p.open(format=FORMAT,
- channels=channels,
- rate=sample_rate,
- input=True,
- output=True,
- frames_per_buffer=chunk)
-frames = []
-print("Recording...")
-for i in range(int(sample_rate / chunk * record_seconds)):
- data = stream.read(chunk)
- # if you want to hear your voice while recording
- # stream.write(data)
- frames.append(data)
-print("Finished recording.")
-# stop and close stream
-stream.stop_stream()
-stream.close()
-# terminate pyaudio object
-p.terminate()
-# save audio file
-# open the file in 'write bytes' mode
-wf = wave.open(filename, "wb")
-# set the channels
-wf.setnchannels(channels)
-# set the sample format
-wf.setsampwidth(p.get_sample_size(FORMAT))
-# set the sample rate
-wf.setframerate(sample_rate)
-# write the frames as bytes
-wf.writeframes(b"".join(frames))
-# close the file
-wf.close()
-
-# %%
-get_transcription("recorded.wav")
+
+def _record_audio(b):
+ clear_output()
+ audio = record_audio(record_seconds)
+ display(Audio(audio, rate=sample_rate, autoplay=True))
+ wavfile.write('recorded.wav', sample_rate, (32767*audio).numpy().astype(np.int16))
+
+button = widgets.Button(description="Record Speech")
+button.on_click(_record_audio)
+display(button)
+
+# %%
+print("Whisper:", get_transcription_whisper("recorded.wav", whisper_model, whisper_processor))
+print("Wav2vec2:", get_transcription_wav2vec2("recorded.wav", wav2vec2_model, wav2vec2_processor))
+
+# %% [markdown]
+# # Transcribing Long Audio Samples
+
+# %%
+def get_long_transcription_whisper(audio_path, pipe, return_timestamps=True,
+ chunk_length_s=10, stride_length_s=2):
+ """Get the transcription of a long audio file using the Whisper model"""
+ return pipe(load_audio(audio_path).numpy(), return_timestamps=return_timestamps,
+ chunk_length_s=chunk_length_s, stride_length_s=stride_length_s)
+
+# %%
+# initialize the pipeline
+pipe = pipeline("automatic-speech-recognition",
+ model=whisper_model_name, device=device)
+
+# %%
+# get the transcription of a sample long audio file
+output = get_long_transcription_whisper(
+ "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav",
+ pipe, chunk_length_s=10, stride_length_s=1)
+
+# %%
+output["text"]
+
+# %%
+for chunk in output["chunks"]:
+ # print the timestamp and the text
+ print(chunk["timestamp"], ":", chunk["text"])
# %%
diff --git a/machine-learning/nlp/speech-recognition-transformers/README.md b/machine-learning/nlp/speech-recognition-transformers/README.md
index a7653ab5..37c9ac98 100644
--- a/machine-learning/nlp/speech-recognition-transformers/README.md
+++ b/machine-learning/nlp/speech-recognition-transformers/README.md
@@ -2,4 +2,4 @@
To get it running:
- `pip3 install -r requirements.txt`
-Check the [the tutorial](https://www.thepythoncode.com/article/speech-recognition-using-huggingface-transformers-in-python) and the [Colab notebook](https://colab.research.google.com/drive/1-0M8zvQrOzlZ8U8l7KdPOuLBNtzqtlsz?usp=sharing) for more information.
\ No newline at end of file
+Check the [the tutorial](https://www.thepythoncode.com/article/speech-recognition-using-huggingface-transformers-in-python) and the [Colab notebook](https://colab.research.google.com/drive/1NwX-czUflXUEMoZNfoKgCQTsjcMKSUul) for more information.
\ No newline at end of file
diff --git a/machine-learning/nlp/speech-recognition-transformers/requirements.txt b/machine-learning/nlp/speech-recognition-transformers/requirements.txt
index 4cc3d03a..ab309e08 100644
--- a/machine-learning/nlp/speech-recognition-transformers/requirements.txt
+++ b/machine-learning/nlp/speech-recognition-transformers/requirements.txt
@@ -1,4 +1,4 @@
-transformers==4.11.2
+transformers==4.28.1
soundfile
sentencepiece
torchaudio
diff --git a/machine-learning/nlp/wer-score/README.md b/machine-learning/nlp/wer-score/README.md
new file mode 100644
index 00000000..8e33c7f9
--- /dev/null
+++ b/machine-learning/nlp/wer-score/README.md
@@ -0,0 +1,6 @@
+# [Word Error Rate in Python](https://www.thepythoncode.com/article/calculate-word-error-rate-in-python)
+- `pip install -r requirements.txt`
+- `wer_basic.py` is the basic implementation of WER algorithm.
+- `wer_accurate.py` is the accurate implementation of WER algorithm.
+- `wer_jiwer.py` is the implementation of WER algorithm using [jiwer](https://pypi.org/project/jiwer/).
+- `wer_evaluate.py` is the implementation of WER algorithm using [evaluate](https://pypi.org/project/evaluate/).
\ No newline at end of file
diff --git a/machine-learning/nlp/wer-score/requirements.txt b/machine-learning/nlp/wer-score/requirements.txt
new file mode 100644
index 00000000..577cfc06
--- /dev/null
+++ b/machine-learning/nlp/wer-score/requirements.txt
@@ -0,0 +1,3 @@
+numpy
+jiwer
+evaluate
\ No newline at end of file
diff --git a/machine-learning/nlp/wer-score/wer_accurate.py b/machine-learning/nlp/wer-score/wer_accurate.py
new file mode 100644
index 00000000..b5dbc29a
--- /dev/null
+++ b/machine-learning/nlp/wer-score/wer_accurate.py
@@ -0,0 +1,44 @@
+import numpy as np
+
+def calculate_wer(reference, hypothesis):
+ # Split the reference and hypothesis sentences into words
+ ref_words = reference.split()
+ hyp_words = hypothesis.split()
+ # Initialize a matrix with size |ref_words|+1 x |hyp_words|+1
+ # The extra row and column are for the case when one of the strings is empty
+ d = np.zeros((len(ref_words) + 1, len(hyp_words) + 1))
+ # The number of operations for an empty hypothesis to become the reference
+ # is just the number of words in the reference (i.e., deleting all words)
+ for i in range(len(ref_words) + 1):
+ d[i, 0] = i
+ # The number of operations for an empty reference to become the hypothesis
+ # is just the number of words in the hypothesis (i.e., inserting all words)
+ for j in range(len(hyp_words) + 1):
+ d[0, j] = j
+ # Iterate over the words in the reference and hypothesis
+ for i in range(1, len(ref_words) + 1):
+ for j in range(1, len(hyp_words) + 1):
+ # If the current words are the same, no operation is needed
+ # So we just take the previous minimum number of operations
+ if ref_words[i - 1] == hyp_words[j - 1]:
+ d[i, j] = d[i - 1, j - 1]
+ else:
+ # If the words are different, we consider three operations:
+ # substitution, insertion, and deletion
+ # And we take the minimum of these three possibilities
+ substitution = d[i - 1, j - 1] + 1
+ insertion = d[i, j - 1] + 1
+ deletion = d[i - 1, j] + 1
+ d[i, j] = min(substitution, insertion, deletion)
+ # The minimum number of operations to transform the hypothesis into the reference
+ # is in the bottom-right cell of the matrix
+ # We divide this by the number of words in the reference to get the WER
+ wer = d[len(ref_words), len(hyp_words)] / len(ref_words)
+ return wer
+
+
+
+if __name__ == "__main__":
+ reference = "The cat is sleeping on the mat."
+ hypothesis = "The cat is playing on mat."
+ print(calculate_wer(reference, hypothesis))
diff --git a/machine-learning/nlp/wer-score/wer_basic.py b/machine-learning/nlp/wer-score/wer_basic.py
new file mode 100644
index 00000000..9cc3917b
--- /dev/null
+++ b/machine-learning/nlp/wer-score/wer_basic.py
@@ -0,0 +1,21 @@
+def calculate_wer(reference, hypothesis):
+ ref_words = reference.split()
+ hyp_words = hypothesis.split()
+
+ # Counting the number of substitutions, deletions, and insertions
+ substitutions = sum(1 for ref, hyp in zip(ref_words, hyp_words) if ref != hyp)
+ deletions = len(ref_words) - len(hyp_words)
+ insertions = len(hyp_words) - len(ref_words)
+
+ # Total number of words in the reference text
+ total_words = len(ref_words)
+
+ # Calculating the Word Error Rate (WER)
+ wer = (substitutions + deletions + insertions) / total_words
+ return wer
+
+
+if __name__ == "__main__":
+ reference = "the cat sat on the mat"
+ hypothesis = "the cat mat"
+ print(calculate_wer(reference, hypothesis))
\ No newline at end of file
diff --git a/machine-learning/nlp/wer-score/wer_evaluate.py b/machine-learning/nlp/wer-score/wer_evaluate.py
new file mode 100644
index 00000000..818bf408
--- /dev/null
+++ b/machine-learning/nlp/wer-score/wer_evaluate.py
@@ -0,0 +1,9 @@
+import evaluate
+
+wer = evaluate.load("wer")
+
+# reference = "the cat sat on the mat"
+# hypothesis = "the cat mat"
+reference = "The cat is sleeping on the mat."
+hypothesis = "The cat is playing on mat."
+print(wer.compute(references=[reference], predictions=[hypothesis]))
\ No newline at end of file
diff --git a/machine-learning/nlp/wer-score/wer_jiwer.py b/machine-learning/nlp/wer-score/wer_jiwer.py
new file mode 100644
index 00000000..28fa9572
--- /dev/null
+++ b/machine-learning/nlp/wer-score/wer_jiwer.py
@@ -0,0 +1,8 @@
+from jiwer import wer
+
+if __name__ == "__main__":
+ # reference = "the cat sat on the mat"
+ # hypothesis = "the cat mat"
+ reference = "The cat is sleeping on the mat."
+ hypothesis = "The cat is playing on mat."
+ print(wer(reference, hypothesis))
\ No newline at end of file
diff --git a/machine-learning/object-detection/1.mp4 b/machine-learning/object-detection/1.mp4
new file mode 100644
index 00000000..44305cce
Binary files /dev/null and b/machine-learning/object-detection/1.mp4 differ
diff --git a/machine-learning/object-detection/README.md b/machine-learning/object-detection/README.md
index ddb8f0bd..a73112ac 100644
--- a/machine-learning/object-detection/README.md
+++ b/machine-learning/object-detection/README.md
@@ -1,20 +1,19 @@
# [How to Perform YOLO Object Detection using OpenCV and PyTorch in Python](https://www.thepythoncode.com/article/yolo-object-detection-with-opencv-and-pytorch-in-python)
To run this:
- `pip3 install -r requirements.txt`
-- Download the [model weights](https://pjreddie.com/media/files/yolov3.weights) and put them in `weights` folder.
- To generate a object detection image on `images/dog.jpg`:
```
- python yolo_opencv.py images/dog.jpg
+ python yolov8_opencv.py images/dog.jpg
```
- A new image `dog_yolo3.jpg` will appear which has the bounding boxes of different objects in the image.
+ A new image `dog_yolo8.jpg` will appear which has the bounding boxes of different objects in the image.
- For live object detection:
```
- python live_yolo_opencv.py
+ python live_yolov8_opencv.py
```
- If you want to read from a video file and make predictions:
```
- python read_video.py video.avi
+ python read_video_yolov8.py 1.mp4
```
This will start detecting objects in that video, in the end, it'll save the resulting video to `output.avi`
-- If you wish to use PyTorch for GPU acceleration, please install PyTorch CUDA [here](https://pytorch.org/get-started) and use `yolo.py` file.
+- Old files for YOLOv3: `yolo_opencv.py`, `live_yolo_opencv.py`, `read_video.py`
- Feel free to edit the codes for your needs!
diff --git a/machine-learning/object-detection/live_yolov8_opencv.py b/machine-learning/object-detection/live_yolov8_opencv.py
new file mode 100644
index 00000000..c91b13d2
--- /dev/null
+++ b/machine-learning/object-detection/live_yolov8_opencv.py
@@ -0,0 +1,75 @@
+import cv2
+import numpy as np
+
+import time
+import sys
+
+from ultralytics import YOLO
+
+
+CONFIDENCE = 0.5
+font_scale = 1
+thickness = 1
+labels = open("data/coco.names").read().strip().split("\n")
+colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8")
+
+model = YOLO("yolov8n.pt")
+
+cap = cv2.VideoCapture(0)
+_, image = cap.read()
+h, w = image.shape[:2]
+fourcc = cv2.VideoWriter_fourcc(*"XVID")
+out = cv2.VideoWriter("output.avi", fourcc, 20.0, (w, h))
+while True:
+ _, image = cap.read()
+
+ start = time.perf_counter()
+ # run inference on the image
+ # see: https://docs.ultralytics.com/modes/predict/#arguments for full list of arguments
+ results = model.predict(image, conf=CONFIDENCE)[0]
+ time_took = time.perf_counter() - start
+ print("Time took:", time_took)
+
+ # loop over the detections
+ for data in results.boxes.data.tolist():
+ # get the bounding box coordinates, confidence, and class id
+ xmin, ymin, xmax, ymax, confidence, class_id = data
+ # converting the coordinates and the class id to integers
+ xmin = int(xmin)
+ ymin = int(ymin)
+ xmax = int(xmax)
+ ymax = int(ymax)
+ class_id = int(class_id)
+
+ # draw a bounding box rectangle and label on the image
+ color = [int(c) for c in colors[class_id]]
+ cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness)
+ text = f"{labels[class_id]}: {confidence:.2f}"
+ # calculate text width & height to draw the transparent boxes as background of the text
+ (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0]
+ text_offset_x = xmin
+ text_offset_y = ymin - 5
+ box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height))
+ overlay = image.copy()
+ cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED)
+ # add opacity (transparency to the box)
+ image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0)
+ # now put the text (label: confidence %)
+ cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX,
+ fontScale=font_scale, color=(0, 0, 0), thickness=thickness)
+
+ # end time to compute the fps
+ end = time.perf_counter()
+ # calculate the frame per second and draw it on the frame
+ fps = f"FPS: {1 / (end - start):.2f}"
+ cv2.putText(image, fps, (50, 50),
+ cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 255, 0), 6)
+ out.write(image)
+ cv2.imshow("image", image)
+
+ if ord("q") == cv2.waitKey(1):
+ break
+
+
+cap.release()
+cv2.destroyAllWindows()
\ No newline at end of file
diff --git a/machine-learning/object-detection/read_video_yolov8.py b/machine-learning/object-detection/read_video_yolov8.py
new file mode 100644
index 00000000..3d02fddf
--- /dev/null
+++ b/machine-learning/object-detection/read_video_yolov8.py
@@ -0,0 +1,79 @@
+import cv2
+import numpy as np
+
+import time
+import sys
+
+from ultralytics import YOLO
+
+# define some parameters
+CONFIDENCE = 0.5
+font_scale = 1
+thickness = 1
+labels = open("data/coco.names").read().strip().split("\n")
+colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8")
+
+# loading the YOLOv8 model with the default weight file
+model = YOLO("yolov8n.pt")
+
+# read the file from the command line
+video_file = sys.argv[1]
+cap = cv2.VideoCapture(video_file)
+_, image = cap.read()
+h, w = image.shape[:2]
+fourcc = cv2.VideoWriter_fourcc(*"XVID")
+out = cv2.VideoWriter("output.avi", fourcc, 20.0, (w, h))
+while True:
+ _, image = cap.read()
+
+ start = time.perf_counter()
+ results = model.predict(image, conf=CONFIDENCE)[0]
+ time_took = time.perf_counter() - start
+ print("Time took:", time_took)
+
+ # loop over the detections
+ for data in results.boxes.data.tolist():
+ # get the bounding box coordinates, confidence, and class id
+ xmin, ymin, xmax, ymax, confidence, class_id = data
+ # converting the coordinates and the class id to integers
+ xmin = int(xmin)
+ ymin = int(ymin)
+ xmax = int(xmax)
+ ymax = int(ymax)
+ class_id = int(class_id)
+
+ # draw a bounding box rectangle and label on the image
+ color = [int(c) for c in colors[class_id]]
+ cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness)
+ text = f"{labels[class_id]}: {confidence:.2f}"
+ # calculate text width & height to draw the transparent boxes as background of the text
+ (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0]
+ text_offset_x = xmin
+ text_offset_y = ymin - 5
+ box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height))
+ try:
+ overlay = image.copy()
+ except:
+ break
+ cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED)
+ # add opacity (transparency to the box)
+ image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0)
+ # now put the text (label: confidence %)
+ cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX,
+ fontScale=font_scale, color=(0, 0, 0), thickness=thickness)
+
+ # end time to compute the fps
+ end = time.perf_counter()
+ # calculate the frame per second and draw it on the frame
+ fps = f"FPS: {1 / (end - start):.2f}"
+ cv2.putText(image, fps, (50, 50),
+ cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 255, 0), 6)
+ out.write(image)
+ cv2.imshow("image", image)
+
+ if ord("q") == cv2.waitKey(1):
+ break
+
+
+cap.release()
+cv2.destroyAllWindows()
\ No newline at end of file
diff --git a/machine-learning/object-detection/requirements.txt b/machine-learning/object-detection/requirements.txt
index ad07e21c..089e32c6 100644
--- a/machine-learning/object-detection/requirements.txt
+++ b/machine-learning/object-detection/requirements.txt
@@ -1,3 +1,4 @@
opencv-python
numpy
-matplotlib
\ No newline at end of file
+matplotlib
+ultralytics
\ No newline at end of file
diff --git a/machine-learning/object-detection/yolov8_opencv.py b/machine-learning/object-detection/yolov8_opencv.py
new file mode 100644
index 00000000..85b5a298
--- /dev/null
+++ b/machine-learning/object-detection/yolov8_opencv.py
@@ -0,0 +1,68 @@
+import numpy as np
+import os
+import cv2
+import time
+import sys
+from ultralytics import YOLO
+
+# define some parameters
+CONFIDENCE = 0.5
+font_scale = 1
+thickness = 1
+
+# loading the YOLOv8 model with the default weight file
+model = YOLO("yolov8n.pt")
+
+# loading all the class labels (objects)
+labels = open("data/coco.names").read().strip().split("\n")
+
+# generating colors for each object for later plotting
+colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8")
+
+path_name = sys.argv[1]
+image = cv2.imread(path_name)
+file_name = os.path.basename(path_name) # "dog.jpg"
+filename, ext = file_name.split(".") # "dog", "jpg"
+
+# measure how much it took in seconds
+start = time.perf_counter()
+# run inference on the image
+# see: https://docs.ultralytics.com/modes/predict/#arguments for full list of arguments
+results = model.predict(image, conf=CONFIDENCE)[0]
+time_took = time.perf_counter() - start
+print(f"Time took: {time_took:.2f}s")
+print(results.boxes.data)
+
+# loop over the detections
+for data in results.boxes.data.tolist():
+ # get the bounding box coordinates, confidence, and class id
+ xmin, ymin, xmax, ymax, confidence, class_id = data
+ # converting the coordinates and the class id to integers
+ xmin = int(xmin)
+ ymin = int(ymin)
+ xmax = int(xmax)
+ ymax = int(ymax)
+ class_id = int(class_id)
+
+ # draw a bounding box rectangle and label on the image
+ color = [int(c) for c in colors[class_id]]
+ cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness)
+ text = f"{labels[class_id]}: {confidence:.2f}"
+ # calculate text width & height to draw the transparent boxes as background of the text
+ (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0]
+ text_offset_x = xmin
+ text_offset_y = ymin - 5
+ box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height))
+ overlay = image.copy()
+ cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED)
+ # add opacity (transparency to the box)
+ image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0)
+ # now put the text (label: confidence %)
+ cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX,
+ fontScale=font_scale, color=(0, 0, 0), thickness=thickness)
+
+# display output image
+cv2.imshow("Image", image)
+cv2.waitKey(0)
+# save output image to disk
+cv2.imwrite(filename + "_yolo8." + ext, image)
diff --git a/machine-learning/speech-recognition/long_audio_recognizer.py b/machine-learning/speech-recognition/long_audio_recognizer.py
index 2f8b66a0..f242f92c 100644
--- a/machine-learning/speech-recognition/long_audio_recognizer.py
+++ b/machine-learning/speech-recognition/long_audio_recognizer.py
@@ -7,16 +7,24 @@
# create a speech recognition object
r = sr.Recognizer()
-# a function that splits the audio file into chunks
+# a function to recognize speech in the audio file
+# so that we don't repeat ourselves in in other functions
+def transcribe_audio(path):
+ # use the audio file as the audio source
+ with sr.AudioFile(path) as source:
+ audio_listened = r.record(source)
+ # try converting it to text
+ text = r.recognize_google(audio_listened)
+ return text
+
+# a function that splits the audio file into chunks on silence
# and applies speech recognition
-def get_large_audio_transcription(path):
- """
- Splitting the large audio file into chunks
- and apply speech recognition on each of these chunks
- """
+def get_large_audio_transcription_on_silence(path):
+ """Splitting the large audio file into chunks
+ and apply speech recognition on each of these chunks"""
# open the audio file using pydub
- sound = AudioSegment.from_wav(path)
- # split audio sound where silence is 700 miliseconds or more and get chunks
+ sound = AudioSegment.from_file(path)
+ # split audio sound where silence is 500 miliseconds or more and get chunks
chunks = split_on_silence(sound,
# experiment with this value for your target audio file
min_silence_len = 500,
@@ -37,24 +45,59 @@ def get_large_audio_transcription(path):
chunk_filename = os.path.join(folder_name, f"chunk{i}.wav")
audio_chunk.export(chunk_filename, format="wav")
# recognize the chunk
- with sr.AudioFile(chunk_filename) as source:
- audio_listened = r.record(source)
- # try converting it to text
- try:
- text = r.recognize_google(audio_listened)
- except sr.UnknownValueError as e:
- print("Error:", str(e))
- else:
- text = f"{text.capitalize()}. "
- print(chunk_filename, ":", text)
- whole_text += text
+ try:
+ text = transcribe_audio(chunk_filename)
+ except sr.UnknownValueError as e:
+ print("Error:", str(e))
+ else:
+ text = f"{text.capitalize()}. "
+ print(chunk_filename, ":", text)
+ whole_text += text
# return the text for all chunks detected
return whole_text
+# a function that splits the audio file into fixed interval chunks
+# and applies speech recognition
+def get_large_audio_transcription_fixed_interval(path, minutes=5):
+ """Splitting the large audio file into fixed interval chunks
+ and apply speech recognition on each of these chunks"""
+ # open the audio file using pydub
+ sound = AudioSegment.from_file(path)
+ # split the audio file into chunks
+ chunk_length_ms = int(1000 * 60 * minutes) # convert to milliseconds
+ chunks = [sound[i:i + chunk_length_ms] for i in range(0, len(sound), chunk_length_ms)]
+ folder_name = "audio-fixed-chunks"
+ # create a directory to store the audio chunks
+ if not os.path.isdir(folder_name):
+ os.mkdir(folder_name)
+ whole_text = ""
+ # process each chunk
+ for i, audio_chunk in enumerate(chunks, start=1):
+ # export audio chunk and save it in
+ # the `folder_name` directory.
+ chunk_filename = os.path.join(folder_name, f"chunk{i}.wav")
+ audio_chunk.export(chunk_filename, format="wav")
+ # recognize the chunk
+ try:
+ text = transcribe_audio(chunk_filename)
+ except sr.UnknownValueError as e:
+ print("Error:", str(e))
+ else:
+ text = f"{text.capitalize()}. "
+ print(chunk_filename, ":", text)
+ whole_text += text
+ # return the text for all chunks detected
+ return whole_text
+
+
+
if __name__ == '__main__':
import sys
# path = "30-4447-0004.wav"
# path = "7601-291468-0006.wav"
path = sys.argv[1]
- print("\nFull text:", get_large_audio_transcription(path))
\ No newline at end of file
+ print("\nFull text:", get_large_audio_transcription_on_silence(path))
+ print("="*50)
+ print("\nFull text:", get_large_audio_transcription_fixed_interval(path, minutes=1/6))
+
\ No newline at end of file
diff --git a/machine-learning/stable-diffusion-models/GenerateImagesFromText_StableDiffusion_PythonCodeTutorial.ipynb b/machine-learning/stable-diffusion-models/GenerateImagesFromText_StableDiffusion_PythonCodeTutorial.ipynb
new file mode 100644
index 00000000..aee6b7dc
--- /dev/null
+++ b/machine-learning/stable-diffusion-models/GenerateImagesFromText_StableDiffusion_PythonCodeTutorial.ipynb
@@ -0,0 +1,6326 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "ZgIU4Ga56Tiq",
+ "outputId": "764ce650-379a-4bed-d5fb-b5052af024c9"
+ },
+ "outputs": [],
+ "source": [
+ "%pip install --quiet --upgrade diffusers transformers accelerate"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "S919oAK46Z8x",
+ "outputId": "74fe51b4-157d-48a0-9067-6947e2a71bb8"
+ },
+ "outputs": [],
+ "source": [
+ "# The xformers package is mandatory to be able to create several 768x768 images.\n",
+ "%pip install -q xformers==0.0.16rc425"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "Dn2_-E5Sa9Rn"
+ },
+ "source": [
+ "# Using Dreamlike Photoreal"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "WGIvJ0hE6Z_B"
+ },
+ "outputs": [],
+ "source": [
+ "from diffusers import StableDiffusionPipeline\n",
+ "import torch"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 433,
+ "referenced_widgets": [
+ "d02fc695003f435e9ec25e5ab7eec2bc",
+ "e16097842da34cd0bc24cfaeab3de404",
+ "0d2fba8088804ecab806472f5396f1bc",
+ "8bef2ecbcbcf4ad1bb5e495a52ca2aa6",
+ "9a2aa30940934458ae53131db74a7406",
+ "45e95708fe6043c68fd25d8802778998",
+ "da5028411a634a2eb2e1ed3fcc53ed6c",
+ "bc42d1c7cdcd4064a1dbcc3eb1f3009b",
+ "fe3c4a4e4c8b4752a1f1d88da73fb808",
+ "62924d5b19784abcaa672d995fc15127",
+ "833477c7e6144deba2f9a7e1e3fb7c12",
+ "89129c49f76e497a8fb218b8126dc4d9",
+ "4ac86feba0924fad8c82be426d774ce4",
+ "379e92c07edc4ad28165c8b0926746d5",
+ "a144d82a835e4d48b987fecd5af96b6c",
+ "fc3fc7c8bb714f39a67963f2792b527d",
+ "3a0dacdec71447a490820baf3a405580",
+ "bf0a27e1f6f3454fafa2bb04a16e4ba6",
+ "06a9b1722db8473597c3a6cf17dafa29",
+ "621ceb287f8243f5a2952613c01f3f82",
+ "d78921386a5b493ab86718077b16a945",
+ "42ad2fe1e9ee44dcb9d3b7c6af9a87a1",
+ "dbccb67e488b40faa3719e8db6e562a2",
+ "d2598bdd44164f77a581fb0afad817f6",
+ "03fe79b7b7c5439c99fef039f96a831b",
+ "9ac0da7a10a54fbe897b21184cdf154f",
+ "32e55f352157421aa3e1fef5819b3587",
+ "23cd6b916dfe4e5faa4021cf02d07f53",
+ "d97f27872680454ba3574589b371ea97",
+ "d438504eef684317a6c09cc0b123d25d",
+ "26b8bf61f8e44014a005ed10835f68b5",
+ "faa6428f4b7b4cb996cc4d5ca9bcb38c",
+ "b4f99623a96f4d18989cf117b4c91660",
+ "8ae0743d19d74e3aabfe4b5ba54fd7ca",
+ "0072680043674280bcde9c4bc19b3704",
+ "13e357cba1ee4e31887f2c260f2cea15",
+ "41c2930f406d484ca7e1e8a4c13f9b35",
+ "0468827f86394f7baf78d44264a225e7",
+ "260d5617f5e247f3a978a28d5fe72740",
+ "5eba2d04c1c54016834e7dddd253a380",
+ "5573d97394b144d6b8f4065bf81e6d05",
+ "245a11e3ca454d26895c46a5c08be822",
+ "12808180b0b64ecd90839c791134b5fb",
+ "115b71885ef241fb8884e8de28dfdb8c",
+ "51b9487b43204e23bc11c2693f46ff72",
+ "2c63224632c04b159f2c9453e4ca3c15",
+ "5568e424494e406ea991d0c778924aa8",
+ "f0d04527bbe94bfdb91353827c2ad7db",
+ "d1bf7fca5177409290ea45d701774d6d",
+ "68b6a1a9d4c7422d9263e00cbd956be1",
+ "c79ef9b35d014fdfb9f88fc09e870d01",
+ "77755839ec0946c5b33488dd412f4d58",
+ "f7d7fb787f884822aa3e5cdbfab22b1d",
+ "016df28dd739433daa2c8d3b1706486c",
+ "43aa766628a147548714ef986c9d979a",
+ "7989fe19c8b749ddaa60c5c7b5cec0ea",
+ "773661aa8b6e4c0db5238cfe398b2b5b",
+ "21d9342ed95d4bf0959647ef57fceb97",
+ "0bb6ef1e3a2d43ca970723b0e5ac93cf",
+ "0b9c78977b6a45da9aa6ada3332fbc28",
+ "67a3104f358e48459f458fddf98b826e",
+ "b63595513fec4e81a0a8200294faf7ba",
+ "ad2f2fd194ac4bca909e5af122370e3d",
+ "0c34c9ecc697483e831333d67a48ff32",
+ "134ae8a21fc2489e9e7524eb856ef778",
+ "7debd7332d4a4811ad653398344420f4",
+ "e9e33bc9dfd843e88f9f56c0400b07e2",
+ "9307ea294e42484eb32d8b07fddd33dd",
+ "a509f68381854d7da52a21dde99a9f62",
+ "406fd8a742b443968d3f2fc1d3dbfef1",
+ "03433d859a7a4f3cae64d9d0bf374643",
+ "b02317ef6e514fa9b2c58c64e7702533",
+ "df83f20f558f43b9bf1e447316e9de4a",
+ "1cfa604ca2924c25930887b466ac3e9b",
+ "26aac0b253ba4e2e8f19acfa0bead5a7",
+ "7d9b49d6dbfc41988b2c3c6ac40a3cae",
+ "35b84a2a8e0749268b14492abcf0af1f",
+ "14bc95aacebc43a8877bc36c58effccf",
+ "30f32feefcbd486c86cb68c927dd9fca",
+ "0e46fe7538ed4df9b8fa1f36b4b35cdd",
+ "6e0be2c85237496eb97b53963654dffa",
+ "9c751e805d96415d9608c2422906d76e",
+ "1923427b93ae424bb5d91bab418506a9",
+ "c99c614b55ba44fbb2927642128fba9b",
+ "ec377a46cf8647ff891a920c46897786",
+ "4e264808109e4b52983260067550883e",
+ "163075971def4198b5cc7a0d5ec3c81d",
+ "9984e9b0a929433ab6e4501538a60c80",
+ "d26404f63c3240d28ed1af7527307317",
+ "7f29483722954a3697afb9cb24430e8c",
+ "ad3538e88909423a9a8d109bd97745a5",
+ "f1e7ac9f310140f0adac525362d99180",
+ "ce3ebc0beb214d9b9df35c37eff91505",
+ "209020cdb39942178adbc7cc3acf1cb0",
+ "e68ae70236b04e5aa6c5de879ca81e9e",
+ "caf7f52d17334c0ea9141fb27dbb5bd1",
+ "3634354fd978434bbad0fd11d3e0b5fb",
+ "9e1a5419468d4549a38b8d23aa14f6d3",
+ "98eab664cdee4999bb09af5abe60535f",
+ "61325b5427e44d0885d95a82fc44cfd6",
+ "37735d14a2614ffbbceaef743d2033a9",
+ "80916d39f0bc426488b41a013196cc42",
+ "7badbb79920e43b9a6f6317e7b746384",
+ "693b0b6df20e4f2caeaeb4838b37d8bb",
+ "341f088c9e0f4eb2ae3f4868b4dcb835",
+ "2733152e7214400abdf0e793358181b3",
+ "d44653455b8a490997da5bfd8672cf7e",
+ "090573574f8d48a1b9d2918d14c75c9a",
+ "dfdaf22078fd4385ab30060981d67666",
+ "3eee3667ff024f2a875dcf57f00d7f70",
+ "9512cb52fe3a44d0bd0f52daed6139d9",
+ "de35fccd4b4a433e8b468ef3981bede9",
+ "ff35f85d2db0404da5e01fbda308197a",
+ "221469404d3946f39b4c97e708385b88",
+ "1d6c6e3129bc4702afae1facf2b8ba6b",
+ "d0c8dcdbf9f44ca1bc74ea1e2f127b0f",
+ "5e09f80f20554f419d925c5cdf55cc63",
+ "34714076cb4b479eab2c5ec6a6c7d50e",
+ "22d3e015ffd24db8aa145fab92c1901c",
+ "37ceac6f039642cab04a03a8afb9f301",
+ "0ce4a494f2274147b9005aa03358b263",
+ "e8f385dcd70f40d28cd27ba5d7edcef8",
+ "3bc08cdf09a84428a51955f2aa42ea30",
+ "cb68043195a642b3a495d82d87ffd1b8",
+ "0cf91d0dc45340f19f6a7a2804000145",
+ "dff99876d1e3468bb3cbd97160ecd7a1",
+ "0a8793f9c57f48b299703b7945163b50",
+ "edb8b182bc4a413185e754aae38ee93a",
+ "597a8eacf00b406ab23af333aea97e3c",
+ "20396dbdc36b47538a5fd6b522478b67",
+ "3eec3e2c3abe40efb74a05a67bf755a0",
+ "e288ede57ad84b2bb455ba18016c68d8",
+ "8924eb6712b146bd977f21c46531338b",
+ "ede27ca6747240eeb41a9dbde664e8a7",
+ "45ed824c2cd746c09e61dc8a2bdd3384",
+ "3f94af984ba84b838643b03caf8d2d4e",
+ "2e9985de92164304b5b4c8b723d24cf1",
+ "99777597ceee470ca8c8a34f4846435a",
+ "ca063f5b64d74bc9be303eebe7092f81",
+ "7d654e85d8794af197e72f905086b9a7",
+ "f3804bde7c974eaf90df71e9fdd3539b",
+ "dba967ac191d45a0b604e93f0dc1fffe",
+ "f8cc05786ad94dcca69f1fedf6d4aa4a"
+ ]
+ },
+ "id": "JzcSCwsF6aBT",
+ "outputId": "1f223f71-54ed-49fe-8cb5-dcfc183a7c3f"
+ },
+ "outputs": [],
+ "source": [
+ "model_id = \"dreamlike-art/dreamlike-photoreal-2.0\"\n",
+ "pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)\n",
+ "pipe = pipe.to(\"cuda\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Sz6SRmjd6pBb"
+ },
+ "outputs": [],
+ "source": [
+ "prompts = [\"Cute Rabbit, Ultra HD, realistic, futuristic, sharp, octane render, photoshopped, photorealistic, soft, pastel, Aesthetic, Magical background\",\n",
+ " \"Anime style aesthetic landscape, 90's vintage style, digital art, ultra HD, 8k, photoshopped, sharp focus, surrealism, akira style, detailed line art\",\n",
+ " \"Beautiful, abstract art of a human mind, 3D, highly detailed, 8K, aesthetic\"]\n",
+ "\n",
+ "images = []"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 113,
+ "referenced_widgets": [
+ "eb182b33be95418fad1010ccf7b176ab",
+ "614b85aff85e47debadea7773583b8ab",
+ "c6305a1adcd946d2a4c66c05e614bcf1",
+ "d321be86c24d4a35a251d4ef7a75c24d",
+ "a99edd082dff4f928c3b75abf84ec0ec",
+ "3d17c5e7b942485d9ca1db572c06afe5",
+ "29f58c06e0474f4e8f411aaaceb4d7f7",
+ "f369cc94c2544de3acdbcd35cac6d393",
+ "0bec42769e7e4492aedd4afb63a91ff3",
+ "73f2e3215913478aae13131aefadd0a5",
+ "64f6ec814be648d3ba69f94eb844a049",
+ "534cf1c7f20a431cab02aea224148db3",
+ "1997648c2dc946e1bdb18d2730175ea8",
+ "2496cd9b6ee640f8a6d398b7a56f93b7",
+ "7f0e7d1bd12b4d0eb800a3d62901c4a8",
+ "b75a2474c46f4f3b9d84cb981bfffac7",
+ "ac3ea0ea867b4c30bd4be87aaa602d42",
+ "ff0910f0831b49ac9faaba1e70c275dc",
+ "fc5d5de2233543eba400877e7891977a",
+ "f9a2bf4d86ab403d9e1c7378e91bf467",
+ "cbcfc8e9b02348a182722c846cecca2a",
+ "ece36cbb62cd46a8b452fac32dce3493",
+ "6f400bad53794c7cbed09e4fd59c211d",
+ "4cecf6bc5f294968bcee7bf65896a31d",
+ "5bb94e6390af4e81ac0e6b3a47445996",
+ "af474aa6c91344da9a968e7e2488b74c",
+ "5a702086896f4a229e326fa05d616b35",
+ "28cd65b9d6f946abab83e430ab6d2017",
+ "a432cb1a0bc7418bb90248973e91c452",
+ "37af49a1966045ee992e01f45ff5df81",
+ "8120fb8694244e5dbbc448eb2a6e03dc",
+ "69faef33b09f4da7b1c11639102b2a4f",
+ "87d35ca268744638ad484ccf1a7fe2ed"
+ ]
+ },
+ "id": "ovvyensy6pDl",
+ "outputId": "2b0269af-4978-4a8b-eea9-96c12401dc62"
+ },
+ "outputs": [],
+ "source": [
+ "for i, prompt in enumerate(prompts):\n",
+ " image = pipe(prompt).images[0]\n",
+ " image.save(f'result_{i}.jpg')\n",
+ " images.append(image)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 785
+ },
+ "id": "vd532OSA8Md7",
+ "outputId": "a8ddd5b1-376b-4036-d87d-af9dc71c88e0"
+ },
+ "outputs": [],
+ "source": [
+ "images[0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 785
+ },
+ "id": "ZpVbvylE8OEt",
+ "outputId": "5a577720-b68e-4657-9cbb-4112287afa23"
+ },
+ "outputs": [],
+ "source": [
+ "images[1]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 785
+ },
+ "id": "R1DNPbbz8PU-",
+ "outputId": "893bb392-96f0-4106-e3d7-f6def830ede1"
+ },
+ "outputs": [],
+ "source": [
+ "images[2]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "Jd-5c7bouD-_"
+ },
+ "source": [
+ "# Manually working with the different components"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "01bGNP1n6aF4"
+ },
+ "outputs": [],
+ "source": [
+ "import torch\n",
+ "from torch import autocast\n",
+ "import numpy as np\n",
+ "\n",
+ "from transformers import CLIPTextModel, CLIPTokenizer\n",
+ "\n",
+ "from diffusers import AutoencoderKL\n",
+ "from diffusers import LMSDiscreteScheduler\n",
+ "from diffusers import UNet2DConditionModel\n",
+ "from diffusers.schedulers.scheduling_ddim import DDIMScheduler\n",
+ "\n",
+ "from tqdm import tqdm\n",
+ "from PIL import Image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "3yBgKeUs8LWU"
+ },
+ "outputs": [],
+ "source": [
+ "class ImageDiffusionModel:\n",
+ "\n",
+ " def __init__(self, vae, tokenizer, text_encoder, unet, \n",
+ " scheduler_LMS, scheduler_DDIM):\n",
+ " self.vae = vae\n",
+ " self.tokenizer = tokenizer\n",
+ " self.text_encoder = text_encoder\n",
+ " self.unet = unet\n",
+ " self.scheduler_LMS = scheduler_LMS\n",
+ " self.scheduler_DDIM = scheduler_DDIM\n",
+ " self.device = 'cuda' if torch.cuda.is_available() else 'cpu'\n",
+ " \n",
+ " \n",
+ " def get_text_embeds(self, text):\n",
+ " # tokenize the text\n",
+ " text_input = self.tokenizer(text, \n",
+ " padding='max_length', \n",
+ " max_length=tokenizer.model_max_length, \n",
+ " truncation=True, \n",
+ " return_tensors='pt')\n",
+ " # embed the text\n",
+ " with torch.no_grad():\n",
+ " text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]\n",
+ "\n",
+ " return text_embeds\n",
+ "\n",
+ " def get_prompt_embeds(self, prompt):\n",
+ " # get conditional prompt embeddings\n",
+ " cond_embeds = self.get_text_embeds(prompt)\n",
+ " # get unconditional prompt embeddings\n",
+ " uncond_embeds = self.get_text_embeds([''] * len(prompt))\n",
+ " # concatenate the above 2 embeds\n",
+ " prompt_embeds = torch.cat([uncond_embeds, cond_embeds])\n",
+ " return prompt_embeds\n",
+ "\n",
+ " def get_img_latents(self, \n",
+ " text_embeds, \n",
+ " height=512, width=512, \n",
+ " num_inference_steps=50, \n",
+ " guidance_scale=7.5, \n",
+ " img_latents=None):\n",
+ " # if no image latent is passed, start reverse diffusion with random noise\n",
+ " if img_latents is None:\n",
+ " img_latents = torch.randn((text_embeds.shape[0] // 2, self.unet.in_channels,\\\n",
+ " height // 8, width // 8)).to(self.device)\n",
+ " # set the number of inference steps for the scheduler\n",
+ " self.scheduler_LMS.set_timesteps(num_inference_steps)\n",
+ " # scale the latent embeds\n",
+ " img_latents = img_latents * self.scheduler_LMS.sigmas[0]\n",
+ " # use autocast for automatic mixed precision (AMP) inference\n",
+ " with autocast('cuda'):\n",
+ " for i, t in tqdm(enumerate(self.scheduler_LMS.timesteps)):\n",
+ " # do a single forward pass for both the conditional and unconditional latents\n",
+ " latent_model_input = torch.cat([img_latents] * 2)\n",
+ " sigma = self.scheduler_LMS.sigmas[i]\n",
+ " latent_model_input = latent_model_input / ((sigma ** 2 + 1) ** 0.5)\n",
+ " \n",
+ " # predict noise residuals\n",
+ " with torch.no_grad():\n",
+ " noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeds)['sample']\n",
+ "\n",
+ " # separate predictions for unconditional and conditional outputs\n",
+ " noise_pred_uncond, noise_pred_cond = noise_pred.chunk(2)\n",
+ " # perform guidance\n",
+ " noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_cond - noise_pred_uncond)\n",
+ "\n",
+ " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n",
+ " img_latents = self.scheduler_LMS.step(noise_pred, t, img_latents)['prev_sample']\n",
+ "\n",
+ " return img_latents\n",
+ "\n",
+ "\n",
+ " def decode_img_latents(self, img_latents):\n",
+ " img_latents = img_latents / 0.18215\n",
+ " with torch.no_grad():\n",
+ " imgs = self.vae.decode(img_latents)[\"sample\"]\n",
+ " # load image in the CPU\n",
+ " imgs = imgs.detach().cpu()\n",
+ " return imgs\n",
+ "\n",
+ "\n",
+ "\n",
+ " def transform_imgs(self, imgs):\n",
+ " # transform images from the range [-1, 1] to [0, 1]\n",
+ " imgs = (imgs / 2 + 0.5).clamp(0, 1)\n",
+ " # permute the channels and convert to numpy arrays\n",
+ " imgs = imgs.permute(0, 2, 3, 1).numpy()\n",
+ " # scale images to the range [0, 255] and convert to int\n",
+ " imgs = (imgs * 255).round().astype('uint8') \n",
+ " # convert to PIL Image objects\n",
+ " imgs = [Image.fromarray(img) for img in imgs]\n",
+ " return imgs\n",
+ " \n",
+ " \n",
+ " \n",
+ " def prompt_to_img(self, \n",
+ " prompts, \n",
+ " height=512, width=512, \n",
+ " num_inference_steps=50, \n",
+ " guidance_scale=7.5, \n",
+ " img_latents=None):\n",
+ " \n",
+ " # convert prompt to a list\n",
+ " if isinstance(prompts, str):\n",
+ " prompts = [prompts]\n",
+ " \n",
+ " # get prompt embeddings\n",
+ " text_embeds = self.get_prompt_embeds(prompts)\n",
+ "\n",
+ " # get image embeddings\n",
+ " img_latents = self.get_img_latents(text_embeds,\n",
+ " height, width,\n",
+ " num_inference_steps,\n",
+ " guidance_scale, \n",
+ " img_latents)\n",
+ " # decode the image embeddings\n",
+ " imgs = self.decode_img_latents(img_latents)\n",
+ " # convert decoded image to suitable PIL Image format\n",
+ " imgs = self.transform_imgs(imgs)\n",
+ "\n",
+ " return imgs\n",
+ "\n",
+ "\n",
+ "\n",
+ " def encode_img_latents(self, imgs):\n",
+ " if not isinstance(imgs, list):\n",
+ " imgs = [imgs]\n",
+ " \n",
+ " imgs = np.stack([np.array(img) for img in imgs], axis=0)\n",
+ " # scale images to the range [-1, 1]\n",
+ " imgs = 2 * ((imgs / 255.0) - 0.5)\n",
+ " imgs = torch.from_numpy(imgs).float().permute(0, 3, 1, 2)\n",
+ "\n",
+ " # encode images\n",
+ " img_latents_dist = self.vae.encode(imgs.to(self.device))\n",
+ " # img_latents = img_latents_dist.sample()\n",
+ " img_latents = img_latents_dist[\"latent_dist\"].mean.clone()\n",
+ " # scale images\n",
+ " img_latents *= 0.18215\n",
+ "\n",
+ " return img_latents\n",
+ "\n",
+ "\n",
+ " def get_img_latents_similar(self,\n",
+ " img_latents,\n",
+ " text_embeds, \n",
+ " height=512, width=512, \n",
+ " num_inference_steps=50, \n",
+ " guidance_scale=7.5,\n",
+ " start_step=10): \n",
+ " \n",
+ " # set the number of inference steps for the scheduler\n",
+ " self.scheduler_DDIM.set_timesteps(num_inference_steps)\n",
+ "\n",
+ " if start_step > 0:\n",
+ " start_timestep = self.scheduler_DDIM.timesteps[start_step]\n",
+ " start_timesteps = start_timestep.repeat(img_latents.shape[0]).long()\n",
+ "\n",
+ " noise = torch.randn_like(img_latents)\n",
+ " img_latents = scheduler_DDIM.add_noise(img_latents, noise, start_timesteps)\n",
+ " \n",
+ " # use autocast for automatic mixed precision (AMP) inference\n",
+ " with autocast('cuda'):\n",
+ " for i, t in tqdm(enumerate(self.scheduler_DDIM.timesteps[start_step:])):\n",
+ " # do a single forward pass for both the conditional and unconditional latents\n",
+ " latent_model_input = torch.cat([img_latents] * 2)\n",
+ " \n",
+ " # predict noise residuals\n",
+ " with torch.no_grad():\n",
+ " noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeds)['sample']\n",
+ "\n",
+ " # separate predictions for unconditional and conditional outputs\n",
+ " noise_pred_uncond, noise_pred_cond = noise_pred.chunk(2)\n",
+ " # perform guidance\n",
+ " noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_cond - noise_pred_uncond)\n",
+ "\n",
+ " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n",
+ " img_latents = self.scheduler_DDIM.step(noise_pred, t, img_latents)['prev_sample']\n",
+ "\n",
+ " return img_latents\n",
+ "\n",
+ " \n",
+ " def similar_imgs(self, \n",
+ " img, \n",
+ " prompt, \n",
+ " height=512, width=512,\n",
+ " num_inference_steps=50, \n",
+ " guidance_scale=7.5,\n",
+ " start_step=10):\n",
+ " \n",
+ " # get image latents\n",
+ " img_latents = self.encode_img_latents(img)\n",
+ "\n",
+ " if isinstance(prompt, str):\n",
+ " prompt = [prompt]\n",
+ "\n",
+ " text_embeds = self.get_prompt_embeds(prompt)\n",
+ " \n",
+ " img_latents = self.get_img_latents_similar(img_latents=img_latents,\n",
+ " text_embeds=text_embeds,\n",
+ " height=height, width=width,\n",
+ " num_inference_steps=num_inference_steps,\n",
+ " guidance_scale=guidance_scale,\n",
+ " start_step=start_step) \n",
+ "\n",
+ " imgs = self.decode_img_latents(img_latents)\n",
+ " imgs = self.transform_imgs(imgs)\n",
+ " # Clear the CUDA cache\n",
+ " torch.cuda.empty_cache()\n",
+ "\n",
+ " return imgs\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "kd6TwWqEs4Me"
+ },
+ "outputs": [],
+ "source": [
+ "device = 'cuda'\n",
+ "\n",
+ "# model_name = \"dreamlike-art/dreamlike-photoreal-2.0\"\n",
+ "model_name = \"CompVis/stable-diffusion-v1-4\"\n",
+ "# Load autoencoder\n",
+ "vae = AutoencoderKL.from_pretrained(model_name, \n",
+ " subfolder='vae').to(device)\n",
+ "\n",
+ "# Load tokenizer and the text encoder\n",
+ "tokenizer = CLIPTokenizer.from_pretrained(model_name, subfolder=\"tokenizer\")\n",
+ "text_encoder = CLIPTextModel.from_pretrained(model_name, subfolder=\"text_encoder\").to(device)\n",
+ "\n",
+ "# Load UNet model\n",
+ "unet = UNet2DConditionModel.from_pretrained(model_name, subfolder='unet').to(device)\n",
+ "\n",
+ "# Load scheduler\n",
+ "scheduler_LMS = LMSDiscreteScheduler(beta_start=0.00085, \n",
+ " beta_end=0.012, \n",
+ " beta_schedule='scaled_linear', \n",
+ " num_train_timesteps=1000)\n",
+ "\n",
+ "scheduler_DDIM = DDIMScheduler(beta_start=0.00085, \n",
+ " beta_end=0.012, \n",
+ " beta_schedule='scaled_linear', \n",
+ " num_train_timesteps=1000)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "SigUHp47f14I",
+ "outputId": "bad874ae-1e68-45fe-ef31-9fe887780582"
+ },
+ "outputs": [],
+ "source": [
+ "model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)\n",
+ "\n",
+ "prompts = [\"A really giant cute pink barbie doll on the top of Burj Khalifa\", \n",
+ " \"A green, scary aesthetic dragon breathing fire near a group of heroic firefighters\"]\n",
+ "\n",
+ "imgs = model.prompt_to_img(prompts)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "8UpQ8gIWf17j",
+ "outputId": "165f5a5d-fe20-4303-c46f-b247efd05181"
+ },
+ "outputs": [],
+ "source": [
+ "imgs[0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "NAS1yD8vZym_",
+ "outputId": "ef57db7c-a6c9-437f-d27e-94b2bab06ea9"
+ },
+ "outputs": [],
+ "source": [
+ "imgs[1]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 603
+ },
+ "id": "nj8pcEOupRES",
+ "outputId": "0ced4046-ed46-4bd0-8b77-1c23ca73dab6"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = [\"Aesthetic star wars spaceship with an aethethic background, Ultra HD, futuristic, sharp, octane render, neon\"]\n",
+ "\n",
+ "imgs = model.prompt_to_img(prompt)\n",
+ "\n",
+ "imgs[0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "GmXyduZ1npqg"
+ },
+ "outputs": [],
+ "source": [
+ "# saving the image\n",
+ "imgs[0].save(\"spaceship1.png\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "RuAHYae4r3MC",
+ "outputId": "c4be8be3-cacb-48f6-b70c-15ec69afe5b0"
+ },
+ "outputs": [],
+ "source": [
+ "# loading the image again\n",
+ "original_img = Image.open(\"spaceship1.png\")\n",
+ "original_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "qMcpCt20RyKi"
+ },
+ "outputs": [],
+ "source": [
+ "import torch\n",
+ "import gc\n",
+ "\n",
+ "### If you get OOM errors, execute this cell\n",
+ "# del model\n",
+ "# Clear the CUDA cache \n",
+ "torch.cuda.empty_cache()\n",
+ "gc.collect()\n",
+ "torch.cuda.empty_cache()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "1TQNiEE86Y6E",
+ "outputId": "2b87847d-6a63-4ec7-9cc1-7ac6a3396a48"
+ },
+ "outputs": [],
+ "source": [
+ "!nvidia-smi"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 547
+ },
+ "id": "1vIVmpL4rPmK",
+ "outputId": "4bbc1c35-6850-41f0-a430-39d764a59f2a"
+ },
+ "outputs": [],
+ "source": [
+ "model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)\n",
+ "\n",
+ "prompt = \"Aesthetic star wars spaceship with an aethethic background, Ultra HD, futuristic, sharp, octane render, neon\"\n",
+ "\n",
+ "imgs = model.similar_imgs(original_img, prompt, num_inference_steps=50, start_step=30)\n",
+ "imgs[0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 547
+ },
+ "id": "zOL-Y7BFai7d",
+ "outputId": "666384a3-667d-4715-cbe1-07566afa242d"
+ },
+ "outputs": [],
+ "source": [
+ "# model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)\n",
+ "\n",
+ "prompt = \"Aesthetic dark star wars spaceship, Ultra HD, futuristic, sharp, octane render, neon\"\n",
+ "\n",
+ "imgs = model.similar_imgs(original_img, prompt,\n",
+ " num_inference_steps=50,\n",
+ " start_step=40)\n",
+ "imgs[0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "thiXQYcG8Ekv"
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Xwtu2l3-8EnJ"
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Yb0H_X6i8Eqj"
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "collapsed_sections": [
+ "Dn2_-E5Sa9Rn"
+ ],
+ "provenance": []
+ },
+ "gpuClass": "standard",
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "0072680043674280bcde9c4bc19b3704": {
+ "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_260d5617f5e247f3a978a28d5fe72740",
+ "placeholder": "",
+ "style": "IPY_MODEL_5eba2d04c1c54016834e7dddd253a380",
+ "value": "Downloading (…)tokenizer/merges.txt: 100%"
+ }
+ },
+ "016df28dd739433daa2c8d3b1706486c": {
+ "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
+ }
+ },
+ "03433d859a7a4f3cae64d9d0bf374643": {
+ "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
+ }
+ },
+ "03fe79b7b7c5439c99fef039f96a831b": {
+ "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_d438504eef684317a6c09cc0b123d25d",
+ "max": 341,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_26b8bf61f8e44014a005ed10835f68b5",
+ "value": 341
+ }
+ },
+ "0468827f86394f7baf78d44264a225e7": {
+ "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
+ }
+ },
+ "06a9b1722db8473597c3a6cf17dafa29": {
+ "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
+ }
+ },
+ "090573574f8d48a1b9d2918d14c75c9a": {
+ "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": ""
+ }
+ },
+ "0a8793f9c57f48b299703b7945163b50": {
+ "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
+ }
+ },
+ "0b9c78977b6a45da9aa6ada3332fbc28": {
+ "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
+ }
+ },
+ "0bb6ef1e3a2d43ca970723b0e5ac93cf": {
+ "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_134ae8a21fc2489e9e7524eb856ef778",
+ "placeholder": "",
+ "style": "IPY_MODEL_7debd7332d4a4811ad653398344420f4",
+ "value": " 472/472 [00:00<00:00, 2.52kB/s]"
+ }
+ },
+ "0bec42769e7e4492aedd4afb63a91ff3": {
+ "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": ""
+ }
+ },
+ "0c34c9ecc697483e831333d67a48ff32": {
+ "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": ""
+ }
+ },
+ "0ce4a494f2274147b9005aa03358b263": {
+ "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": ""
+ }
+ },
+ "0cf91d0dc45340f19f6a7a2804000145": {
+ "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_3eec3e2c3abe40efb74a05a67bf755a0",
+ "placeholder": "",
+ "style": "IPY_MODEL_e288ede57ad84b2bb455ba18016c68d8",
+ "value": " 577/577 [00:00<00:00, 11.8kB/s]"
+ }
+ },
+ "0d2fba8088804ecab806472f5396f1bc": {
+ "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_bc42d1c7cdcd4064a1dbcc3eb1f3009b",
+ "max": 511,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_fe3c4a4e4c8b4752a1f1d88da73fb808",
+ "value": 511
+ }
+ },
+ "0e46fe7538ed4df9b8fa1f36b4b35cdd": {
+ "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_ec377a46cf8647ff891a920c46897786",
+ "max": 901,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_4e264808109e4b52983260067550883e",
+ "value": 901
+ }
+ },
+ "115b71885ef241fb8884e8de28dfdb8c": {
+ "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": ""
+ }
+ },
+ "12808180b0b64ecd90839c791134b5fb": {
+ "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
+ }
+ },
+ "134ae8a21fc2489e9e7524eb856ef778": {
+ "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
+ }
+ },
+ "13e357cba1ee4e31887f2c260f2cea15": {
+ "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_5573d97394b144d6b8f4065bf81e6d05",
+ "max": 524619,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_245a11e3ca454d26895c46a5c08be822",
+ "value": 524619
+ }
+ },
+ "14bc95aacebc43a8877bc36c58effccf": {
+ "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_30f32feefcbd486c86cb68c927dd9fca",
+ "IPY_MODEL_0e46fe7538ed4df9b8fa1f36b4b35cdd",
+ "IPY_MODEL_6e0be2c85237496eb97b53963654dffa"
+ ],
+ "layout": "IPY_MODEL_9c751e805d96415d9608c2422906d76e"
+ }
+ },
+ "163075971def4198b5cc7a0d5ec3c81d": {
+ "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
+ }
+ },
+ "1923427b93ae424bb5d91bab418506a9": {
+ "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
+ }
+ },
+ "1997648c2dc946e1bdb18d2730175ea8": {
+ "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_ac3ea0ea867b4c30bd4be87aaa602d42",
+ "placeholder": "",
+ "style": "IPY_MODEL_ff0910f0831b49ac9faaba1e70c275dc",
+ "value": "100%"
+ }
+ },
+ "1cfa604ca2924c25930887b466ac3e9b": {
+ "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
+ }
+ },
+ "1d6c6e3129bc4702afae1facf2b8ba6b": {
+ "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
+ }
+ },
+ "20396dbdc36b47538a5fd6b522478b67": {
+ "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": ""
+ }
+ },
+ "209020cdb39942178adbc7cc3acf1cb0": {
+ "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
+ }
+ },
+ "21d9342ed95d4bf0959647ef57fceb97": {
+ "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_ad2f2fd194ac4bca909e5af122370e3d",
+ "max": 472,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_0c34c9ecc697483e831333d67a48ff32",
+ "value": 472
+ }
+ },
+ "221469404d3946f39b4c97e708385b88": {
+ "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_37ceac6f039642cab04a03a8afb9f301",
+ "placeholder": "",
+ "style": "IPY_MODEL_0ce4a494f2274147b9005aa03358b263",
+ "value": " 1.72G/1.72G [00:15<00:00, 123MB/s]"
+ }
+ },
+ "22d3e015ffd24db8aa145fab92c1901c": {
+ "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": ""
+ }
+ },
+ "23cd6b916dfe4e5faa4021cf02d07f53": {
+ "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
+ }
+ },
+ "245a11e3ca454d26895c46a5c08be822": {
+ "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": ""
+ }
+ },
+ "2496cd9b6ee640f8a6d398b7a56f93b7": {
+ "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_fc5d5de2233543eba400877e7891977a",
+ "max": 50,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_f9a2bf4d86ab403d9e1c7378e91bf467",
+ "value": 50
+ }
+ },
+ "260d5617f5e247f3a978a28d5fe72740": {
+ "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
+ }
+ },
+ "26aac0b253ba4e2e8f19acfa0bead5a7": {
+ "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": ""
+ }
+ },
+ "26b8bf61f8e44014a005ed10835f68b5": {
+ "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": ""
+ }
+ },
+ "2733152e7214400abdf0e793358181b3": {
+ "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": ""
+ }
+ },
+ "28cd65b9d6f946abab83e430ab6d2017": {
+ "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
+ }
+ },
+ "29f58c06e0474f4e8f411aaaceb4d7f7": {
+ "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": ""
+ }
+ },
+ "2c63224632c04b159f2c9453e4ca3c15": {
+ "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_68b6a1a9d4c7422d9263e00cbd956be1",
+ "placeholder": "",
+ "style": "IPY_MODEL_c79ef9b35d014fdfb9f88fc09e870d01",
+ "value": "Downloading (…)_encoder/config.json: 100%"
+ }
+ },
+ "2e9985de92164304b5b4c8b723d24cf1": {
+ "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
+ }
+ },
+ "30f32feefcbd486c86cb68c927dd9fca": {
+ "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_1923427b93ae424bb5d91bab418506a9",
+ "placeholder": "",
+ "style": "IPY_MODEL_c99c614b55ba44fbb2927642128fba9b",
+ "value": "Downloading (…)0d5/unet/config.json: 100%"
+ }
+ },
+ "32e55f352157421aa3e1fef5819b3587": {
+ "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
+ }
+ },
+ "341f088c9e0f4eb2ae3f4868b4dcb835": {
+ "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
+ }
+ },
+ "34714076cb4b479eab2c5ec6a6c7d50e": {
+ "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
+ }
+ },
+ "35b84a2a8e0749268b14492abcf0af1f": {
+ "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": ""
+ }
+ },
+ "3634354fd978434bbad0fd11d3e0b5fb": {
+ "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": ""
+ }
+ },
+ "37735d14a2614ffbbceaef743d2033a9": {
+ "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_341f088c9e0f4eb2ae3f4868b4dcb835",
+ "placeholder": "",
+ "style": "IPY_MODEL_2733152e7214400abdf0e793358181b3",
+ "value": "Downloading pytorch_model.bin: 100%"
+ }
+ },
+ "379e92c07edc4ad28165c8b0926746d5": {
+ "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_06a9b1722db8473597c3a6cf17dafa29",
+ "max": 12,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_621ceb287f8243f5a2952613c01f3f82",
+ "value": 12
+ }
+ },
+ "37af49a1966045ee992e01f45ff5df81": {
+ "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
+ }
+ },
+ "37ceac6f039642cab04a03a8afb9f301": {
+ "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
+ }
+ },
+ "3a0dacdec71447a490820baf3a405580": {
+ "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
+ }
+ },
+ "3bc08cdf09a84428a51955f2aa42ea30": {
+ "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_0a8793f9c57f48b299703b7945163b50",
+ "placeholder": "",
+ "style": "IPY_MODEL_edb8b182bc4a413185e754aae38ee93a",
+ "value": "Downloading (…)a0d5/vae/config.json: 100%"
+ }
+ },
+ "3d17c5e7b942485d9ca1db572c06afe5": {
+ "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
+ }
+ },
+ "3eec3e2c3abe40efb74a05a67bf755a0": {
+ "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
+ }
+ },
+ "3eee3667ff024f2a875dcf57f00d7f70": {
+ "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": ""
+ }
+ },
+ "3f94af984ba84b838643b03caf8d2d4e": {
+ "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_dba967ac191d45a0b604e93f0dc1fffe",
+ "placeholder": "",
+ "style": "IPY_MODEL_f8cc05786ad94dcca69f1fedf6d4aa4a",
+ "value": " 167M/167M [00:02<00:00, 59.2MB/s]"
+ }
+ },
+ "406fd8a742b443968d3f2fc1d3dbfef1": {
+ "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_7d9b49d6dbfc41988b2c3c6ac40a3cae",
+ "placeholder": "",
+ "style": "IPY_MODEL_35b84a2a8e0749268b14492abcf0af1f",
+ "value": " 1.06M/1.06M [00:00<00:00, 3.64MB/s]"
+ }
+ },
+ "41c2930f406d484ca7e1e8a4c13f9b35": {
+ "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_12808180b0b64ecd90839c791134b5fb",
+ "placeholder": "",
+ "style": "IPY_MODEL_115b71885ef241fb8884e8de28dfdb8c",
+ "value": " 525k/525k [00:00<00:00, 2.90MB/s]"
+ }
+ },
+ "42ad2fe1e9ee44dcb9d3b7c6af9a87a1": {
+ "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": ""
+ }
+ },
+ "43aa766628a147548714ef986c9d979a": {
+ "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": ""
+ }
+ },
+ "45e95708fe6043c68fd25d8802778998": {
+ "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
+ }
+ },
+ "45ed824c2cd746c09e61dc8a2bdd3384": {
+ "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_7d654e85d8794af197e72f905086b9a7",
+ "max": 167399505,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_f3804bde7c974eaf90df71e9fdd3539b",
+ "value": 167399505
+ }
+ },
+ "4ac86feba0924fad8c82be426d774ce4": {
+ "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_3a0dacdec71447a490820baf3a405580",
+ "placeholder": "",
+ "style": "IPY_MODEL_bf0a27e1f6f3454fafa2bb04a16e4ba6",
+ "value": "Fetching 12 files: 100%"
+ }
+ },
+ "4cecf6bc5f294968bcee7bf65896a31d": {
+ "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_28cd65b9d6f946abab83e430ab6d2017",
+ "placeholder": "",
+ "style": "IPY_MODEL_a432cb1a0bc7418bb90248973e91c452",
+ "value": "100%"
+ }
+ },
+ "4e264808109e4b52983260067550883e": {
+ "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": ""
+ }
+ },
+ "51b9487b43204e23bc11c2693f46ff72": {
+ "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_2c63224632c04b159f2c9453e4ca3c15",
+ "IPY_MODEL_5568e424494e406ea991d0c778924aa8",
+ "IPY_MODEL_f0d04527bbe94bfdb91353827c2ad7db"
+ ],
+ "layout": "IPY_MODEL_d1bf7fca5177409290ea45d701774d6d"
+ }
+ },
+ "534cf1c7f20a431cab02aea224148db3": {
+ "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_1997648c2dc946e1bdb18d2730175ea8",
+ "IPY_MODEL_2496cd9b6ee640f8a6d398b7a56f93b7",
+ "IPY_MODEL_7f0e7d1bd12b4d0eb800a3d62901c4a8"
+ ],
+ "layout": "IPY_MODEL_b75a2474c46f4f3b9d84cb981bfffac7"
+ }
+ },
+ "5568e424494e406ea991d0c778924aa8": {
+ "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_77755839ec0946c5b33488dd412f4d58",
+ "max": 617,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_f7d7fb787f884822aa3e5cdbfab22b1d",
+ "value": 617
+ }
+ },
+ "5573d97394b144d6b8f4065bf81e6d05": {
+ "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
+ }
+ },
+ "597a8eacf00b406ab23af333aea97e3c": {
+ "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
+ }
+ },
+ "5a702086896f4a229e326fa05d616b35": {
+ "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
+ }
+ },
+ "5bb94e6390af4e81ac0e6b3a47445996": {
+ "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_37af49a1966045ee992e01f45ff5df81",
+ "max": 50,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_8120fb8694244e5dbbc448eb2a6e03dc",
+ "value": 50
+ }
+ },
+ "5e09f80f20554f419d925c5cdf55cc63": {
+ "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": ""
+ }
+ },
+ "5eba2d04c1c54016834e7dddd253a380": {
+ "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": ""
+ }
+ },
+ "61325b5427e44d0885d95a82fc44cfd6": {
+ "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_37735d14a2614ffbbceaef743d2033a9",
+ "IPY_MODEL_80916d39f0bc426488b41a013196cc42",
+ "IPY_MODEL_7badbb79920e43b9a6f6317e7b746384"
+ ],
+ "layout": "IPY_MODEL_693b0b6df20e4f2caeaeb4838b37d8bb"
+ }
+ },
+ "614b85aff85e47debadea7773583b8ab": {
+ "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_3d17c5e7b942485d9ca1db572c06afe5",
+ "placeholder": "",
+ "style": "IPY_MODEL_29f58c06e0474f4e8f411aaaceb4d7f7",
+ "value": "100%"
+ }
+ },
+ "621ceb287f8243f5a2952613c01f3f82": {
+ "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": ""
+ }
+ },
+ "62924d5b19784abcaa672d995fc15127": {
+ "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
+ }
+ },
+ "64f6ec814be648d3ba69f94eb844a049": {
+ "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": ""
+ }
+ },
+ "67a3104f358e48459f458fddf98b826e": {
+ "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
+ }
+ },
+ "68b6a1a9d4c7422d9263e00cbd956be1": {
+ "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
+ }
+ },
+ "693b0b6df20e4f2caeaeb4838b37d8bb": {
+ "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
+ }
+ },
+ "69faef33b09f4da7b1c11639102b2a4f": {
+ "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
+ }
+ },
+ "6e0be2c85237496eb97b53963654dffa": {
+ "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_163075971def4198b5cc7a0d5ec3c81d",
+ "placeholder": "",
+ "style": "IPY_MODEL_9984e9b0a929433ab6e4501538a60c80",
+ "value": " 901/901 [00:00<00:00, 4.42kB/s]"
+ }
+ },
+ "6f400bad53794c7cbed09e4fd59c211d": {
+ "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_4cecf6bc5f294968bcee7bf65896a31d",
+ "IPY_MODEL_5bb94e6390af4e81ac0e6b3a47445996",
+ "IPY_MODEL_af474aa6c91344da9a968e7e2488b74c"
+ ],
+ "layout": "IPY_MODEL_5a702086896f4a229e326fa05d616b35"
+ }
+ },
+ "73f2e3215913478aae13131aefadd0a5": {
+ "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
+ }
+ },
+ "773661aa8b6e4c0db5238cfe398b2b5b": {
+ "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_67a3104f358e48459f458fddf98b826e",
+ "placeholder": "",
+ "style": "IPY_MODEL_b63595513fec4e81a0a8200294faf7ba",
+ "value": "Downloading (…)cial_tokens_map.json: 100%"
+ }
+ },
+ "77755839ec0946c5b33488dd412f4d58": {
+ "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
+ }
+ },
+ "7989fe19c8b749ddaa60c5c7b5cec0ea": {
+ "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_773661aa8b6e4c0db5238cfe398b2b5b",
+ "IPY_MODEL_21d9342ed95d4bf0959647ef57fceb97",
+ "IPY_MODEL_0bb6ef1e3a2d43ca970723b0e5ac93cf"
+ ],
+ "layout": "IPY_MODEL_0b9c78977b6a45da9aa6ada3332fbc28"
+ }
+ },
+ "7badbb79920e43b9a6f6317e7b746384": {
+ "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_dfdaf22078fd4385ab30060981d67666",
+ "placeholder": "",
+ "style": "IPY_MODEL_3eee3667ff024f2a875dcf57f00d7f70",
+ "value": " 246M/246M [00:03<00:00, 92.0MB/s]"
+ }
+ },
+ "7d654e85d8794af197e72f905086b9a7": {
+ "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
+ }
+ },
+ "7d9b49d6dbfc41988b2c3c6ac40a3cae": {
+ "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
+ }
+ },
+ "7debd7332d4a4811ad653398344420f4": {
+ "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": ""
+ }
+ },
+ "7f0e7d1bd12b4d0eb800a3d62901c4a8": {
+ "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_cbcfc8e9b02348a182722c846cecca2a",
+ "placeholder": "",
+ "style": "IPY_MODEL_ece36cbb62cd46a8b452fac32dce3493",
+ "value": " 50/50 [00:28<00:00, 1.73it/s]"
+ }
+ },
+ "7f29483722954a3697afb9cb24430e8c": {
+ "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_209020cdb39942178adbc7cc3acf1cb0",
+ "placeholder": "",
+ "style": "IPY_MODEL_e68ae70236b04e5aa6c5de879ca81e9e",
+ "value": "Downloading (…)okenizer_config.json: 100%"
+ }
+ },
+ "80916d39f0bc426488b41a013196cc42": {
+ "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_d44653455b8a490997da5bfd8672cf7e",
+ "max": 246184375,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_090573574f8d48a1b9d2918d14c75c9a",
+ "value": 246184375
+ }
+ },
+ "8120fb8694244e5dbbc448eb2a6e03dc": {
+ "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": ""
+ }
+ },
+ "833477c7e6144deba2f9a7e1e3fb7c12": {
+ "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": ""
+ }
+ },
+ "87d35ca268744638ad484ccf1a7fe2ed": {
+ "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": ""
+ }
+ },
+ "89129c49f76e497a8fb218b8126dc4d9": {
+ "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_4ac86feba0924fad8c82be426d774ce4",
+ "IPY_MODEL_379e92c07edc4ad28165c8b0926746d5",
+ "IPY_MODEL_a144d82a835e4d48b987fecd5af96b6c"
+ ],
+ "layout": "IPY_MODEL_fc3fc7c8bb714f39a67963f2792b527d"
+ }
+ },
+ "8924eb6712b146bd977f21c46531338b": {
+ "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_ede27ca6747240eeb41a9dbde664e8a7",
+ "IPY_MODEL_45ed824c2cd746c09e61dc8a2bdd3384",
+ "IPY_MODEL_3f94af984ba84b838643b03caf8d2d4e"
+ ],
+ "layout": "IPY_MODEL_2e9985de92164304b5b4c8b723d24cf1"
+ }
+ },
+ "8ae0743d19d74e3aabfe4b5ba54fd7ca": {
+ "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_0072680043674280bcde9c4bc19b3704",
+ "IPY_MODEL_13e357cba1ee4e31887f2c260f2cea15",
+ "IPY_MODEL_41c2930f406d484ca7e1e8a4c13f9b35"
+ ],
+ "layout": "IPY_MODEL_0468827f86394f7baf78d44264a225e7"
+ }
+ },
+ "8bef2ecbcbcf4ad1bb5e495a52ca2aa6": {
+ "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_62924d5b19784abcaa672d995fc15127",
+ "placeholder": "",
+ "style": "IPY_MODEL_833477c7e6144deba2f9a7e1e3fb7c12",
+ "value": " 511/511 [00:00<00:00, 11.2kB/s]"
+ }
+ },
+ "9307ea294e42484eb32d8b07fddd33dd": {
+ "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_b02317ef6e514fa9b2c58c64e7702533",
+ "placeholder": "",
+ "style": "IPY_MODEL_df83f20f558f43b9bf1e447316e9de4a",
+ "value": "Downloading (…)tokenizer/vocab.json: 100%"
+ }
+ },
+ "9512cb52fe3a44d0bd0f52daed6139d9": {
+ "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_de35fccd4b4a433e8b468ef3981bede9",
+ "IPY_MODEL_ff35f85d2db0404da5e01fbda308197a",
+ "IPY_MODEL_221469404d3946f39b4c97e708385b88"
+ ],
+ "layout": "IPY_MODEL_1d6c6e3129bc4702afae1facf2b8ba6b"
+ }
+ },
+ "98eab664cdee4999bb09af5abe60535f": {
+ "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": ""
+ }
+ },
+ "99777597ceee470ca8c8a34f4846435a": {
+ "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
+ }
+ },
+ "9984e9b0a929433ab6e4501538a60c80": {
+ "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": ""
+ }
+ },
+ "9a2aa30940934458ae53131db74a7406": {
+ "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
+ }
+ },
+ "9ac0da7a10a54fbe897b21184cdf154f": {
+ "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_faa6428f4b7b4cb996cc4d5ca9bcb38c",
+ "placeholder": "",
+ "style": "IPY_MODEL_b4f99623a96f4d18989cf117b4c91660",
+ "value": " 341/341 [00:00<00:00, 3.56kB/s]"
+ }
+ },
+ "9c751e805d96415d9608c2422906d76e": {
+ "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
+ }
+ },
+ "9e1a5419468d4549a38b8d23aa14f6d3": {
+ "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
+ }
+ },
+ "a144d82a835e4d48b987fecd5af96b6c": {
+ "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_d78921386a5b493ab86718077b16a945",
+ "placeholder": "",
+ "style": "IPY_MODEL_42ad2fe1e9ee44dcb9d3b7c6af9a87a1",
+ "value": " 12/12 [00:16<00:00, 1.91s/it]"
+ }
+ },
+ "a432cb1a0bc7418bb90248973e91c452": {
+ "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": ""
+ }
+ },
+ "a509f68381854d7da52a21dde99a9f62": {
+ "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_1cfa604ca2924c25930887b466ac3e9b",
+ "max": 1059962,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_26aac0b253ba4e2e8f19acfa0bead5a7",
+ "value": 1059962
+ }
+ },
+ "a99edd082dff4f928c3b75abf84ec0ec": {
+ "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
+ }
+ },
+ "ac3ea0ea867b4c30bd4be87aaa602d42": {
+ "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
+ }
+ },
+ "ad2f2fd194ac4bca909e5af122370e3d": {
+ "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
+ }
+ },
+ "ad3538e88909423a9a8d109bd97745a5": {
+ "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_caf7f52d17334c0ea9141fb27dbb5bd1",
+ "max": 807,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_3634354fd978434bbad0fd11d3e0b5fb",
+ "value": 807
+ }
+ },
+ "af474aa6c91344da9a968e7e2488b74c": {
+ "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_69faef33b09f4da7b1c11639102b2a4f",
+ "placeholder": "",
+ "style": "IPY_MODEL_87d35ca268744638ad484ccf1a7fe2ed",
+ "value": " 50/50 [00:29<00:00, 1.65it/s]"
+ }
+ },
+ "b02317ef6e514fa9b2c58c64e7702533": {
+ "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
+ }
+ },
+ "b4f99623a96f4d18989cf117b4c91660": {
+ "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": ""
+ }
+ },
+ "b63595513fec4e81a0a8200294faf7ba": {
+ "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": ""
+ }
+ },
+ "b75a2474c46f4f3b9d84cb981bfffac7": {
+ "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
+ }
+ },
+ "bc42d1c7cdcd4064a1dbcc3eb1f3009b": {
+ "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
+ }
+ },
+ "bf0a27e1f6f3454fafa2bb04a16e4ba6": {
+ "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": ""
+ }
+ },
+ "c6305a1adcd946d2a4c66c05e614bcf1": {
+ "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_f369cc94c2544de3acdbcd35cac6d393",
+ "max": 50,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_0bec42769e7e4492aedd4afb63a91ff3",
+ "value": 50
+ }
+ },
+ "c79ef9b35d014fdfb9f88fc09e870d01": {
+ "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": ""
+ }
+ },
+ "c99c614b55ba44fbb2927642128fba9b": {
+ "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": ""
+ }
+ },
+ "ca063f5b64d74bc9be303eebe7092f81": {
+ "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": ""
+ }
+ },
+ "caf7f52d17334c0ea9141fb27dbb5bd1": {
+ "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
+ }
+ },
+ "cb68043195a642b3a495d82d87ffd1b8": {
+ "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_597a8eacf00b406ab23af333aea97e3c",
+ "max": 577,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_20396dbdc36b47538a5fd6b522478b67",
+ "value": 577
+ }
+ },
+ "cbcfc8e9b02348a182722c846cecca2a": {
+ "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
+ }
+ },
+ "ce3ebc0beb214d9b9df35c37eff91505": {
+ "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
+ }
+ },
+ "d02fc695003f435e9ec25e5ab7eec2bc": {
+ "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_e16097842da34cd0bc24cfaeab3de404",
+ "IPY_MODEL_0d2fba8088804ecab806472f5396f1bc",
+ "IPY_MODEL_8bef2ecbcbcf4ad1bb5e495a52ca2aa6"
+ ],
+ "layout": "IPY_MODEL_9a2aa30940934458ae53131db74a7406"
+ }
+ },
+ "d0c8dcdbf9f44ca1bc74ea1e2f127b0f": {
+ "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
+ }
+ },
+ "d1bf7fca5177409290ea45d701774d6d": {
+ "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
+ }
+ },
+ "d2598bdd44164f77a581fb0afad817f6": {
+ "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_23cd6b916dfe4e5faa4021cf02d07f53",
+ "placeholder": "",
+ "style": "IPY_MODEL_d97f27872680454ba3574589b371ea97",
+ "value": "Downloading (…)cheduler_config.json: 100%"
+ }
+ },
+ "d26404f63c3240d28ed1af7527307317": {
+ "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_7f29483722954a3697afb9cb24430e8c",
+ "IPY_MODEL_ad3538e88909423a9a8d109bd97745a5",
+ "IPY_MODEL_f1e7ac9f310140f0adac525362d99180"
+ ],
+ "layout": "IPY_MODEL_ce3ebc0beb214d9b9df35c37eff91505"
+ }
+ },
+ "d321be86c24d4a35a251d4ef7a75c24d": {
+ "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_73f2e3215913478aae13131aefadd0a5",
+ "placeholder": "",
+ "style": "IPY_MODEL_64f6ec814be648d3ba69f94eb844a049",
+ "value": " 50/50 [00:30<00:00, 1.80it/s]"
+ }
+ },
+ "d438504eef684317a6c09cc0b123d25d": {
+ "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
+ }
+ },
+ "d44653455b8a490997da5bfd8672cf7e": {
+ "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
+ }
+ },
+ "d78921386a5b493ab86718077b16a945": {
+ "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
+ }
+ },
+ "d97f27872680454ba3574589b371ea97": {
+ "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": ""
+ }
+ },
+ "da5028411a634a2eb2e1ed3fcc53ed6c": {
+ "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": ""
+ }
+ },
+ "dba967ac191d45a0b604e93f0dc1fffe": {
+ "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
+ }
+ },
+ "dbccb67e488b40faa3719e8db6e562a2": {
+ "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_d2598bdd44164f77a581fb0afad817f6",
+ "IPY_MODEL_03fe79b7b7c5439c99fef039f96a831b",
+ "IPY_MODEL_9ac0da7a10a54fbe897b21184cdf154f"
+ ],
+ "layout": "IPY_MODEL_32e55f352157421aa3e1fef5819b3587"
+ }
+ },
+ "de35fccd4b4a433e8b468ef3981bede9": {
+ "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_d0c8dcdbf9f44ca1bc74ea1e2f127b0f",
+ "placeholder": "",
+ "style": "IPY_MODEL_5e09f80f20554f419d925c5cdf55cc63",
+ "value": "Downloading (…)on_pytorch_model.bin: 100%"
+ }
+ },
+ "df83f20f558f43b9bf1e447316e9de4a": {
+ "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": ""
+ }
+ },
+ "dfdaf22078fd4385ab30060981d67666": {
+ "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
+ }
+ },
+ "dff99876d1e3468bb3cbd97160ecd7a1": {
+ "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
+ }
+ },
+ "e16097842da34cd0bc24cfaeab3de404": {
+ "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_45e95708fe6043c68fd25d8802778998",
+ "placeholder": "",
+ "style": "IPY_MODEL_da5028411a634a2eb2e1ed3fcc53ed6c",
+ "value": "Downloading (…)ain/model_index.json: 100%"
+ }
+ },
+ "e288ede57ad84b2bb455ba18016c68d8": {
+ "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": ""
+ }
+ },
+ "e68ae70236b04e5aa6c5de879ca81e9e": {
+ "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": ""
+ }
+ },
+ "e8f385dcd70f40d28cd27ba5d7edcef8": {
+ "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_3bc08cdf09a84428a51955f2aa42ea30",
+ "IPY_MODEL_cb68043195a642b3a495d82d87ffd1b8",
+ "IPY_MODEL_0cf91d0dc45340f19f6a7a2804000145"
+ ],
+ "layout": "IPY_MODEL_dff99876d1e3468bb3cbd97160ecd7a1"
+ }
+ },
+ "e9e33bc9dfd843e88f9f56c0400b07e2": {
+ "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_9307ea294e42484eb32d8b07fddd33dd",
+ "IPY_MODEL_a509f68381854d7da52a21dde99a9f62",
+ "IPY_MODEL_406fd8a742b443968d3f2fc1d3dbfef1"
+ ],
+ "layout": "IPY_MODEL_03433d859a7a4f3cae64d9d0bf374643"
+ }
+ },
+ "eb182b33be95418fad1010ccf7b176ab": {
+ "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_614b85aff85e47debadea7773583b8ab",
+ "IPY_MODEL_c6305a1adcd946d2a4c66c05e614bcf1",
+ "IPY_MODEL_d321be86c24d4a35a251d4ef7a75c24d"
+ ],
+ "layout": "IPY_MODEL_a99edd082dff4f928c3b75abf84ec0ec"
+ }
+ },
+ "ec377a46cf8647ff891a920c46897786": {
+ "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
+ }
+ },
+ "ece36cbb62cd46a8b452fac32dce3493": {
+ "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": ""
+ }
+ },
+ "edb8b182bc4a413185e754aae38ee93a": {
+ "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": ""
+ }
+ },
+ "ede27ca6747240eeb41a9dbde664e8a7": {
+ "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_99777597ceee470ca8c8a34f4846435a",
+ "placeholder": "",
+ "style": "IPY_MODEL_ca063f5b64d74bc9be303eebe7092f81",
+ "value": "Downloading (…)on_pytorch_model.bin: 100%"
+ }
+ },
+ "f0d04527bbe94bfdb91353827c2ad7db": {
+ "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_016df28dd739433daa2c8d3b1706486c",
+ "placeholder": "",
+ "style": "IPY_MODEL_43aa766628a147548714ef986c9d979a",
+ "value": " 617/617 [00:00<00:00, 3.81kB/s]"
+ }
+ },
+ "f1e7ac9f310140f0adac525362d99180": {
+ "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_9e1a5419468d4549a38b8d23aa14f6d3",
+ "placeholder": "",
+ "style": "IPY_MODEL_98eab664cdee4999bb09af5abe60535f",
+ "value": " 807/807 [00:00<00:00, 4.45kB/s]"
+ }
+ },
+ "f369cc94c2544de3acdbcd35cac6d393": {
+ "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
+ }
+ },
+ "f3804bde7c974eaf90df71e9fdd3539b": {
+ "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": ""
+ }
+ },
+ "f7d7fb787f884822aa3e5cdbfab22b1d": {
+ "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": ""
+ }
+ },
+ "f8cc05786ad94dcca69f1fedf6d4aa4a": {
+ "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": ""
+ }
+ },
+ "f9a2bf4d86ab403d9e1c7378e91bf467": {
+ "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": ""
+ }
+ },
+ "faa6428f4b7b4cb996cc4d5ca9bcb38c": {
+ "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
+ }
+ },
+ "fc3fc7c8bb714f39a67963f2792b527d": {
+ "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
+ }
+ },
+ "fc5d5de2233543eba400877e7891977a": {
+ "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
+ }
+ },
+ "fe3c4a4e4c8b4752a1f1d88da73fb808": {
+ "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": ""
+ }
+ },
+ "ff0910f0831b49ac9faaba1e70c275dc": {
+ "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": ""
+ }
+ },
+ "ff35f85d2db0404da5e01fbda308197a": {
+ "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_34714076cb4b479eab2c5ec6a6c7d50e",
+ "max": 1719312805,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_22d3e015ffd24db8aa145fab92c1901c",
+ "value": 1719312805
+ }
+ }
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/machine-learning/stable-diffusion-models/README.md b/machine-learning/stable-diffusion-models/README.md
new file mode 100644
index 00000000..322e7759
--- /dev/null
+++ b/machine-learning/stable-diffusion-models/README.md
@@ -0,0 +1 @@
+# [How to Generate Images from Text using Stable Diffusion in Python](https://www.thepythoncode.com/article/generate-images-from-text-stable-diffusion-python)
\ No newline at end of file
diff --git a/machine-learning/stable-diffusion-models/generate_images_from_text_stablediffusion.py b/machine-learning/stable-diffusion-models/generate_images_from_text_stablediffusion.py
new file mode 100644
index 00000000..1edeccc6
--- /dev/null
+++ b/machine-learning/stable-diffusion-models/generate_images_from_text_stablediffusion.py
@@ -0,0 +1,372 @@
+# %%
+%pip install --quiet --upgrade diffusers transformers accelerate
+
+# %%
+# The xformers package is mandatory to be able to create several 768x768 images.
+%pip install -q xformers==0.0.16rc425
+
+# %% [markdown]
+# # Using Dreamlike Photoreal
+
+# %%
+from diffusers import StableDiffusionPipeline
+import torch
+
+# %%
+model_id = "dreamlike-art/dreamlike-photoreal-2.0"
+pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
+pipe = pipe.to("cuda")
+
+# %%
+prompts = ["Cute Rabbit, Ultra HD, realistic, futuristic, sharp, octane render, photoshopped, photorealistic, soft, pastel, Aesthetic, Magical background",
+ "Anime style aesthetic landscape, 90's vintage style, digital art, ultra HD, 8k, photoshopped, sharp focus, surrealism, akira style, detailed line art",
+ "Beautiful, abstract art of a human mind, 3D, highly detailed, 8K, aesthetic"]
+
+images = []
+
+# %%
+for i, prompt in enumerate(prompts):
+ image = pipe(prompt).images[0]
+ image.save(f'result_{i}.jpg')
+ images.append(image)
+
+# %%
+images[0]
+
+# %%
+images[1]
+
+# %%
+images[2]
+
+# %% [markdown]
+# # Manually working with the different components
+
+# %%
+import torch
+from torch import autocast
+import numpy as np
+
+from transformers import CLIPTextModel, CLIPTokenizer
+
+from diffusers import AutoencoderKL
+from diffusers import LMSDiscreteScheduler
+from diffusers import UNet2DConditionModel
+from diffusers.schedulers.scheduling_ddim import DDIMScheduler
+
+from tqdm import tqdm
+from PIL import Image
+
+# %%
+class ImageDiffusionModel:
+
+ def __init__(self, vae, tokenizer, text_encoder, unet,
+ scheduler_LMS, scheduler_DDIM):
+ self.vae = vae
+ self.tokenizer = tokenizer
+ self.text_encoder = text_encoder
+ self.unet = unet
+ self.scheduler_LMS = scheduler_LMS
+ self.scheduler_DDIM = scheduler_DDIM
+ self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
+
+
+ def get_text_embeds(self, text):
+ # tokenize the text
+ text_input = self.tokenizer(text,
+ padding='max_length',
+ max_length=tokenizer.model_max_length,
+ truncation=True,
+ return_tensors='pt')
+ # embed the text
+ with torch.no_grad():
+ text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]
+
+ return text_embeds
+
+ def get_prompt_embeds(self, prompt):
+ # get conditional prompt embeddings
+ cond_embeds = self.get_text_embeds(prompt)
+ # get unconditional prompt embeddings
+ uncond_embeds = self.get_text_embeds([''] * len(prompt))
+ # concatenate the above 2 embeds
+ prompt_embeds = torch.cat([uncond_embeds, cond_embeds])
+ return prompt_embeds
+
+ def get_img_latents(self,
+ text_embeds,
+ height=512, width=512,
+ num_inference_steps=50,
+ guidance_scale=7.5,
+ img_latents=None):
+ # if no image latent is passed, start reverse diffusion with random noise
+ if img_latents is None:
+ img_latents = torch.randn((text_embeds.shape[0] // 2, self.unet.in_channels,\
+ height // 8, width // 8)).to(self.device)
+ # set the number of inference steps for the scheduler
+ self.scheduler_LMS.set_timesteps(num_inference_steps)
+ # scale the latent embeds
+ img_latents = img_latents * self.scheduler_LMS.sigmas[0]
+ # use autocast for automatic mixed precision (AMP) inference
+ with autocast('cuda'):
+ for i, t in tqdm(enumerate(self.scheduler_LMS.timesteps)):
+ # do a single forward pass for both the conditional and unconditional latents
+ latent_model_input = torch.cat([img_latents] * 2)
+ sigma = self.scheduler_LMS.sigmas[i]
+ latent_model_input = latent_model_input / ((sigma ** 2 + 1) ** 0.5)
+
+ # predict noise residuals
+ with torch.no_grad():
+ noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeds)['sample']
+
+ # separate predictions for unconditional and conditional outputs
+ noise_pred_uncond, noise_pred_cond = noise_pred.chunk(2)
+ # perform guidance
+ noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_cond - noise_pred_uncond)
+
+ # remove the noise from the current sample i.e. go from x_t to x_{t-1}
+ img_latents = self.scheduler_LMS.step(noise_pred, t, img_latents)['prev_sample']
+
+ return img_latents
+
+
+ def decode_img_latents(self, img_latents):
+ img_latents = img_latents / 0.18215
+ with torch.no_grad():
+ imgs = self.vae.decode(img_latents)["sample"]
+ # load image in the CPU
+ imgs = imgs.detach().cpu()
+ return imgs
+
+
+
+ def transform_imgs(self, imgs):
+ # transform images from the range [-1, 1] to [0, 1]
+ imgs = (imgs / 2 + 0.5).clamp(0, 1)
+ # permute the channels and convert to numpy arrays
+ imgs = imgs.permute(0, 2, 3, 1).numpy()
+ # scale images to the range [0, 255] and convert to int
+ imgs = (imgs * 255).round().astype('uint8')
+ # convert to PIL Image objects
+ imgs = [Image.fromarray(img) for img in imgs]
+ return imgs
+
+
+
+ def prompt_to_img(self,
+ prompts,
+ height=512, width=512,
+ num_inference_steps=50,
+ guidance_scale=7.5,
+ img_latents=None):
+
+ # convert prompt to a list
+ if isinstance(prompts, str):
+ prompts = [prompts]
+
+ # get prompt embeddings
+ text_embeds = self.get_prompt_embeds(prompts)
+
+ # get image embeddings
+ img_latents = self.get_img_latents(text_embeds,
+ height, width,
+ num_inference_steps,
+ guidance_scale,
+ img_latents)
+ # decode the image embeddings
+ imgs = self.decode_img_latents(img_latents)
+ # convert decoded image to suitable PIL Image format
+ imgs = self.transform_imgs(imgs)
+
+ return imgs
+
+
+
+ def encode_img_latents(self, imgs):
+ if not isinstance(imgs, list):
+ imgs = [imgs]
+
+ imgs = np.stack([np.array(img) for img in imgs], axis=0)
+ # scale images to the range [-1, 1]
+ imgs = 2 * ((imgs / 255.0) - 0.5)
+ imgs = torch.from_numpy(imgs).float().permute(0, 3, 1, 2)
+
+ # encode images
+ img_latents_dist = self.vae.encode(imgs.to(self.device))
+ # img_latents = img_latents_dist.sample()
+ img_latents = img_latents_dist["latent_dist"].mean.clone()
+ # scale images
+ img_latents *= 0.18215
+
+ return img_latents
+
+
+ def get_img_latents_similar(self,
+ img_latents,
+ text_embeds,
+ height=512, width=512,
+ num_inference_steps=50,
+ guidance_scale=7.5,
+ start_step=10):
+
+ # set the number of inference steps for the scheduler
+ self.scheduler_DDIM.set_timesteps(num_inference_steps)
+
+ if start_step > 0:
+ start_timestep = self.scheduler_DDIM.timesteps[start_step]
+ start_timesteps = start_timestep.repeat(img_latents.shape[0]).long()
+
+ noise = torch.randn_like(img_latents)
+ img_latents = scheduler_DDIM.add_noise(img_latents, noise, start_timesteps)
+
+ # use autocast for automatic mixed precision (AMP) inference
+ with autocast('cuda'):
+ for i, t in tqdm(enumerate(self.scheduler_DDIM.timesteps[start_step:])):
+ # do a single forward pass for both the conditional and unconditional latents
+ latent_model_input = torch.cat([img_latents] * 2)
+
+ # predict noise residuals
+ with torch.no_grad():
+ noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeds)['sample']
+
+ # separate predictions for unconditional and conditional outputs
+ noise_pred_uncond, noise_pred_cond = noise_pred.chunk(2)
+ # perform guidance
+ noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_cond - noise_pred_uncond)
+
+ # remove the noise from the current sample i.e. go from x_t to x_{t-1}
+ img_latents = self.scheduler_DDIM.step(noise_pred, t, img_latents)['prev_sample']
+
+ return img_latents
+
+
+ def similar_imgs(self,
+ img,
+ prompt,
+ height=512, width=512,
+ num_inference_steps=50,
+ guidance_scale=7.5,
+ start_step=10):
+
+ # get image latents
+ img_latents = self.encode_img_latents(img)
+
+ if isinstance(prompt, str):
+ prompt = [prompt]
+
+ text_embeds = self.get_prompt_embeds(prompt)
+
+ img_latents = self.get_img_latents_similar(img_latents=img_latents,
+ text_embeds=text_embeds,
+ height=height, width=width,
+ num_inference_steps=num_inference_steps,
+ guidance_scale=guidance_scale,
+ start_step=start_step)
+
+ imgs = self.decode_img_latents(img_latents)
+ imgs = self.transform_imgs(imgs)
+ # Clear the CUDA cache
+ torch.cuda.empty_cache()
+
+ return imgs
+
+
+# %%
+device = 'cuda'
+
+# model_name = "dreamlike-art/dreamlike-photoreal-2.0"
+model_name = "CompVis/stable-diffusion-v1-4"
+# Load autoencoder
+vae = AutoencoderKL.from_pretrained(model_name,
+ subfolder='vae').to(device)
+
+# Load tokenizer and the text encoder
+tokenizer = CLIPTokenizer.from_pretrained(model_name, subfolder="tokenizer")
+text_encoder = CLIPTextModel.from_pretrained(model_name, subfolder="text_encoder").to(device)
+
+# Load UNet model
+unet = UNet2DConditionModel.from_pretrained(model_name, subfolder='unet').to(device)
+
+# Load scheduler
+scheduler_LMS = LMSDiscreteScheduler(beta_start=0.00085,
+ beta_end=0.012,
+ beta_schedule='scaled_linear',
+ num_train_timesteps=1000)
+
+scheduler_DDIM = DDIMScheduler(beta_start=0.00085,
+ beta_end=0.012,
+ beta_schedule='scaled_linear',
+ num_train_timesteps=1000)
+
+# %%
+model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)
+
+prompts = ["A really giant cute pink barbie doll on the top of Burj Khalifa",
+ "A green, scary aesthetic dragon breathing fire near a group of heroic firefighters"]
+
+imgs = model.prompt_to_img(prompts)
+
+# %%
+imgs[0]
+
+# %%
+imgs[1]
+
+# %%
+prompt = ["Aesthetic star wars spaceship with an aethethic background, Ultra HD, futuristic, sharp, octane render, neon"]
+
+imgs = model.prompt_to_img(prompt)
+
+imgs[0]
+
+# %%
+# saving the image
+imgs[0].save("spaceship1.png")
+
+# %%
+# loading the image again
+original_img = Image.open("spaceship1.png")
+original_img
+
+# %%
+import torch
+import gc
+
+### If you get OOM errors, execute this cell
+# del model
+# Clear the CUDA cache
+torch.cuda.empty_cache()
+gc.collect()
+torch.cuda.empty_cache()
+
+# %%
+!nvidia-smi
+
+# %%
+model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)
+
+prompt = "Aesthetic star wars spaceship with an aethethic background, Ultra HD, futuristic, sharp, octane render, neon"
+
+imgs = model.similar_imgs(original_img, prompt, num_inference_steps=50, start_step=30)
+imgs[0]
+
+# %%
+# model = ImageDiffusionModel(vae, tokenizer, text_encoder, unet, scheduler_LMS, scheduler_DDIM)
+
+prompt = "Aesthetic dark star wars spaceship, Ultra HD, futuristic, sharp, octane render, neon"
+
+imgs = model.similar_imgs(original_img, prompt,
+ num_inference_steps=50,
+ start_step=40)
+imgs[0]
+
+# %%
+
+
+# %%
+
+
+# %%
+
+
+
diff --git a/machine-learning/stable-diffusion-models/requirements.txt b/machine-learning/stable-diffusion-models/requirements.txt
new file mode 100644
index 00000000..9033779d
--- /dev/null
+++ b/machine-learning/stable-diffusion-models/requirements.txt
@@ -0,0 +1,4 @@
+diffusers
+transformers
+accelerate
+xformers==0.0.16rc425
\ No newline at end of file
diff --git a/machine-learning/stable-diffusion-upscaler/README.md b/machine-learning/stable-diffusion-upscaler/README.md
new file mode 100644
index 00000000..3ae8e02d
--- /dev/null
+++ b/machine-learning/stable-diffusion-upscaler/README.md
@@ -0,0 +1 @@
+# [How to Upscale Images using Stable Diffusion in Python](https://www.thepythoncode.com/article/upscale-images-using-stable-diffusion-x4-upscaler-huggingface)
\ No newline at end of file
diff --git a/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb b/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb
new file mode 100644
index 00000000..3fdee1e8
--- /dev/null
+++ b/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb
@@ -0,0 +1,7341 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "-C875CYSCygt",
+ "outputId": "dd991ed9-d57f-4e5b-bee3-bcb6882369d9"
+ },
+ "outputs": [],
+ "source": [
+ "!pip install -qU diffusers transformers accelerate scipy safetensors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "mAHWEPSfUlmg"
+ },
+ "source": [
+ "# Hugging Face Implementation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "jor1D7LvDA9l"
+ },
+ "outputs": [],
+ "source": [
+ "import requests\n",
+ "from PIL import Image\n",
+ "from io import BytesIO\n",
+ "from diffusers import StableDiffusionUpscalePipeline\n",
+ "import torch"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 465,
+ "referenced_widgets": [
+ "bc72d593b56c42899ff4779e92bcf818",
+ "cabab037d12a455bbd283477e481d4ca",
+ "7cdde9f1b0f1403ababc0e3e120617c4",
+ "28c075d27bf8437c99b4fa8091d4d2c0",
+ "7c5bcff9ea9344dca52dbaa4a6545b50",
+ "2b68707a9749479cab4b4ecd124d87cb",
+ "e7274e83d2c44080bbbb2fc5ec79dfee",
+ "238d055bf5ff4891b2e9c6aa28a89fad",
+ "66a8f48777064cab94ebdfb44044fec7",
+ "c883ad6804cd4f628494b1eb7f432e51",
+ "6f1c7458863047598f98861765f325dd",
+ "6d0c44b7df564b87a2a688d770188184",
+ "502d0b0ef4c549b485c049a2dae9b4f1",
+ "67e1ee8ac39743d2a50db01595591f22",
+ "419cb861b6e84999a3708fd19b0295c6",
+ "fcc7b1147ad94a01ae49b4268e85d310",
+ "f931614414ba46adaab4c0522e65ebf8",
+ "e926a97d3f6149318dd6f01d17e90dd5",
+ "58bccc7add0a45d8b8640c42d89a864c",
+ "b4209eed23cb45038a5c614bfe8bf3b6",
+ "2e922ee442bc49f8b0d7d4bd79d92683",
+ "4d9d00362c1c4f48b5cddc1783956732",
+ "8d91958b962649479d9d85927ea0e3e0",
+ "2f1c260b17204c08870bac68408944c4",
+ "9f17b8692b824c0cb9a98cea381699a9",
+ "9a8c5af4272b4da0ba4aafa4da89817b",
+ "e04b95f508b7431c9f4ee9159e3b5b13",
+ "5896923dddc0466a9023c09c738f404a",
+ "f874ed5ecd6f4eed976ed24b0be4ae51",
+ "cdcf280e7a3043c2a1d59e0eea379d96",
+ "2e945d3f81204a538874a0a832102d15",
+ "417a14ed83ba4535bf47a39b9298aa4f",
+ "c797a3a49d1d44598e8810817eac04f6",
+ "659bd00aed7f4a41a843432966a1ccbf",
+ "274e736175d34926a0c614192288e510",
+ "a266a0d0bdde4a3aa09fec6a0a00abed",
+ "f78f911cd0ac4cdc8fdcbcb29f1a201b",
+ "9e0fde0538f84469bd62e9ea9f589b4f",
+ "bce74d8ba4dd4a35bd276ba2dbf0ffd1",
+ "f24b18d71065474a9f169b4fd66898f6",
+ "bc60bbefdc2a490588dd8f58327fd264",
+ "3119598ffcab4d6f9d1642ee595736ee",
+ "90c7965cfde540158d9e7cb049c2d7d3",
+ "b991b21d18ec471fb18b291a0c10aa6e",
+ "76fd2fe6247a48b7b3a6cc6eef8c9fa7",
+ "29da49469545454997e755839f8c156d",
+ "58aa60b3b1af45d2bdd8870dedd3cb67",
+ "f931d10a75ab4aafb1d6b92a0ba622b3",
+ "b67319578dc84245ad16cb8d25d3173c",
+ "d62c5143fa1544ba9e2d22555dc6c3f9",
+ "ba72519befe047eabb826d1f7ec0e39c",
+ "e76b29381c114f808b3454fb122e8d10",
+ "a1d133bc8fe344e2aed80fe5155177c3",
+ "5d3f04417ce64f80a2843e74bf6208f7",
+ "341fa26d73394e6cb71498a9c95b458c",
+ "6030f4bc6af8461abdc66e4599ef3f1f",
+ "818b00fb8ff04eadb9ccd1bdfe192807",
+ "44480a036c3c4442baa95d6288e83546",
+ "50949912a3ee403e8ddb328e62b61c0d",
+ "8dd862f24b164fc68664c30b3d241e62",
+ "aea53b42c35947c58d2c113bd2043078",
+ "02ce6e12de0f4ff1ab8029cf16e5fb99",
+ "520e09d44ecf488b93694eebe4a02147",
+ "5959385589b344b2bd8fc108067db8a3",
+ "b5a46aec8d594d02b618b9d59e4f4518",
+ "9ee85e252d32428ea44a91c71cd62a36",
+ "bfc87d61a154451294fa790fc30075ea",
+ "c8cabf1d8ffe421296725d8494ba0d3b",
+ "28fe7cfc4f4048eca1120a7228dcd629",
+ "9ecd3535823549bbbcbf3f131704d3eb",
+ "03b9fb0d0fa44ac8bf1a6aa678ff82c8",
+ "59b6eeeaf9464da891bf214ef1bbb7c2",
+ "7d3baaa3ab784895a59534261f43ce7d",
+ "8f487d06f9834f1b8dd0a63ffec62436",
+ "ee5e249b357649ab95d493d940bc3b01",
+ "9af01c4399c74223b5d7f94bd48d6952",
+ "aa44d82861804483b44e0f893b698b72",
+ "b7aa53a4de824d7fbec2a07c1771bc24",
+ "17c87915e01b4d2fa79042759bf1a57d",
+ "bafabfceff6e4f76b900878a4077337e",
+ "5d1c6a49ce6f4596946a2fd91bec3312",
+ "795329002e034ec4aead224cf74ea361",
+ "29fb67ab990343b6a374b35718b8a6c1",
+ "0854db4c71b449a9b15e994a38a1ca13",
+ "cd437bc3e2194f1a8c5e83ec98745b58",
+ "18ba1c9da9714f2494c06570e4dc1d64",
+ "085ee070cea44624806bcc7ada5ae36e",
+ "45148fd42fdb47b3a5424faa3c488c25",
+ "fb2398f1e5ff43f7a2f81bd51bf58e2a",
+ "53fa5e54123446199d57c27c3ee8b091",
+ "07a431a9456648b6bcbfa899ee0014ac",
+ "2f972961c0eb411ca45b8af05cc05e3b",
+ "6525d3514cee42f3bd14bdf898b63ad2",
+ "c8ba37c669974bbea2face17223d2bb4",
+ "c87c0b939bbe4e56b46fca4aa580f75a",
+ "639d6afb1b0440f98ce7e26cb621a111",
+ "7a9ce1cc3d71457797b0b1ca2831d514",
+ "c826a36c99ae462abccdc59266c404d3",
+ "5ef86b91d359434a9aa4787dc727cb1b",
+ "62bd9e1add374b9e90c54275bd2e0449",
+ "0d89ddfa9593441097ce8e42614ef775",
+ "e85ceff770654ef1bd935f54ca32ee07",
+ "d0716d01bfdf43ba88f8bbfd63d3285a",
+ "f6579ff0c08648309711a654ec3de748",
+ "665a3a25e6d543d79e2e321aec4954aa",
+ "d3971f94fa5f433580509a27ce3ad017",
+ "d801dfb1d399475e995ca9106f9b3a4d",
+ "ed75698d0ffe4bcf886c72d276bbee17",
+ "a9ab859e76814985877a4bacdb04e95a",
+ "1df97f1113c34b7eb89c7d1c6a81b3bd",
+ "fc9a8403148c431e8b0200d40c6efcb7",
+ "8b24a6ee676942ddaa27f44902ef2ac5",
+ "5b74c15d312f404e88323771b08b0aeb",
+ "7ad5acf646b44af2a1d8558abbb59199",
+ "d22523983b9a4c71a3057f3a281895ee",
+ "c081010577e7490eae450d69b0458a74",
+ "d011d28093544ae692f90a7380908275",
+ "a25cd36e4deb410f9ee54a92a18c939c",
+ "00cdbd64ce7d4b5a835a550ffc6b3510",
+ "7cc78829c6b744c380f52af44b49802a",
+ "03856828685f4f9791a0c00f9b4f5ed5",
+ "80aad8d6ac1b4b7780cd63deed9ceb11",
+ "0fcb664708324ec1bc56c4daa4a2dd15",
+ "37e24969e35c4099933ab57fac8b2599",
+ "efb86ed04a0d477794e70dc92219399b",
+ "3672f34ff79b417abb390592a3b9ed2b",
+ "5af1c44c0f434510abd7fe9d76f263da",
+ "895dd88b169e4688a51873bb1b3d2cd9",
+ "d3165abbffbc4da3bd4f0cb6f3437140",
+ "5a1be5246f2443858bd6933a89a68389",
+ "10d895cb5166417fa2b4cc0d2feb7b6f",
+ "23b55638314c4e2b967f85ab40042a6c",
+ "9c741e36450b4c66875df9dc3ba07507",
+ "cd9c9d32567f4e5aa9291f66b08490bf",
+ "c4995db7a62844b4a00daaf55847cabd",
+ "72fc113c125648538df5059fb578ae19",
+ "3943882166bb4470a800d9563f9e53a2",
+ "ad07cccdd8d44a9ab5e3458e8d902ac6",
+ "ff88d9a5f7d64ad7bb0f09f6c71543f1",
+ "080c7086e8684bb3bb857d23f426d5dd",
+ "37e74a92120d40ab99b8a3efeb397bd8",
+ "9ba492d205294bc0a8d07985ed271358",
+ "0a49275d970741f9b19f24569b80491a",
+ "4178b1767a614f89aa62f12a4e3a7350",
+ "c909bafccc65402fa93afea87f1b784e",
+ "6c32232cfb734ac3a3204a22c414fc18",
+ "1f37677826544166a0b63d36c9c3edac",
+ "a4d93e9fee48468281afac25f551806c",
+ "91f32130b9fc47ceaae99521c0b70015",
+ "e8bec5477f7c43c1a55c852ef8b7cb95",
+ "7a4e5fdddcd34b6cb658b94db24ba474",
+ "e6942466051e4a6a97c36b56d8d4e0c2",
+ "a8dbb00149f148ceaee2474c4304c902",
+ "f3c0042a67e34e72b1088b60c11ba2d0"
+ ]
+ },
+ "id": "l3QZf9-UDEb0",
+ "outputId": "d2d9ea4c-1665-431b-c71c-bc5441522721"
+ },
+ "outputs": [],
+ "source": [
+ "# load model and scheduler\n",
+ "model_id = \"stabilityai/stable-diffusion-x4-upscaler\"\n",
+ "pipeline = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)\n",
+ "pipeline = pipeline.to(\"cuda\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "1rZBf5X4VfbQ"
+ },
+ "outputs": [],
+ "source": [
+ "def get_low_res_img(url, shape):\n",
+ " response = requests.get(url)\n",
+ " low_res_img = Image.open(BytesIO(response.content)).convert(\"RGB\")\n",
+ " low_res_img = low_res_img.resize(shape)\n",
+ " return low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 145
+ },
+ "id": "VSWlrXyIDGSo",
+ "outputId": "1153aadd-bcc2-4365-9ce8-b02590018e49"
+ },
+ "outputs": [],
+ "source": [
+ "url = \"https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg/"\n",
+ "shape = (200, 128)\n",
+ "low_res_img = get_low_res_img(url, shape)\n",
+ "\n",
+ "low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 561,
+ "referenced_widgets": [
+ "c1dc0d80451c4d098f16eb6ec7eed752",
+ "d4c5db5f7ffe42beb2065e14cbdd755d",
+ "accd8a5f56cf41c5af297f8bf93f7058",
+ "824b0b410fed4ea1b5bc7f88236fc3e8",
+ "a6b2ca41ffb24b9193a83fd9a4c24a8c",
+ "bc9783a6d9d0437b881b01cad81c0173",
+ "9e5ef9fe15314ce3bf13e61994851485",
+ "ed9e0cfb4635476f9e31c5b48aeafde8",
+ "396aee75c5954aa9b634d79c18177977",
+ "c5f787d7f16542baa5a5657c3ecb14a0",
+ "be0a3bc217b04b2dbd06a90141c0dd35"
+ ]
+ },
+ "id": "hPtKNnwSDA_u",
+ "outputId": "60b2259e-02a0-445d-da26-eca1d51b4181"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"an aesthetic kingfisher\"\n",
+ "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 561,
+ "referenced_widgets": [
+ "9c2ff534109548fc8cab92f3b0aefc71",
+ "e417a487b9ab44d68bf5d4155f4ff339",
+ "ce0bc6a269b841e59b3c1b00796b8605",
+ "b014fb9554fb4f61a8d44135a6ad4954",
+ "c30445a77e81411bbad4f90b8c54bc35",
+ "c2ccf29c76d1461c8e820cdd1091684a",
+ "42248bb1fb38481eaa292dbca2d68e38",
+ "ac71f4fe6e804f19b2529c82e5a42049",
+ "518150c24b25401d92cf483e5ecb0253",
+ "d612163ad6d24d91a6d7ee758d8d6367",
+ "ab1c2c3e457944acb16508cf7a721290"
+ ]
+ },
+ "id": "I1hCWlwXU5ij",
+ "outputId": "fca3425e-973a-4951-df52-6eebba1b96e3"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"an aesthetic kingfisher, UHD, 4k, hyper realistic, extremely detailed, professional, vibrant, not grainy, smooth\"\n",
+ "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "4H0IkHfuDBB5",
+ "outputId": "1fceb2fc-7e6c-492f-fc5b-cbd6d64f3d65"
+ },
+ "outputs": [],
+ "source": [
+ "upscaled_interpolation = low_res_img.resize((800, 512))\n",
+ "upscaled_interpolation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 145
+ },
+ "id": "xxVVHJAeDBEM",
+ "outputId": "f099d0db-89ef-49df-92f1-c01c861634e2"
+ },
+ "outputs": [],
+ "source": [
+ "url = \"https://cdn.pixabay.com/photo/2022/06/14/20/57/woman-7262808_1280.jpg/"\n",
+ "shape = (200, 128)\n",
+ "low_res_img = get_low_res_img(url, shape)\n",
+ "\n",
+ "low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 561,
+ "referenced_widgets": [
+ "0c21001820524963b1214a2738c28584",
+ "ea062db0a1ad43af805bf2d86d26d369",
+ "2218df295404427eb6086c25f41946c5",
+ "682dc899e5ee4e24a9c0f1fc928fea6c",
+ "f8c3945c2c554cc9b7ea7435525c4ab4",
+ "b9cf936d26124cad959de16fcf5bea63",
+ "b3ae18d50eb4415b950f98bb38362207",
+ "0df5b95ccc3d4550bb1be7c001f54577",
+ "63a7a29ac462471eb67b275c68faff42",
+ "1ae88e18373a4322bddf0e51e5460a89",
+ "9b2140d07da744348068f013152b1160"
+ ]
+ },
+ "id": "UKtH894dXWHN",
+ "outputId": "44bfe391-7abe-4b99-bfd3-b19e755bfdaa"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"an old lady\"\n",
+ "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 561,
+ "referenced_widgets": [
+ "cf11071b7b114118a8b0b659167fa09e",
+ "03bce4ac84fd40d485b023e21fe65c4f",
+ "d0e9965e6aa4483da2dfa546b896e645",
+ "22338ed9cec54338ad33267ed579603a",
+ "622d32a9bbda46fca3ee0733be303765",
+ "ec0c44e82a814774823e60634d678b0d",
+ "e71abb2ba1b546ff9d7acd0c174f60d4",
+ "1237bd63fa814b57bbd9741296d71f46",
+ "5b3ca63a1af5452cb81fde6020fd9c53",
+ "a5971d5b793545a3845fbe1029b557e1",
+ "8384173365364cd5996018a775b167e2"
+ ]
+ },
+ "id": "L8fnlZsaDBHw",
+ "outputId": "9215669a-61be-4a6e-cd6b-85d212df6517"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"an iranian old lady with black hair, brown scarf, rock background\"\n",
+ "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "OTJNWtuyXOnE",
+ "outputId": "fe9eb4f3-f7b9-481f-b17b-e2028737141e"
+ },
+ "outputs": [],
+ "source": [
+ "upscaled_interpolation = low_res_img.resize((800, 512))\n",
+ "upscaled_interpolation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 145
+ },
+ "id": "dXXzMj7vXf5W",
+ "outputId": "1895b5c9-d87e-48e8-c580-97a3b81838ed"
+ },
+ "outputs": [],
+ "source": [
+ "url = \"https://cdn.pixabay.com/photo/2017/12/28/07/44/zebra-3044577_1280.jpg/"\n",
+ "shape = (450, 128)\n",
+ "low_res_img = get_low_res_img(url, shape)\n",
+ "\n",
+ "low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 453,
+ "referenced_widgets": [
+ "64373eefa4884b3084975549efcbd7fe",
+ "d8b3f3c7b8394b5580d8541f20c090ae",
+ "634af1f0b6894726bebb7b546c667169",
+ "5b89e69b011a40918b1acc0adf141874",
+ "9c01417376444eed820394ef843c0be3",
+ "db833b8a924f43208063cdc7b74220f7",
+ "d74c7ced9e5841e0a3635bf848912874",
+ "6a72b26cbdf041e7a8331fdc1642dee5",
+ "3c4dca0b51954031905bada22feef684",
+ "1e276839600443fa82ca0ab00409fd99",
+ "639d147ac3674094be21de9f3c11477c"
+ ]
+ },
+ "id": "xjH0CWRHXf7o",
+ "outputId": "b1ed8851-6243-43b8-d995-93129640b70d"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"zebras drinking water\"\n",
+ "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "ydbUyEFvXf_E",
+ "outputId": "3028b021-c4a0-4f19-8a2e-0a3e4b19f348"
+ },
+ "outputs": [],
+ "source": [
+ "upscaled_interpolation = low_res_img.resize((1800, 512))\n",
+ "upscaled_interpolation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "MFt4Y1AoYWse"
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Ng2oJwHqYWvz"
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "NiM8uOTr9DK3"
+ },
+ "source": [
+ "# Custom\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "yCuWhxws9D24"
+ },
+ "outputs": [],
+ "source": [
+ "from tqdm import tqdm\n",
+ "from torch import autocast"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "T7PrARPl9EN2"
+ },
+ "outputs": [],
+ "source": [
+ "class CustomSDUpscalingPipeline:\n",
+ " \"\"\"custom implementation of the Stable Diffusion Upscaling Pipeline\"\"\"\n",
+ "\n",
+ " def __init__(self,\n",
+ " vae,\n",
+ " tokenizer,\n",
+ " text_encoder,\n",
+ " unet,\n",
+ " low_res_scheduler,\n",
+ " scheduler,\n",
+ " image_processor):\n",
+ "\n",
+ " self.vae = vae\n",
+ " self.tokenizer = tokenizer\n",
+ " self.text_encoder = text_encoder\n",
+ " self.unet = unet\n",
+ " self.low_res_scheduler = low_res_scheduler\n",
+ " self.scheduler = scheduler\n",
+ " self.image_processor = image_processor\n",
+ " self.device = 'cuda' if torch.cuda.is_available() else 'cpu'\n",
+ "\n",
+ "\n",
+ "\n",
+ " def get_text_embeds(self, text):\n",
+ " \"\"\"returns embeddings for the given `text`\"\"\"\n",
+ "\n",
+ " # tokenize the text\n",
+ " text_input = self.tokenizer(text,\n",
+ " padding='max_length',\n",
+ " max_length=tokenizer.model_max_length,\n",
+ " truncation=True,\n",
+ " return_tensors='pt')\n",
+ " # embed the text\n",
+ " with torch.no_grad():\n",
+ " text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]\n",
+ " return text_embeds\n",
+ "\n",
+ "\n",
+ "\n",
+ " def get_prompt_embeds(self, prompt):\n",
+ " \"\"\"returns prompt embeddings based on classifier free guidance\"\"\"\n",
+ "\n",
+ " if isinstance(prompt, str):\n",
+ " prompt = [prompt]\n",
+ " # get conditional prompt embeddings\n",
+ " cond_embeds = self.get_text_embeds(prompt)\n",
+ " # get unconditional prompt embeddings\n",
+ " uncond_embeds = self.get_text_embeds([''] * len(prompt))\n",
+ " # concatenate the above 2 embeds for classfier free guidance\n",
+ " prompt_embeds = torch.cat([uncond_embeds, cond_embeds])\n",
+ " return prompt_embeds\n",
+ "\n",
+ "\n",
+ " def transform_image(self, image):\n",
+ " \"\"\"convert image from pytorch tensor to PIL format\"\"\"\n",
+ "\n",
+ " image = self.image_processor.postprocess(image, output_type='pil')\n",
+ " return image\n",
+ "\n",
+ "\n",
+ "\n",
+ " def get_initial_latents(self, height, width, num_channels_latents, batch_size):\n",
+ " \"\"\"returns noise latent tensor of relevant shape scaled by the scheduler\"\"\"\n",
+ "\n",
+ " image_latents = torch.randn((batch_size, num_channels_latents, height, width)).to(self.device)\n",
+ " # scale the initial noise by the standard deviation required by the scheduler\n",
+ " image_latents = image_latents * self.scheduler.init_noise_sigma\n",
+ " return image_latents\n",
+ "\n",
+ "\n",
+ "\n",
+ " def denoise_latents(self,\n",
+ " prompt_embeds,\n",
+ " image,\n",
+ " timesteps,\n",
+ " latents,\n",
+ " noise_level,\n",
+ " guidance_scale):\n",
+ " \"\"\"denoises latents from noisy latent to a meaningful latents\"\"\"\n",
+ "\n",
+ " # use autocast for automatic mixed precision (AMP) inference\n",
+ " with autocast('cuda'):\n",
+ " for i, t in tqdm(enumerate(timesteps)):\n",
+ " # duplicate image latents to do classifier free guidance\n",
+ " latent_model_input = torch.cat([latents] * 2)\n",
+ " latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)\n",
+ " latent_model_input = torch.cat([latent_model_input, image], dim=1)\n",
+ "\n",
+ " # predict noise residuals\n",
+ " with torch.no_grad():\n",
+ " noise_pred = self.unet(\n",
+ " latent_model_input,\n",
+ " t,\n",
+ " encoder_hidden_states=prompt_embeds,\n",
+ " class_labels=noise_level\n",
+ " )['sample']\n",
+ "\n",
+ " # separate predictions for unconditional and conditional outputs\n",
+ " noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\n",
+ "\n",
+ " # perform guidance\n",
+ " noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)\n",
+ "\n",
+ " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n",
+ " latents = self.scheduler.step(noise_pred, t, latents)['prev_sample']\n",
+ "\n",
+ " return latents\n",
+ "\n",
+ "\n",
+ "\n",
+ " def __call__(self,\n",
+ " prompt,\n",
+ " image,\n",
+ " num_inference_steps=20,\n",
+ " guidance_scale=9.0,\n",
+ " noise_level=20):\n",
+ " \"\"\"generates new image based on the `prompt` and the `image`\"\"\"\n",
+ "\n",
+ " # encode input prompt\n",
+ " prompt_embeds = self.get_prompt_embeds(prompt)\n",
+ "\n",
+ " # preprocess image\n",
+ " image = self.image_processor.preprocess(image).to(self.device)\n",
+ "\n",
+ " # prepare timesteps\n",
+ " self.scheduler.set_timesteps(num_inference_steps, device=self.device)\n",
+ " timesteps = self.scheduler.timesteps\n",
+ "\n",
+ " # add noise to image\n",
+ " noise_level = torch.tensor([noise_level], device=self.device)\n",
+ " noise = torch.randn(image.shape, device=self.device)\n",
+ " image = self.low_res_scheduler.add_noise(image, noise, noise_level)\n",
+ "\n",
+ " # duplicate image for classifier free guidance\n",
+ " image = torch.cat([image] * 2)\n",
+ " noise_level = torch.cat([noise_level] * image.shape[0])\n",
+ "\n",
+ " # prepare the initial image in the latent space (noise on which we will do reverse diffusion)\n",
+ " num_channels_latents = self.vae.config.latent_channels\n",
+ " batch_size = prompt_embeds.shape[0] // 2\n",
+ " height, width = image.shape[2:]\n",
+ " latents = self.get_initial_latents(height, width, num_channels_latents, batch_size)\n",
+ "\n",
+ " # denoise latents\n",
+ " latents = self.denoise_latents(prompt_embeds,\n",
+ " image,\n",
+ " timesteps,\n",
+ " latents,\n",
+ " noise_level,\n",
+ " guidance_scale)\n",
+ "\n",
+ " # decode latents to get the image into pixel space\n",
+ " latents = latents.to(torch.float16)\n",
+ " image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\n",
+ "\n",
+ " # convert to PIL Image format\n",
+ " image = self.transform_image(image.detach()) # detach to remove any computed gradients\n",
+ "\n",
+ " return image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "iPMCQB179EQN"
+ },
+ "outputs": [],
+ "source": [
+ "# get all the components from the SD Upscaler pipeline\n",
+ "vae = pipeline.vae\n",
+ "tokenizer = pipeline.tokenizer\n",
+ "text_encoder = pipeline.text_encoder\n",
+ "unet = pipeline.unet\n",
+ "low_res_scheduler = pipeline.low_res_scheduler\n",
+ "scheduler = pipeline.scheduler\n",
+ "image_processor = pipeline.image_processor\n",
+ "\n",
+ "custom_pipe = CustomSDUpscalingPipeline(vae, tokenizer, text_encoder, unet, low_res_scheduler, scheduler, image_processor)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "HUxdvfo7eLcq"
+ },
+ "outputs": [],
+ "source": [
+ "url = \"https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg/"\n",
+ "shape = (200, 128)\n",
+ "low_res_img = get_low_res_img(url, shape)\n",
+ "\n",
+ "low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 546
+ },
+ "id": "SgbP2oQl9EUk",
+ "outputId": "b1b3d70c-58ef-497a-d87b-2c15073e4d2a"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"an aesthetic kingfisher\"\n",
+ "upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 145
+ },
+ "id": "Wf8MTwFCeRrR",
+ "outputId": "17827131-0f99-408e-b61d-ff802509baa9"
+ },
+ "outputs": [],
+ "source": [
+ "url = \"https://cdn.pixabay.com/photo/2018/07/31/22/08/lion-3576045_1280.jpg/"\n",
+ "shape = (200, 128)\n",
+ "low_res_img = get_low_res_img(url, shape)\n",
+ "\n",
+ "low_res_img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 546
+ },
+ "id": "QzkJk4Jo9Eca",
+ "outputId": "a5ddbb9a-7526-48f5-f449-22e54445fae2"
+ },
+ "outputs": [],
+ "source": [
+ "prompt = \"a professional photograph of a lion's face\"\n",
+ "upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]\n",
+ "upscaled_image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 529
+ },
+ "id": "tT3jd43tdbeg",
+ "outputId": "d7a8e0a7-1ed1-4c18-8b6c-b5dcbf4c4fb5"
+ },
+ "outputs": [],
+ "source": [
+ "upscaled_interpolation = low_res_img.resize((800, 512))\n",
+ "upscaled_interpolation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "5JUP7spYdbh2"
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "provenance": []
+ },
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "00cdbd64ce7d4b5a835a550ffc6b3510": {
+ "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": ""
+ }
+ },
+ "02ce6e12de0f4ff1ab8029cf16e5fb99": {
+ "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": ""
+ }
+ },
+ "03856828685f4f9791a0c00f9b4f5ed5": {
+ "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": ""
+ }
+ },
+ "03b9fb0d0fa44ac8bf1a6aa678ff82c8": {
+ "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
+ }
+ },
+ "03bce4ac84fd40d485b023e21fe65c4f": {
+ "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_ec0c44e82a814774823e60634d678b0d",
+ "placeholder": "",
+ "style": "IPY_MODEL_e71abb2ba1b546ff9d7acd0c174f60d4",
+ "value": "100%"
+ }
+ },
+ "07a431a9456648b6bcbfa899ee0014ac": {
+ "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_639d6afb1b0440f98ce7e26cb621a111",
+ "max": 348,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_7a9ce1cc3d71457797b0b1ca2831d514",
+ "value": 348
+ }
+ },
+ "080c7086e8684bb3bb857d23f426d5dd": {
+ "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
+ }
+ },
+ "0854db4c71b449a9b15e994a38a1ca13": {
+ "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": ""
+ }
+ },
+ "085ee070cea44624806bcc7ada5ae36e": {
+ "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
+ }
+ },
+ "0a49275d970741f9b19f24569b80491a": {
+ "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": ""
+ }
+ },
+ "0c21001820524963b1214a2738c28584": {
+ "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_ea062db0a1ad43af805bf2d86d26d369",
+ "IPY_MODEL_2218df295404427eb6086c25f41946c5",
+ "IPY_MODEL_682dc899e5ee4e24a9c0f1fc928fea6c"
+ ],
+ "layout": "IPY_MODEL_f8c3945c2c554cc9b7ea7435525c4ab4"
+ }
+ },
+ "0d89ddfa9593441097ce8e42614ef775": {
+ "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_665a3a25e6d543d79e2e321aec4954aa",
+ "placeholder": "",
+ "style": "IPY_MODEL_d3971f94fa5f433580509a27ce3ad017",
+ "value": "Downloading (…)8440/vae/config.json: 100%"
+ }
+ },
+ "0df5b95ccc3d4550bb1be7c001f54577": {
+ "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
+ }
+ },
+ "0fcb664708324ec1bc56c4daa4a2dd15": {
+ "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_5af1c44c0f434510abd7fe9d76f263da",
+ "placeholder": "",
+ "style": "IPY_MODEL_895dd88b169e4688a51873bb1b3d2cd9",
+ "value": "Downloading model.safetensors: 100%"
+ }
+ },
+ "10d895cb5166417fa2b4cc0d2feb7b6f": {
+ "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
+ }
+ },
+ "1237bd63fa814b57bbd9741296d71f46": {
+ "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
+ }
+ },
+ "17c87915e01b4d2fa79042759bf1a57d": {
+ "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_29fb67ab990343b6a374b35718b8a6c1",
+ "placeholder": "",
+ "style": "IPY_MODEL_0854db4c71b449a9b15e994a38a1ca13",
+ "value": "Downloading (…)okenizer_config.json: 100%"
+ }
+ },
+ "18ba1c9da9714f2494c06570e4dc1d64": {
+ "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": ""
+ }
+ },
+ "1ae88e18373a4322bddf0e51e5460a89": {
+ "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
+ }
+ },
+ "1df97f1113c34b7eb89c7d1c6a81b3bd": {
+ "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": ""
+ }
+ },
+ "1e276839600443fa82ca0ab00409fd99": {
+ "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
+ }
+ },
+ "1f37677826544166a0b63d36c9c3edac": {
+ "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_a8dbb00149f148ceaee2474c4304c902",
+ "placeholder": "",
+ "style": "IPY_MODEL_f3c0042a67e34e72b1088b60c11ba2d0",
+ "value": " 1.89G/1.89G [00:49<00:00, 33.0MB/s]"
+ }
+ },
+ "2218df295404427eb6086c25f41946c5": {
+ "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_0df5b95ccc3d4550bb1be7c001f54577",
+ "max": 75,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_63a7a29ac462471eb67b275c68faff42",
+ "value": 75
+ }
+ },
+ "22338ed9cec54338ad33267ed579603a": {
+ "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_a5971d5b793545a3845fbe1029b557e1",
+ "placeholder": "",
+ "style": "IPY_MODEL_8384173365364cd5996018a775b167e2",
+ "value": " 75/75 [00:21<00:00, 3.57it/s]"
+ }
+ },
+ "238d055bf5ff4891b2e9c6aa28a89fad": {
+ "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
+ }
+ },
+ "23b55638314c4e2b967f85ab40042a6c": {
+ "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": ""
+ }
+ },
+ "274e736175d34926a0c614192288e510": {
+ "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_bce74d8ba4dd4a35bd276ba2dbf0ffd1",
+ "placeholder": "",
+ "style": "IPY_MODEL_f24b18d71065474a9f169b4fd66898f6",
+ "value": "Downloading (…)cial_tokens_map.json: 100%"
+ }
+ },
+ "28c075d27bf8437c99b4fa8091d4d2c0": {
+ "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_c883ad6804cd4f628494b1eb7f432e51",
+ "placeholder": "",
+ "style": "IPY_MODEL_6f1c7458863047598f98861765f325dd",
+ "value": " 485/485 [00:00<00:00, 8.74kB/s]"
+ }
+ },
+ "28fe7cfc4f4048eca1120a7228dcd629": {
+ "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_8f487d06f9834f1b8dd0a63ffec62436",
+ "max": 634,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_ee5e249b357649ab95d493d940bc3b01",
+ "value": 634
+ }
+ },
+ "29da49469545454997e755839f8c156d": {
+ "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_d62c5143fa1544ba9e2d22555dc6c3f9",
+ "placeholder": "",
+ "style": "IPY_MODEL_ba72519befe047eabb826d1f7ec0e39c",
+ "value": "Downloading (…)tokenizer/vocab.json: 100%"
+ }
+ },
+ "29fb67ab990343b6a374b35718b8a6c1": {
+ "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
+ }
+ },
+ "2b68707a9749479cab4b4ecd124d87cb": {
+ "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
+ }
+ },
+ "2e922ee442bc49f8b0d7d4bd79d92683": {
+ "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
+ }
+ },
+ "2e945d3f81204a538874a0a832102d15": {
+ "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": ""
+ }
+ },
+ "2f1c260b17204c08870bac68408944c4": {
+ "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_5896923dddc0466a9023c09c738f404a",
+ "placeholder": "",
+ "style": "IPY_MODEL_f874ed5ecd6f4eed976ed24b0be4ae51",
+ "value": "Downloading (…)tokenizer/merges.txt: 100%"
+ }
+ },
+ "2f972961c0eb411ca45b8af05cc05e3b": {
+ "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_c826a36c99ae462abccdc59266c404d3",
+ "placeholder": "",
+ "style": "IPY_MODEL_5ef86b91d359434a9aa4787dc727cb1b",
+ "value": " 348/348 [00:00<00:00, 1.79kB/s]"
+ }
+ },
+ "3119598ffcab4d6f9d1642ee595736ee": {
+ "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": ""
+ }
+ },
+ "341fa26d73394e6cb71498a9c95b458c": {
+ "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": ""
+ }
+ },
+ "3672f34ff79b417abb390592a3b9ed2b": {
+ "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
+ }
+ },
+ "37e24969e35c4099933ab57fac8b2599": {
+ "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_d3165abbffbc4da3bd4f0cb6f3437140",
+ "max": 1361597018,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_5a1be5246f2443858bd6933a89a68389",
+ "value": 1361597018
+ }
+ },
+ "37e74a92120d40ab99b8a3efeb397bd8": {
+ "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": ""
+ }
+ },
+ "3943882166bb4470a800d9563f9e53a2": {
+ "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
+ }
+ },
+ "396aee75c5954aa9b634d79c18177977": {
+ "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": ""
+ }
+ },
+ "3c4dca0b51954031905bada22feef684": {
+ "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": ""
+ }
+ },
+ "4178b1767a614f89aa62f12a4e3a7350": {
+ "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_c909bafccc65402fa93afea87f1b784e",
+ "IPY_MODEL_6c32232cfb734ac3a3204a22c414fc18",
+ "IPY_MODEL_1f37677826544166a0b63d36c9c3edac"
+ ],
+ "layout": "IPY_MODEL_a4d93e9fee48468281afac25f551806c"
+ }
+ },
+ "417a14ed83ba4535bf47a39b9298aa4f": {
+ "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
+ }
+ },
+ "419cb861b6e84999a3708fd19b0295c6": {
+ "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_2e922ee442bc49f8b0d7d4bd79d92683",
+ "placeholder": "",
+ "style": "IPY_MODEL_4d9d00362c1c4f48b5cddc1783956732",
+ "value": " 13/13 [00:50<00:00, 4.61s/it]"
+ }
+ },
+ "42248bb1fb38481eaa292dbca2d68e38": {
+ "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": ""
+ }
+ },
+ "44480a036c3c4442baa95d6288e83546": {
+ "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_520e09d44ecf488b93694eebe4a02147",
+ "max": 300,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_5959385589b344b2bd8fc108067db8a3",
+ "value": 300
+ }
+ },
+ "45148fd42fdb47b3a5424faa3c488c25": {
+ "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": ""
+ }
+ },
+ "4d9d00362c1c4f48b5cddc1783956732": {
+ "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": ""
+ }
+ },
+ "502d0b0ef4c549b485c049a2dae9b4f1": {
+ "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_f931614414ba46adaab4c0522e65ebf8",
+ "placeholder": "",
+ "style": "IPY_MODEL_e926a97d3f6149318dd6f01d17e90dd5",
+ "value": "Fetching 13 files: 100%"
+ }
+ },
+ "50949912a3ee403e8ddb328e62b61c0d": {
+ "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_b5a46aec8d594d02b618b9d59e4f4518",
+ "placeholder": "",
+ "style": "IPY_MODEL_9ee85e252d32428ea44a91c71cd62a36",
+ "value": " 300/300 [00:00<00:00, 1.73kB/s]"
+ }
+ },
+ "518150c24b25401d92cf483e5ecb0253": {
+ "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": ""
+ }
+ },
+ "520e09d44ecf488b93694eebe4a02147": {
+ "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
+ }
+ },
+ "53fa5e54123446199d57c27c3ee8b091": {
+ "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_c8ba37c669974bbea2face17223d2bb4",
+ "placeholder": "",
+ "style": "IPY_MODEL_c87c0b939bbe4e56b46fca4aa580f75a",
+ "value": "Downloading (…)cheduler_config.json: 100%"
+ }
+ },
+ "5896923dddc0466a9023c09c738f404a": {
+ "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
+ }
+ },
+ "58aa60b3b1af45d2bdd8870dedd3cb67": {
+ "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_e76b29381c114f808b3454fb122e8d10",
+ "max": 1059962,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_a1d133bc8fe344e2aed80fe5155177c3",
+ "value": 1059962
+ }
+ },
+ "58bccc7add0a45d8b8640c42d89a864c": {
+ "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
+ }
+ },
+ "5959385589b344b2bd8fc108067db8a3": {
+ "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": ""
+ }
+ },
+ "59b6eeeaf9464da891bf214ef1bbb7c2": {
+ "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
+ }
+ },
+ "5a1be5246f2443858bd6933a89a68389": {
+ "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": ""
+ }
+ },
+ "5af1c44c0f434510abd7fe9d76f263da": {
+ "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
+ }
+ },
+ "5b3ca63a1af5452cb81fde6020fd9c53": {
+ "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": ""
+ }
+ },
+ "5b74c15d312f404e88323771b08b0aeb": {
+ "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_a25cd36e4deb410f9ee54a92a18c939c",
+ "max": 982,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_00cdbd64ce7d4b5a835a550ffc6b3510",
+ "value": 982
+ }
+ },
+ "5b89e69b011a40918b1acc0adf141874": {
+ "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_1e276839600443fa82ca0ab00409fd99",
+ "placeholder": "",
+ "style": "IPY_MODEL_639d147ac3674094be21de9f3c11477c",
+ "value": " 75/75 [00:46<00:00, 1.62it/s]"
+ }
+ },
+ "5d1c6a49ce6f4596946a2fd91bec3312": {
+ "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_085ee070cea44624806bcc7ada5ae36e",
+ "placeholder": "",
+ "style": "IPY_MODEL_45148fd42fdb47b3a5424faa3c488c25",
+ "value": " 825/825 [00:00<00:00, 6.91kB/s]"
+ }
+ },
+ "5d3f04417ce64f80a2843e74bf6208f7": {
+ "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
+ }
+ },
+ "5ef86b91d359434a9aa4787dc727cb1b": {
+ "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": ""
+ }
+ },
+ "6030f4bc6af8461abdc66e4599ef3f1f": {
+ "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_818b00fb8ff04eadb9ccd1bdfe192807",
+ "IPY_MODEL_44480a036c3c4442baa95d6288e83546",
+ "IPY_MODEL_50949912a3ee403e8ddb328e62b61c0d"
+ ],
+ "layout": "IPY_MODEL_8dd862f24b164fc68664c30b3d241e62"
+ }
+ },
+ "622d32a9bbda46fca3ee0733be303765": {
+ "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
+ }
+ },
+ "62bd9e1add374b9e90c54275bd2e0449": {
+ "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_0d89ddfa9593441097ce8e42614ef775",
+ "IPY_MODEL_e85ceff770654ef1bd935f54ca32ee07",
+ "IPY_MODEL_d0716d01bfdf43ba88f8bbfd63d3285a"
+ ],
+ "layout": "IPY_MODEL_f6579ff0c08648309711a654ec3de748"
+ }
+ },
+ "634af1f0b6894726bebb7b546c667169": {
+ "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_6a72b26cbdf041e7a8331fdc1642dee5",
+ "max": 75,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_3c4dca0b51954031905bada22feef684",
+ "value": 75
+ }
+ },
+ "639d147ac3674094be21de9f3c11477c": {
+ "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": ""
+ }
+ },
+ "639d6afb1b0440f98ce7e26cb621a111": {
+ "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
+ }
+ },
+ "63a7a29ac462471eb67b275c68faff42": {
+ "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": ""
+ }
+ },
+ "64373eefa4884b3084975549efcbd7fe": {
+ "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_d8b3f3c7b8394b5580d8541f20c090ae",
+ "IPY_MODEL_634af1f0b6894726bebb7b546c667169",
+ "IPY_MODEL_5b89e69b011a40918b1acc0adf141874"
+ ],
+ "layout": "IPY_MODEL_9c01417376444eed820394ef843c0be3"
+ }
+ },
+ "6525d3514cee42f3bd14bdf898b63ad2": {
+ "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
+ }
+ },
+ "659bd00aed7f4a41a843432966a1ccbf": {
+ "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_274e736175d34926a0c614192288e510",
+ "IPY_MODEL_a266a0d0bdde4a3aa09fec6a0a00abed",
+ "IPY_MODEL_f78f911cd0ac4cdc8fdcbcb29f1a201b"
+ ],
+ "layout": "IPY_MODEL_9e0fde0538f84469bd62e9ea9f589b4f"
+ }
+ },
+ "665a3a25e6d543d79e2e321aec4954aa": {
+ "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
+ }
+ },
+ "66a8f48777064cab94ebdfb44044fec7": {
+ "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": ""
+ }
+ },
+ "67e1ee8ac39743d2a50db01595591f22": {
+ "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_58bccc7add0a45d8b8640c42d89a864c",
+ "max": 13,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_b4209eed23cb45038a5c614bfe8bf3b6",
+ "value": 13
+ }
+ },
+ "682dc899e5ee4e24a9c0f1fc928fea6c": {
+ "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_1ae88e18373a4322bddf0e51e5460a89",
+ "placeholder": "",
+ "style": "IPY_MODEL_9b2140d07da744348068f013152b1160",
+ "value": " 75/75 [00:21<00:00, 3.37it/s]"
+ }
+ },
+ "6a72b26cbdf041e7a8331fdc1642dee5": {
+ "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
+ }
+ },
+ "6c32232cfb734ac3a3204a22c414fc18": {
+ "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_7a4e5fdddcd34b6cb658b94db24ba474",
+ "max": 1893675621,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_e6942466051e4a6a97c36b56d8d4e0c2",
+ "value": 1893675621
+ }
+ },
+ "6d0c44b7df564b87a2a688d770188184": {
+ "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_502d0b0ef4c549b485c049a2dae9b4f1",
+ "IPY_MODEL_67e1ee8ac39743d2a50db01595591f22",
+ "IPY_MODEL_419cb861b6e84999a3708fd19b0295c6"
+ ],
+ "layout": "IPY_MODEL_fcc7b1147ad94a01ae49b4268e85d310"
+ }
+ },
+ "6f1c7458863047598f98861765f325dd": {
+ "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": ""
+ }
+ },
+ "72fc113c125648538df5059fb578ae19": {
+ "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_9ba492d205294bc0a8d07985ed271358",
+ "placeholder": "",
+ "style": "IPY_MODEL_0a49275d970741f9b19f24569b80491a",
+ "value": " 221M/221M [00:03<00:00, 63.9MB/s]"
+ }
+ },
+ "76fd2fe6247a48b7b3a6cc6eef8c9fa7": {
+ "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_29da49469545454997e755839f8c156d",
+ "IPY_MODEL_58aa60b3b1af45d2bdd8870dedd3cb67",
+ "IPY_MODEL_f931d10a75ab4aafb1d6b92a0ba622b3"
+ ],
+ "layout": "IPY_MODEL_b67319578dc84245ad16cb8d25d3173c"
+ }
+ },
+ "795329002e034ec4aead224cf74ea361": {
+ "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
+ }
+ },
+ "7a4e5fdddcd34b6cb658b94db24ba474": {
+ "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
+ }
+ },
+ "7a9ce1cc3d71457797b0b1ca2831d514": {
+ "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": ""
+ }
+ },
+ "7ad5acf646b44af2a1d8558abbb59199": {
+ "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_7cc78829c6b744c380f52af44b49802a",
+ "placeholder": "",
+ "style": "IPY_MODEL_03856828685f4f9791a0c00f9b4f5ed5",
+ "value": " 982/982 [00:00<00:00, 17.1kB/s]"
+ }
+ },
+ "7c5bcff9ea9344dca52dbaa4a6545b50": {
+ "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
+ }
+ },
+ "7cc78829c6b744c380f52af44b49802a": {
+ "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
+ }
+ },
+ "7cdde9f1b0f1403ababc0e3e120617c4": {
+ "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_238d055bf5ff4891b2e9c6aa28a89fad",
+ "max": 485,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_66a8f48777064cab94ebdfb44044fec7",
+ "value": 485
+ }
+ },
+ "7d3baaa3ab784895a59534261f43ce7d": {
+ "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": ""
+ }
+ },
+ "80aad8d6ac1b4b7780cd63deed9ceb11": {
+ "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_0fcb664708324ec1bc56c4daa4a2dd15",
+ "IPY_MODEL_37e24969e35c4099933ab57fac8b2599",
+ "IPY_MODEL_efb86ed04a0d477794e70dc92219399b"
+ ],
+ "layout": "IPY_MODEL_3672f34ff79b417abb390592a3b9ed2b"
+ }
+ },
+ "818b00fb8ff04eadb9ccd1bdfe192807": {
+ "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_aea53b42c35947c58d2c113bd2043078",
+ "placeholder": "",
+ "style": "IPY_MODEL_02ce6e12de0f4ff1ab8029cf16e5fb99",
+ "value": "Downloading (…)cheduler_config.json: 100%"
+ }
+ },
+ "824b0b410fed4ea1b5bc7f88236fc3e8": {
+ "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_c5f787d7f16542baa5a5657c3ecb14a0",
+ "placeholder": "",
+ "style": "IPY_MODEL_be0a3bc217b04b2dbd06a90141c0dd35",
+ "value": " 75/75 [00:20<00:00, 3.66it/s]"
+ }
+ },
+ "8384173365364cd5996018a775b167e2": {
+ "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": ""
+ }
+ },
+ "895dd88b169e4688a51873bb1b3d2cd9": {
+ "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": ""
+ }
+ },
+ "8b24a6ee676942ddaa27f44902ef2ac5": {
+ "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_c081010577e7490eae450d69b0458a74",
+ "placeholder": "",
+ "style": "IPY_MODEL_d011d28093544ae692f90a7380908275",
+ "value": "Downloading (…)440/unet/config.json: 100%"
+ }
+ },
+ "8d91958b962649479d9d85927ea0e3e0": {
+ "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_2f1c260b17204c08870bac68408944c4",
+ "IPY_MODEL_9f17b8692b824c0cb9a98cea381699a9",
+ "IPY_MODEL_9a8c5af4272b4da0ba4aafa4da89817b"
+ ],
+ "layout": "IPY_MODEL_e04b95f508b7431c9f4ee9159e3b5b13"
+ }
+ },
+ "8dd862f24b164fc68664c30b3d241e62": {
+ "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
+ }
+ },
+ "8f487d06f9834f1b8dd0a63ffec62436": {
+ "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
+ }
+ },
+ "90c7965cfde540158d9e7cb049c2d7d3": {
+ "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
+ }
+ },
+ "91f32130b9fc47ceaae99521c0b70015": {
+ "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
+ }
+ },
+ "9a8c5af4272b4da0ba4aafa4da89817b": {
+ "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_417a14ed83ba4535bf47a39b9298aa4f",
+ "placeholder": "",
+ "style": "IPY_MODEL_c797a3a49d1d44598e8810817eac04f6",
+ "value": " 525k/525k [00:00<00:00, 2.19MB/s]"
+ }
+ },
+ "9af01c4399c74223b5d7f94bd48d6952": {
+ "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
+ }
+ },
+ "9b2140d07da744348068f013152b1160": {
+ "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": ""
+ }
+ },
+ "9ba492d205294bc0a8d07985ed271358": {
+ "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
+ }
+ },
+ "9c01417376444eed820394ef843c0be3": {
+ "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
+ }
+ },
+ "9c2ff534109548fc8cab92f3b0aefc71": {
+ "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_e417a487b9ab44d68bf5d4155f4ff339",
+ "IPY_MODEL_ce0bc6a269b841e59b3c1b00796b8605",
+ "IPY_MODEL_b014fb9554fb4f61a8d44135a6ad4954"
+ ],
+ "layout": "IPY_MODEL_c30445a77e81411bbad4f90b8c54bc35"
+ }
+ },
+ "9c741e36450b4c66875df9dc3ba07507": {
+ "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_cd9c9d32567f4e5aa9291f66b08490bf",
+ "IPY_MODEL_c4995db7a62844b4a00daaf55847cabd",
+ "IPY_MODEL_72fc113c125648538df5059fb578ae19"
+ ],
+ "layout": "IPY_MODEL_3943882166bb4470a800d9563f9e53a2"
+ }
+ },
+ "9e0fde0538f84469bd62e9ea9f589b4f": {
+ "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
+ }
+ },
+ "9e5ef9fe15314ce3bf13e61994851485": {
+ "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": ""
+ }
+ },
+ "9ecd3535823549bbbcbf3f131704d3eb": {
+ "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_9af01c4399c74223b5d7f94bd48d6952",
+ "placeholder": "",
+ "style": "IPY_MODEL_aa44d82861804483b44e0f893b698b72",
+ "value": " 634/634 [00:00<00:00, 4.30kB/s]"
+ }
+ },
+ "9ee85e252d32428ea44a91c71cd62a36": {
+ "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": ""
+ }
+ },
+ "9f17b8692b824c0cb9a98cea381699a9": {
+ "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_cdcf280e7a3043c2a1d59e0eea379d96",
+ "max": 524619,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_2e945d3f81204a538874a0a832102d15",
+ "value": 524619
+ }
+ },
+ "a1d133bc8fe344e2aed80fe5155177c3": {
+ "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": ""
+ }
+ },
+ "a25cd36e4deb410f9ee54a92a18c939c": {
+ "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
+ }
+ },
+ "a266a0d0bdde4a3aa09fec6a0a00abed": {
+ "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_bc60bbefdc2a490588dd8f58327fd264",
+ "max": 460,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_3119598ffcab4d6f9d1642ee595736ee",
+ "value": 460
+ }
+ },
+ "a4d93e9fee48468281afac25f551806c": {
+ "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
+ }
+ },
+ "a5971d5b793545a3845fbe1029b557e1": {
+ "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
+ }
+ },
+ "a6b2ca41ffb24b9193a83fd9a4c24a8c": {
+ "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
+ }
+ },
+ "a8dbb00149f148ceaee2474c4304c902": {
+ "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
+ }
+ },
+ "a9ab859e76814985877a4bacdb04e95a": {
+ "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
+ }
+ },
+ "aa44d82861804483b44e0f893b698b72": {
+ "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": ""
+ }
+ },
+ "ab1c2c3e457944acb16508cf7a721290": {
+ "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": ""
+ }
+ },
+ "ac71f4fe6e804f19b2529c82e5a42049": {
+ "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
+ }
+ },
+ "accd8a5f56cf41c5af297f8bf93f7058": {
+ "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_ed9e0cfb4635476f9e31c5b48aeafde8",
+ "max": 75,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_396aee75c5954aa9b634d79c18177977",
+ "value": 75
+ }
+ },
+ "ad07cccdd8d44a9ab5e3458e8d902ac6": {
+ "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
+ }
+ },
+ "aea53b42c35947c58d2c113bd2043078": {
+ "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
+ }
+ },
+ "b014fb9554fb4f61a8d44135a6ad4954": {
+ "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_d612163ad6d24d91a6d7ee758d8d6367",
+ "placeholder": "",
+ "style": "IPY_MODEL_ab1c2c3e457944acb16508cf7a721290",
+ "value": " 75/75 [00:21<00:00, 3.39it/s]"
+ }
+ },
+ "b3ae18d50eb4415b950f98bb38362207": {
+ "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": ""
+ }
+ },
+ "b4209eed23cb45038a5c614bfe8bf3b6": {
+ "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": ""
+ }
+ },
+ "b5a46aec8d594d02b618b9d59e4f4518": {
+ "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
+ }
+ },
+ "b67319578dc84245ad16cb8d25d3173c": {
+ "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
+ }
+ },
+ "b7aa53a4de824d7fbec2a07c1771bc24": {
+ "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_17c87915e01b4d2fa79042759bf1a57d",
+ "IPY_MODEL_bafabfceff6e4f76b900878a4077337e",
+ "IPY_MODEL_5d1c6a49ce6f4596946a2fd91bec3312"
+ ],
+ "layout": "IPY_MODEL_795329002e034ec4aead224cf74ea361"
+ }
+ },
+ "b991b21d18ec471fb18b291a0c10aa6e": {
+ "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": ""
+ }
+ },
+ "b9cf936d26124cad959de16fcf5bea63": {
+ "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
+ }
+ },
+ "ba72519befe047eabb826d1f7ec0e39c": {
+ "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": ""
+ }
+ },
+ "bafabfceff6e4f76b900878a4077337e": {
+ "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_cd437bc3e2194f1a8c5e83ec98745b58",
+ "max": 825,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_18ba1c9da9714f2494c06570e4dc1d64",
+ "value": 825
+ }
+ },
+ "bc60bbefdc2a490588dd8f58327fd264": {
+ "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
+ }
+ },
+ "bc72d593b56c42899ff4779e92bcf818": {
+ "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_cabab037d12a455bbd283477e481d4ca",
+ "IPY_MODEL_7cdde9f1b0f1403ababc0e3e120617c4",
+ "IPY_MODEL_28c075d27bf8437c99b4fa8091d4d2c0"
+ ],
+ "layout": "IPY_MODEL_7c5bcff9ea9344dca52dbaa4a6545b50"
+ }
+ },
+ "bc9783a6d9d0437b881b01cad81c0173": {
+ "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
+ }
+ },
+ "bce74d8ba4dd4a35bd276ba2dbf0ffd1": {
+ "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
+ }
+ },
+ "be0a3bc217b04b2dbd06a90141c0dd35": {
+ "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": ""
+ }
+ },
+ "bfc87d61a154451294fa790fc30075ea": {
+ "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_c8cabf1d8ffe421296725d8494ba0d3b",
+ "IPY_MODEL_28fe7cfc4f4048eca1120a7228dcd629",
+ "IPY_MODEL_9ecd3535823549bbbcbf3f131704d3eb"
+ ],
+ "layout": "IPY_MODEL_03b9fb0d0fa44ac8bf1a6aa678ff82c8"
+ }
+ },
+ "c081010577e7490eae450d69b0458a74": {
+ "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
+ }
+ },
+ "c1dc0d80451c4d098f16eb6ec7eed752": {
+ "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_d4c5db5f7ffe42beb2065e14cbdd755d",
+ "IPY_MODEL_accd8a5f56cf41c5af297f8bf93f7058",
+ "IPY_MODEL_824b0b410fed4ea1b5bc7f88236fc3e8"
+ ],
+ "layout": "IPY_MODEL_a6b2ca41ffb24b9193a83fd9a4c24a8c"
+ }
+ },
+ "c2ccf29c76d1461c8e820cdd1091684a": {
+ "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
+ }
+ },
+ "c30445a77e81411bbad4f90b8c54bc35": {
+ "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
+ }
+ },
+ "c4995db7a62844b4a00daaf55847cabd": {
+ "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_080c7086e8684bb3bb857d23f426d5dd",
+ "max": 221326504,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_37e74a92120d40ab99b8a3efeb397bd8",
+ "value": 221326504
+ }
+ },
+ "c5f787d7f16542baa5a5657c3ecb14a0": {
+ "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
+ }
+ },
+ "c797a3a49d1d44598e8810817eac04f6": {
+ "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": ""
+ }
+ },
+ "c826a36c99ae462abccdc59266c404d3": {
+ "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
+ }
+ },
+ "c87c0b939bbe4e56b46fca4aa580f75a": {
+ "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": ""
+ }
+ },
+ "c883ad6804cd4f628494b1eb7f432e51": {
+ "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
+ }
+ },
+ "c8ba37c669974bbea2face17223d2bb4": {
+ "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
+ }
+ },
+ "c8cabf1d8ffe421296725d8494ba0d3b": {
+ "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_59b6eeeaf9464da891bf214ef1bbb7c2",
+ "placeholder": "",
+ "style": "IPY_MODEL_7d3baaa3ab784895a59534261f43ce7d",
+ "value": "Downloading (…)_encoder/config.json: 100%"
+ }
+ },
+ "c909bafccc65402fa93afea87f1b784e": {
+ "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_91f32130b9fc47ceaae99521c0b70015",
+ "placeholder": "",
+ "style": "IPY_MODEL_e8bec5477f7c43c1a55c852ef8b7cb95",
+ "value": "Downloading (…)ch_model.safetensors: 100%"
+ }
+ },
+ "cabab037d12a455bbd283477e481d4ca": {
+ "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_2b68707a9749479cab4b4ecd124d87cb",
+ "placeholder": "",
+ "style": "IPY_MODEL_e7274e83d2c44080bbbb2fc5ec79dfee",
+ "value": "Downloading (…)ain/model_index.json: 100%"
+ }
+ },
+ "cd437bc3e2194f1a8c5e83ec98745b58": {
+ "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
+ }
+ },
+ "cd9c9d32567f4e5aa9291f66b08490bf": {
+ "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_ad07cccdd8d44a9ab5e3458e8d902ac6",
+ "placeholder": "",
+ "style": "IPY_MODEL_ff88d9a5f7d64ad7bb0f09f6c71543f1",
+ "value": "Downloading (…)ch_model.safetensors: 100%"
+ }
+ },
+ "cdcf280e7a3043c2a1d59e0eea379d96": {
+ "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
+ }
+ },
+ "ce0bc6a269b841e59b3c1b00796b8605": {
+ "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_ac71f4fe6e804f19b2529c82e5a42049",
+ "max": 75,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_518150c24b25401d92cf483e5ecb0253",
+ "value": 75
+ }
+ },
+ "cf11071b7b114118a8b0b659167fa09e": {
+ "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_03bce4ac84fd40d485b023e21fe65c4f",
+ "IPY_MODEL_d0e9965e6aa4483da2dfa546b896e645",
+ "IPY_MODEL_22338ed9cec54338ad33267ed579603a"
+ ],
+ "layout": "IPY_MODEL_622d32a9bbda46fca3ee0733be303765"
+ }
+ },
+ "d011d28093544ae692f90a7380908275": {
+ "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": ""
+ }
+ },
+ "d0716d01bfdf43ba88f8bbfd63d3285a": {
+ "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_a9ab859e76814985877a4bacdb04e95a",
+ "placeholder": "",
+ "style": "IPY_MODEL_1df97f1113c34b7eb89c7d1c6a81b3bd",
+ "value": " 587/587 [00:00<00:00, 12.9kB/s]"
+ }
+ },
+ "d0e9965e6aa4483da2dfa546b896e645": {
+ "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_1237bd63fa814b57bbd9741296d71f46",
+ "max": 75,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_5b3ca63a1af5452cb81fde6020fd9c53",
+ "value": 75
+ }
+ },
+ "d22523983b9a4c71a3057f3a281895ee": {
+ "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
+ }
+ },
+ "d3165abbffbc4da3bd4f0cb6f3437140": {
+ "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
+ }
+ },
+ "d3971f94fa5f433580509a27ce3ad017": {
+ "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": ""
+ }
+ },
+ "d4c5db5f7ffe42beb2065e14cbdd755d": {
+ "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_bc9783a6d9d0437b881b01cad81c0173",
+ "placeholder": "",
+ "style": "IPY_MODEL_9e5ef9fe15314ce3bf13e61994851485",
+ "value": "100%"
+ }
+ },
+ "d612163ad6d24d91a6d7ee758d8d6367": {
+ "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
+ }
+ },
+ "d62c5143fa1544ba9e2d22555dc6c3f9": {
+ "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
+ }
+ },
+ "d74c7ced9e5841e0a3635bf848912874": {
+ "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": ""
+ }
+ },
+ "d801dfb1d399475e995ca9106f9b3a4d": {
+ "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
+ }
+ },
+ "d8b3f3c7b8394b5580d8541f20c090ae": {
+ "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_db833b8a924f43208063cdc7b74220f7",
+ "placeholder": "",
+ "style": "IPY_MODEL_d74c7ced9e5841e0a3635bf848912874",
+ "value": "100%"
+ }
+ },
+ "db833b8a924f43208063cdc7b74220f7": {
+ "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
+ }
+ },
+ "e04b95f508b7431c9f4ee9159e3b5b13": {
+ "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
+ }
+ },
+ "e417a487b9ab44d68bf5d4155f4ff339": {
+ "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_c2ccf29c76d1461c8e820cdd1091684a",
+ "placeholder": "",
+ "style": "IPY_MODEL_42248bb1fb38481eaa292dbca2d68e38",
+ "value": "100%"
+ }
+ },
+ "e6942466051e4a6a97c36b56d8d4e0c2": {
+ "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": ""
+ }
+ },
+ "e71abb2ba1b546ff9d7acd0c174f60d4": {
+ "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": ""
+ }
+ },
+ "e7274e83d2c44080bbbb2fc5ec79dfee": {
+ "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": ""
+ }
+ },
+ "e76b29381c114f808b3454fb122e8d10": {
+ "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
+ }
+ },
+ "e85ceff770654ef1bd935f54ca32ee07": {
+ "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_d801dfb1d399475e995ca9106f9b3a4d",
+ "max": 587,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_ed75698d0ffe4bcf886c72d276bbee17",
+ "value": 587
+ }
+ },
+ "e8bec5477f7c43c1a55c852ef8b7cb95": {
+ "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": ""
+ }
+ },
+ "e926a97d3f6149318dd6f01d17e90dd5": {
+ "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": ""
+ }
+ },
+ "ea062db0a1ad43af805bf2d86d26d369": {
+ "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_b9cf936d26124cad959de16fcf5bea63",
+ "placeholder": "",
+ "style": "IPY_MODEL_b3ae18d50eb4415b950f98bb38362207",
+ "value": "100%"
+ }
+ },
+ "ec0c44e82a814774823e60634d678b0d": {
+ "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
+ }
+ },
+ "ed75698d0ffe4bcf886c72d276bbee17": {
+ "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": ""
+ }
+ },
+ "ed9e0cfb4635476f9e31c5b48aeafde8": {
+ "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
+ }
+ },
+ "ee5e249b357649ab95d493d940bc3b01": {
+ "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": ""
+ }
+ },
+ "efb86ed04a0d477794e70dc92219399b": {
+ "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_10d895cb5166417fa2b4cc0d2feb7b6f",
+ "placeholder": "",
+ "style": "IPY_MODEL_23b55638314c4e2b967f85ab40042a6c",
+ "value": " 1.36G/1.36G [00:25<00:00, 66.5MB/s]"
+ }
+ },
+ "f24b18d71065474a9f169b4fd66898f6": {
+ "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": ""
+ }
+ },
+ "f3c0042a67e34e72b1088b60c11ba2d0": {
+ "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": ""
+ }
+ },
+ "f6579ff0c08648309711a654ec3de748": {
+ "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
+ }
+ },
+ "f78f911cd0ac4cdc8fdcbcb29f1a201b": {
+ "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_90c7965cfde540158d9e7cb049c2d7d3",
+ "placeholder": "",
+ "style": "IPY_MODEL_b991b21d18ec471fb18b291a0c10aa6e",
+ "value": " 460/460 [00:00<00:00, 2.77kB/s]"
+ }
+ },
+ "f874ed5ecd6f4eed976ed24b0be4ae51": {
+ "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": ""
+ }
+ },
+ "f8c3945c2c554cc9b7ea7435525c4ab4": {
+ "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
+ }
+ },
+ "f931614414ba46adaab4c0522e65ebf8": {
+ "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
+ }
+ },
+ "f931d10a75ab4aafb1d6b92a0ba622b3": {
+ "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_5d3f04417ce64f80a2843e74bf6208f7",
+ "placeholder": "",
+ "style": "IPY_MODEL_341fa26d73394e6cb71498a9c95b458c",
+ "value": " 1.06M/1.06M [00:00<00:00, 4.16MB/s]"
+ }
+ },
+ "fb2398f1e5ff43f7a2f81bd51bf58e2a": {
+ "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_53fa5e54123446199d57c27c3ee8b091",
+ "IPY_MODEL_07a431a9456648b6bcbfa899ee0014ac",
+ "IPY_MODEL_2f972961c0eb411ca45b8af05cc05e3b"
+ ],
+ "layout": "IPY_MODEL_6525d3514cee42f3bd14bdf898b63ad2"
+ }
+ },
+ "fc9a8403148c431e8b0200d40c6efcb7": {
+ "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_8b24a6ee676942ddaa27f44902ef2ac5",
+ "IPY_MODEL_5b74c15d312f404e88323771b08b0aeb",
+ "IPY_MODEL_7ad5acf646b44af2a1d8558abbb59199"
+ ],
+ "layout": "IPY_MODEL_d22523983b9a4c71a3057f3a281895ee"
+ }
+ },
+ "fcc7b1147ad94a01ae49b4268e85d310": {
+ "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
+ }
+ },
+ "ff88d9a5f7d64ad7bb0f09f6c71543f1": {
+ "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": ""
+ }
+ }
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/machine-learning/stable-diffusion-upscaler/requirements.txt b/machine-learning/stable-diffusion-upscaler/requirements.txt
new file mode 100644
index 00000000..6feca34e
--- /dev/null
+++ b/machine-learning/stable-diffusion-upscaler/requirements.txt
@@ -0,0 +1,6 @@
+torch
+diffusers
+transformers
+accelerate
+scipy
+safetensors
\ No newline at end of file
diff --git a/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py b/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py
new file mode 100644
index 00000000..06efe53c
--- /dev/null
+++ b/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py
@@ -0,0 +1,303 @@
+# %%
+!pip install -qU diffusers transformers accelerate scipy safetensors
+
+# %% [markdown]
+# # Hugging Face Implementation
+
+# %%
+import requests
+from PIL import Image
+from io import BytesIO
+from diffusers import StableDiffusionUpscalePipeline
+import torch
+
+# %%
+# load model and scheduler
+model_id = "stabilityai/stable-diffusion-x4-upscaler"
+pipeline = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
+pipeline = pipeline.to("cuda")
+
+# %%
+def get_low_res_img(url, shape):
+ response = requests.get(url)
+ low_res_img = Image.open(BytesIO(response.content)).convert("RGB")
+ low_res_img = low_res_img.resize(shape)
+ return low_res_img
+
+# %%
+url = "https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg"
+shape = (200, 128)
+low_res_img = get_low_res_img(url, shape)
+
+low_res_img
+
+# %%
+prompt = "an aesthetic kingfisher"
+upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]
+upscaled_image
+
+# %%
+prompt = "an aesthetic kingfisher, UHD, 4k, hyper realistic, extremely detailed, professional, vibrant, not grainy, smooth"
+upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]
+upscaled_image
+
+# %%
+upscaled_interpolation = low_res_img.resize((800, 512))
+upscaled_interpolation
+
+# %%
+url = "https://cdn.pixabay.com/photo/2022/06/14/20/57/woman-7262808_1280.jpg"
+shape = (200, 128)
+low_res_img = get_low_res_img(url, shape)
+
+low_res_img
+
+# %%
+prompt = "an old lady"
+upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]
+upscaled_image
+
+# %%
+prompt = "an iranian old lady with black hair, brown scarf, rock background"
+upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]
+upscaled_image
+
+# %%
+upscaled_interpolation = low_res_img.resize((800, 512))
+upscaled_interpolation
+
+# %%
+url = "https://cdn.pixabay.com/photo/2017/12/28/07/44/zebra-3044577_1280.jpg"
+shape = (450, 128)
+low_res_img = get_low_res_img(url, shape)
+
+low_res_img
+
+# %%
+prompt = "zebras drinking water"
+upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]
+upscaled_image
+
+# %%
+upscaled_interpolation = low_res_img.resize((1800, 512))
+upscaled_interpolation
+
+# %%
+
+
+# %%
+
+
+# %% [markdown]
+# # Custom
+#
+
+# %%
+from tqdm import tqdm
+from torch import autocast
+
+# %%
+class CustomSDUpscalingPipeline:
+ """custom implementation of the Stable Diffusion Upscaling Pipeline"""
+
+ def __init__(self,
+ vae,
+ tokenizer,
+ text_encoder,
+ unet,
+ low_res_scheduler,
+ scheduler,
+ image_processor):
+
+ self.vae = vae
+ self.tokenizer = tokenizer
+ self.text_encoder = text_encoder
+ self.unet = unet
+ self.low_res_scheduler = low_res_scheduler
+ self.scheduler = scheduler
+ self.image_processor = image_processor
+ self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
+
+
+
+ def get_text_embeds(self, text):
+ """returns embeddings for the given `text`"""
+
+ # tokenize the text
+ text_input = self.tokenizer(text,
+ padding='max_length',
+ max_length=tokenizer.model_max_length,
+ truncation=True,
+ return_tensors='pt')
+ # embed the text
+ with torch.no_grad():
+ text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]
+ return text_embeds
+
+
+
+ def get_prompt_embeds(self, prompt):
+ """returns prompt embeddings based on classifier free guidance"""
+
+ if isinstance(prompt, str):
+ prompt = [prompt]
+ # get conditional prompt embeddings
+ cond_embeds = self.get_text_embeds(prompt)
+ # get unconditional prompt embeddings
+ uncond_embeds = self.get_text_embeds([''] * len(prompt))
+ # concatenate the above 2 embeds for classfier free guidance
+ prompt_embeds = torch.cat([uncond_embeds, cond_embeds])
+ return prompt_embeds
+
+
+ def transform_image(self, image):
+ """convert image from pytorch tensor to PIL format"""
+
+ image = self.image_processor.postprocess(image, output_type='pil')
+ return image
+
+
+
+ def get_initial_latents(self, height, width, num_channels_latents, batch_size):
+ """returns noise latent tensor of relevant shape scaled by the scheduler"""
+
+ image_latents = torch.randn((batch_size, num_channels_latents, height, width)).to(self.device)
+ # scale the initial noise by the standard deviation required by the scheduler
+ image_latents = image_latents * self.scheduler.init_noise_sigma
+ return image_latents
+
+
+
+ def denoise_latents(self,
+ prompt_embeds,
+ image,
+ timesteps,
+ latents,
+ noise_level,
+ guidance_scale):
+ """denoises latents from noisy latent to a meaningful latents"""
+
+ # use autocast for automatic mixed precision (AMP) inference
+ with autocast('cuda'):
+ for i, t in tqdm(enumerate(timesteps)):
+ # duplicate image latents to do classifier free guidance
+ latent_model_input = torch.cat([latents] * 2)
+ latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
+ latent_model_input = torch.cat([latent_model_input, image], dim=1)
+
+ # predict noise residuals
+ with torch.no_grad():
+ noise_pred = self.unet(
+ latent_model_input,
+ t,
+ encoder_hidden_states=prompt_embeds,
+ class_labels=noise_level
+ )['sample']
+
+ # separate predictions for unconditional and conditional outputs
+ noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
+
+ # perform guidance
+ noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
+
+ # remove the noise from the current sample i.e. go from x_t to x_{t-1}
+ latents = self.scheduler.step(noise_pred, t, latents)['prev_sample']
+
+ return latents
+
+
+
+ def __call__(self,
+ prompt,
+ image,
+ num_inference_steps=20,
+ guidance_scale=9.0,
+ noise_level=20):
+ """generates new image based on the `prompt` and the `image`"""
+
+ # encode input prompt
+ prompt_embeds = self.get_prompt_embeds(prompt)
+
+ # preprocess image
+ image = self.image_processor.preprocess(image).to(self.device)
+
+ # prepare timesteps
+ self.scheduler.set_timesteps(num_inference_steps, device=self.device)
+ timesteps = self.scheduler.timesteps
+
+ # add noise to image
+ noise_level = torch.tensor([noise_level], device=self.device)
+ noise = torch.randn(image.shape, device=self.device)
+ image = self.low_res_scheduler.add_noise(image, noise, noise_level)
+
+ # duplicate image for classifier free guidance
+ image = torch.cat([image] * 2)
+ noise_level = torch.cat([noise_level] * image.shape[0])
+
+ # prepare the initial image in the latent space (noise on which we will do reverse diffusion)
+ num_channels_latents = self.vae.config.latent_channels
+ batch_size = prompt_embeds.shape[0] // 2
+ height, width = image.shape[2:]
+ latents = self.get_initial_latents(height, width, num_channels_latents, batch_size)
+
+ # denoise latents
+ latents = self.denoise_latents(prompt_embeds,
+ image,
+ timesteps,
+ latents,
+ noise_level,
+ guidance_scale)
+
+ # decode latents to get the image into pixel space
+ latents = latents.to(torch.float16)
+ image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
+
+ # convert to PIL Image format
+ image = self.transform_image(image.detach()) # detach to remove any computed gradients
+
+ return image
+
+# %%
+# get all the components from the SD Upscaler pipeline
+vae = pipeline.vae
+tokenizer = pipeline.tokenizer
+text_encoder = pipeline.text_encoder
+unet = pipeline.unet
+low_res_scheduler = pipeline.low_res_scheduler
+scheduler = pipeline.scheduler
+image_processor = pipeline.image_processor
+
+custom_pipe = CustomSDUpscalingPipeline(vae, tokenizer, text_encoder, unet, low_res_scheduler, scheduler, image_processor)
+
+# %%
+url = "https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg"
+shape = (200, 128)
+low_res_img = get_low_res_img(url, shape)
+
+low_res_img
+
+# %%
+prompt = "an aesthetic kingfisher"
+upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]
+upscaled_image
+
+# %%
+url = "https://cdn.pixabay.com/photo/2018/07/31/22/08/lion-3576045_1280.jpg"
+shape = (200, 128)
+low_res_img = get_low_res_img(url, shape)
+
+low_res_img
+
+# %%
+prompt = "a professional photograph of a lion's face"
+upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]
+upscaled_image
+
+# %%
+upscaled_interpolation = low_res_img.resize((800, 512))
+upscaled_interpolation
+
+# %%
+
+
+
diff --git a/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3 b/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3
new file mode 100644
index 00000000..45d11628
Binary files /dev/null and b/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3 differ
diff --git a/machine-learning/text-to-speech/README.md b/machine-learning/text-to-speech/README.md
index c9b5b640..4786b024 100644
--- a/machine-learning/text-to-speech/README.md
+++ b/machine-learning/text-to-speech/README.md
@@ -2,3 +2,5 @@
- `pip3 install -r requirements.txt`
- To convert text to speech online using Google API, use `tts_google.py`
- To use offline engines in your platform, consider using `tts_pyttsx3.py`
+- To use the OpenAI API, use `tts_openai.py`
+- To use transformers, use `tts_transformers.py`
diff --git a/machine-learning/text-to-speech/requirements b/machine-learning/text-to-speech/requirements
deleted file mode 100644
index b4362d6e..00000000
--- a/machine-learning/text-to-speech/requirements
+++ /dev/null
@@ -1,3 +0,0 @@
-pyttsx3
-gTTS
-playsound
\ No newline at end of file
diff --git a/machine-learning/text-to-speech/requirements.txt b/machine-learning/text-to-speech/requirements.txt
new file mode 100644
index 00000000..7c4e99dd
--- /dev/null
+++ b/machine-learning/text-to-speech/requirements.txt
@@ -0,0 +1,8 @@
+pyttsx3
+gTTS
+playsound
+soundfile
+transformers
+datasets
+sentencepiece
+openai
\ No newline at end of file
diff --git a/machine-learning/text-to-speech/tts_openai.py b/machine-learning/text-to-speech/tts_openai.py
new file mode 100644
index 00000000..2087fea6
--- /dev/null
+++ b/machine-learning/text-to-speech/tts_openai.py
@@ -0,0 +1,20 @@
+from openai import OpenAI
+
+# initialize the OpenAI API client
+api_key = "YOUR_OPENAI_API_KEY"
+client = OpenAI(api_key=api_key)
+
+# sample text to generate speech from
+text = """In his miracle year, he published four groundbreaking papers.
+These outlined the theory of the photoelectric effect, explained Brownian motion,
+introduced special relativity, and demonstrated mass-energy equivalence."""
+
+# generate speech from the text
+response = client.audio.speech.create(
+ model="tts-1", # the model to use, there is tts-1 and tts-1-hd
+ voice="nova", # the voice to use, there is alloy, echo, fable, onyx, nova, and shimmer
+ input=text, # the text to generate speech from
+ speed=1.0, # the speed of the generated speech, ranging from 0.25 to 4.0
+)
+# save the generated speech to a file
+response.stream_to_file("openai-output.mp3")
\ No newline at end of file
diff --git a/machine-learning/text-to-speech/tts_transformers.py b/machine-learning/text-to-speech/tts_transformers.py
new file mode 100644
index 00000000..8ba6414e
--- /dev/null
+++ b/machine-learning/text-to-speech/tts_transformers.py
@@ -0,0 +1,67 @@
+from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
+from datasets import load_dataset
+import torch
+import random
+import string
+import soundfile as sf
+
+device = "cuda" if torch.cuda.is_available() else "cpu"
+# load the processor
+processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
+# load the model
+model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
+# load the vocoder, that is the voice encoder
+vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
+# we load this dataset to get the speaker embeddings
+embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
+
+# speaker ids from the embeddings dataset
+speakers = {
+ 'awb': 0, # Scottish male
+ 'bdl': 1138, # US male
+ 'clb': 2271, # US female
+ 'jmk': 3403, # Canadian male
+ 'ksp': 4535, # Indian male
+ 'rms': 5667, # US male
+ 'slt': 6799 # US female
+}
+
+def save_text_to_speech(text, speaker=None):
+ # preprocess text
+ inputs = processor(text=text, return_tensors="pt").to(device)
+ if speaker is not None:
+ # load xvector containing speaker's voice characteristics from a dataset
+ speaker_embeddings = torch.tensor(embeddings_dataset[speaker]["xvector"]).unsqueeze(0).to(device)
+ else:
+ # random vector, meaning a random voice
+ speaker_embeddings = torch.randn((1, 512)).to(device)
+ # generate speech with the models
+ speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
+ if speaker is not None:
+ # if we have a speaker, we use the speaker's ID in the filename
+ output_filename = f"{speaker}-{'-'.join(text.split()[:6])}.mp3"
+ else:
+ # if we don't have a speaker, we use a random string in the filename
+ random_str = ''.join(random.sample(string.ascii_letters+string.digits, k=5))
+ output_filename = f"{random_str}-{'-'.join(text.split()[:6])}.mp3"
+ # save the generated speech to a file with 16KHz sampling rate
+ sf.write(output_filename, speech.cpu().numpy(), samplerate=16000)
+ # return the filename for reference
+ return output_filename
+
+# generate speech with a US female voice
+save_text_to_speech("Python is my favorite programming language", speaker=speakers["slt"])
+# generate speech with a random voice
+save_text_to_speech("Python is my favorite programming language")
+
+# a challenging text with all speakers
+text = """In his miracle year, he published four groundbreaking papers.
+These outlined the theory of the photoelectric effect, explained Brownian motion,
+introduced special relativity, and demonstrated mass-energy equivalence."""
+
+for speaker_name, speaker in speakers.items():
+ output_filename = save_text_to_speech(text, speaker)
+ print(f"Saved {output_filename}")
+# random speaker
+output_filename = save_text_to_speech(text)
+print(f"Saved {output_filename}")
\ No newline at end of file
diff --git a/machine-learning/visual-question-answering/000000007226.jpg b/machine-learning/visual-question-answering/000000007226.jpg
new file mode 100644
index 00000000..56932377
Binary files /dev/null and b/machine-learning/visual-question-answering/000000007226.jpg differ
diff --git a/machine-learning/visual-question-answering/README.md b/machine-learning/visual-question-answering/README.md
new file mode 100644
index 00000000..a88ef88c
--- /dev/null
+++ b/machine-learning/visual-question-answering/README.md
@@ -0,0 +1 @@
+# [Visual Question Answering with Transformers](https://www.thepythoncode.com/article/visual-question-answering-with-transformers-in-python)
\ No newline at end of file
diff --git a/machine-learning/visual-question-answering/Running_BLIP2.ipynb b/machine-learning/visual-question-answering/Running_BLIP2.ipynb
new file mode 100644
index 00000000..5b880995
--- /dev/null
+++ b/machine-learning/visual-question-answering/Running_BLIP2.ipynb
@@ -0,0 +1,912 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "2d87ad23-587a-4b20-8121-1d1748ac301a",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Collecting transformers\n",
+ " Downloading transformers-4.30.2-py3-none-any.whl (7.2 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.2/7.2 MB\u001b[0m \u001b[31m50.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
+ "\u001b[?25hCollecting accelerate\n",
+ " Downloading accelerate-0.20.3-py3-none-any.whl (227 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m227.6/227.6 kB\u001b[0m \u001b[31m47.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.9.0)\n",
+ "Collecting huggingface-hub<1.0,>=0.14.1 (from transformers)\n",
+ " Downloading huggingface_hub-0.15.1-py3-none-any.whl (236 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m236.8/236.8 kB\u001b[0m \u001b[31m59.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.24.1)\n",
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.1)\n",
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0)\n",
+ "Collecting regex!=2019.12.17 (from transformers)\n",
+ " Downloading regex-2023.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (770 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m770.4/770.4 kB\u001b[0m \u001b[31m50.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.28.1)\n",
+ "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers)\n",
+ " Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m99.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n",
+ "\u001b[?25hCollecting safetensors>=0.3.1 (from transformers)\n",
+ " Downloading safetensors-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m111.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting tqdm>=4.27 (from transformers)\n",
+ " Downloading tqdm-4.65.0-py3-none-any.whl (77 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.1/77.1 kB\u001b[0m \u001b[31m18.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hRequirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n",
+ "Requirement already satisfied: torch>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.0.1+cu117)\n",
+ "Collecting fsspec (from huggingface-hub<1.0,>=0.14.1->transformers)\n",
+ " Downloading fsspec-2023.6.0-py3-none-any.whl (163 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m163.8/163.8 kB\u001b[0m \u001b[31m39.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hRequirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.4.0)\n",
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (1.11.1)\n",
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.0)\n",
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1.2)\n",
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (2.0.0)\n",
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (3.25.0)\n",
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (15.0.7)\n",
+ "Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.1.1)\n",
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n",
+ "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (1.26.13)\n",
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2022.12.7)\n",
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.6.0->accelerate) (2.1.2)\n",
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.6.0->accelerate) (1.2.1)\n",
+ "Installing collected packages: tokenizers, safetensors, tqdm, regex, fsspec, huggingface-hub, transformers, accelerate\n",
+ "Successfully installed accelerate-0.20.3 fsspec-2023.6.0 huggingface-hub-0.15.1 regex-2023.6.3 safetensors-0.3.1 tokenizers-0.13.3 tqdm-4.65.0 transformers-4.30.2\n",
+ "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
+ "\u001b[0m"
+ ]
+ }
+ ],
+ "source": [
+ "!pip install transformers accelerate"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "52e4776c-8820-4ee6-9ae4-9db51e2ed365",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "device(type='cuda', index=0)"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import requests\n",
+ "from PIL import Image\n",
+ "from transformers import Blip2Processor, Blip2ForConditionalGeneration\n",
+ "import torch\n",
+ "import os\n",
+ "\n",
+ "device = torch.device(\"cuda\", 0)\n",
+ "device"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "e4ad6102-160e-487d-99c0-da50a52a5e4e",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "6b01bf8e2d2a4680ba09d412a2a0286d",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)rocessor_config.json: 0%| | 0.00/432 [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "d927a13d206a467388e7afbd449b7238",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)okenizer_config.json: 0%| | 0.00/904 [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "9567eaeb793c4ab1875049fc2e0c2375",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)olve/main/vocab.json: 0%| | 0.00/798k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "047288537e9d4f989e238c1e7789767a",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)olve/main/merges.txt: 0%| | 0.00/456k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "8b31492abb98403c96b92a2a06ddd709",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)/main/tokenizer.json: 0%| | 0.00/2.11M [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "2f17a1a3b4fd4059beefd3abb3b53184",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)cial_tokens_map.json: 0%| | 0.00/548 [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "62da54d46d4546a28df4e43f3ec1696b",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)lve/main/config.json: 0%| | 0.00/6.96k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "07e7b68353da4f1ea57a5563b6aaa5f7",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)model.bin.index.json: 0%| | 0.00/122k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "db9254ad28eb424088dae1d4639ca28b",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading shards: 0%| | 0/2 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "3466cdec205f459f8c4aacf2b0d5fb3f",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)l-00001-of-00002.bin: 0%| | 0.00/10.0G [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "00ee3c753f444d93b07969cadb5a8d99",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Downloading (…)l-00002-of-00002.bin: 0%| | 0.00/5.50G [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "4a411c6523fc49c492374747307eee1f",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Loading checkpoint shards: 0%| | 0/2 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "processor = Blip2Processor.from_pretrained(\"Salesforce/blip2-opt-2.7b\")\n",
+ "model = Blip2ForConditionalGeneration.from_pretrained(\"Salesforce/blip2-opt-2.7b\", torch_dtype=torch.float16)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "2d87ea9b-a43c-4585-965c-03b3919cceaf",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Blip2ForConditionalGeneration(\n",
+ " (vision_model): Blip2VisionModel(\n",
+ " (embeddings): Blip2VisionEmbeddings(\n",
+ " (patch_embedding): Conv2d(3, 1408, kernel_size=(14, 14), stride=(14, 14))\n",
+ " )\n",
+ " (encoder): Blip2Encoder(\n",
+ " (layers): ModuleList(\n",
+ " (0-38): 39 x Blip2EncoderLayer(\n",
+ " (self_attn): Blip2Attention(\n",
+ " (dropout): Dropout(p=0.0, inplace=False)\n",
+ " (qkv): Linear(in_features=1408, out_features=4224, bias=True)\n",
+ " (projection): Linear(in_features=1408, out_features=1408, bias=True)\n",
+ " )\n",
+ " (layer_norm1): LayerNorm((1408,), eps=1e-05, elementwise_affine=True)\n",
+ " (mlp): Blip2MLP(\n",
+ " (activation_fn): GELUActivation()\n",
+ " (fc1): Linear(in_features=1408, out_features=6144, bias=True)\n",
+ " (fc2): Linear(in_features=6144, out_features=1408, bias=True)\n",
+ " )\n",
+ " (layer_norm2): LayerNorm((1408,), eps=1e-05, elementwise_affine=True)\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " (post_layernorm): LayerNorm((1408,), eps=1e-05, elementwise_affine=True)\n",
+ " )\n",
+ " (qformer): Blip2QFormerModel(\n",
+ " (layernorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " (encoder): Blip2QFormerEncoder(\n",
+ " (layer): ModuleList(\n",
+ " (0): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (1): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (2): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (3): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (4): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (5): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (6): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (7): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (8): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (9): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (10): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (crossattention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=1408, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (11): Blip2QFormerLayer(\n",
+ " (attention): Blip2QFormerAttention(\n",
+ " (attention): Blip2QFormerMultiHeadAttention(\n",
+ " (query): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (key): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (value): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): Blip2QFormerSelfOutput(\n",
+ " (dense): Linear(in_features=768, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate_query): Blip2QFormerIntermediate(\n",
+ " (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output_query): Blip2QFormerOutput(\n",
+ " (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
+ " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " (language_projection): Linear(in_features=768, out_features=2560, bias=True)\n",
+ " (language_model): OPTForCausalLM(\n",
+ " (model): OPTModel(\n",
+ " (decoder): OPTDecoder(\n",
+ " (embed_tokens): Embedding(50272, 2560, padding_idx=1)\n",
+ " (embed_positions): OPTLearnedPositionalEmbedding(2050, 2560)\n",
+ " (final_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)\n",
+ " (layers): ModuleList(\n",
+ " (0-31): 32 x OPTDecoderLayer(\n",
+ " (self_attn): OPTAttention(\n",
+ " (k_proj): Linear(in_features=2560, out_features=2560, bias=True)\n",
+ " (v_proj): Linear(in_features=2560, out_features=2560, bias=True)\n",
+ " (q_proj): Linear(in_features=2560, out_features=2560, bias=True)\n",
+ " (out_proj): Linear(in_features=2560, out_features=2560, bias=True)\n",
+ " )\n",
+ " (activation_fn): ReLU()\n",
+ " (self_attn_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)\n",
+ " (fc1): Linear(in_features=2560, out_features=10240, bias=True)\n",
+ " (fc2): Linear(in_features=10240, out_features=2560, bias=True)\n",
+ " (final_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " (lm_head): Linear(in_features=2560, out_features=50272, bias=False)\n",
+ " )\n",
+ ")"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "model.to(device)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "458a2709-b904-49af-8f10-41905e1cfdc8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import urllib.parse as parse\n",
+ "import os\n",
+ "\n",
+ "# a function to determine whether a string is a URL or not\n",
+ "def is_url(https://github.com/string):\n",
+ " try:\n",
+ " result = parse.urlparse(string)\n",
+ " return all([result.scheme, result.netloc, result.path])\n",
+ " except:\n",
+ " return False\n",
+ " \n",
+ "# a function to load an image\n",
+ "def load_image(image_path):\n",
+ " if is_url(https://github.com/image_path):\n",
+ " return Image.open(requests.get(image_path, stream=True).raw)\n",
+ " elif os.path.exists(image_path):\n",
+ " return Image.open(image_path)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "af353956-7f42-43b3-bd5a-c720078e8a65",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "raw_image = load_image(\"http://images.cocodataset.org/test-stuff2017/000000007226.jpg/")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "id": "bce7e019-d042-4f3d-9fc0-32617257f03c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "question = \"a\"\n",
+ "inputs = processor(raw_image, question, return_tensors=\"pt\").to(device, dtype=torch.float16)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "id": "8d989e92-71ed-438d-9150-31589ba00fb1",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " vintage car driving down a street\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "out = model.generate(**inputs)\n",
+ "print(processor.decode(out[0], skip_special_tokens=True))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "id": "d27e36e1-14bc-4535-9397-d716458594ea",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "question = \"a vintage car driving down a street\"\n",
+ "inputs = processor(raw_image, question, return_tensors=\"pt\").to(device, dtype=torch.float16)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "id": "ebeea2b5-7b4d-4ef4-a2dc-c06876897361",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " with a man in the back seat\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "out = model.generate(**inputs)\n",
+ "print(processor.decode(out[0], skip_special_tokens=True))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "id": "b095054a-f62e-4b2e-b3af-6a5d69dae581",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "question = \"Question: What is the estimated year of these cars? Answer:\"\n",
+ "inputs = processor(raw_image, question, return_tensors=\"pt\").to(device, dtype=torch.float16)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "id": "ebd05f34-0d2e-46bd-a742-aca57138fb54",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The cars are from the early 1900's\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "out = model.generate(**inputs)\n",
+ "print(processor.decode(out[0], skip_special_tokens=True))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 87,
+ "id": "7f16721e-cc71-4c5f-b352-920381177b06",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "question = \"Question: What is the color of the car? Answer:\"\n",
+ "inputs = processor(raw_image, question, return_tensors=\"pt\").to(device, dtype=torch.float16)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 88,
+ "id": "4e49e1aa-6260-49a6-a7ed-67e356591948",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Green\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "out = model.generate(**inputs)\n",
+ "print(processor.decode(out[0], skip_special_tokens=True))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "373c0776-1c53-467a-b9c4-afdc71702ef2",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "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.10.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/machine-learning/visual-question-answering/VisualQuestionAnswering_PythonCodeTutorial.ipynb b/machine-learning/visual-question-answering/VisualQuestionAnswering_PythonCodeTutorial.ipynb
new file mode 100644
index 00000000..0c03acfb
--- /dev/null
+++ b/machine-learning/visual-question-answering/VisualQuestionAnswering_PythonCodeTutorial.ipynb
@@ -0,0 +1,6304 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "x6rzruZmaotA",
+ "outputId": "55c2cae1-5a4d-4cb5-f3d1-863ac0e98f86"
+ },
+ "outputs": [],
+ "source": [
+ "!pip install -qU transformers"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "HBn28oF_bApo"
+ },
+ "source": [
+ "# BLIP\n",
+ "\n"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "s_eFLXZ-bGtT"
+ },
+ "source": [
+ "- https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py\n",
+ "- https://huggingface.co/Salesforce/blip-vqa-base/tree/main"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "8PfNcIxYa8kz"
+ },
+ "outputs": [],
+ "source": [
+ "import requests\n",
+ "from PIL import Image\n",
+ "from transformers import BlipProcessor, BlipForQuestionAnswering\n",
+ "import torch"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "BXLVku3Jcjrm"
+ },
+ "outputs": [],
+ "source": [
+ "# load the image we will test BLIP on\n",
+ "img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'\n",
+ "image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')\n",
+ "image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 241,
+ "referenced_widgets": [
+ "4f70b3f18d12429cb3f6a8921a168c00",
+ "f74bcd4d2ab04c6cb3220c2fc64257b1",
+ "76a37f30e9004067b8ba520191d64ac0",
+ "f9d5339a3d464d18846f943017f90257",
+ "5bd2087051324e1db5ca06eb9c098d19",
+ "494a7d5322c84f08b713936633c10d8a",
+ "366f53d87c6c4b0aa6fd3d167f01c5c3",
+ "af0a3bf66e8e433db1bea3b41a0c052a",
+ "9075203ea622474883993bb09cb2636c",
+ "e0a6fa485edb419da6b4c33e6d45cd9f",
+ "946e33fee00f4c2aac6406ffe83c419c",
+ "8b64a23dfc724928a5d23c904dc1595f",
+ "0324f20083ee42268aac2e7dce294907",
+ "228cbb4147cb4fcdb21866278e8f218c",
+ "88243d6adfd04c9faa5732bafc1ae615",
+ "dad6452f3a87437fbf6b691f56614711",
+ "1a27d88a39e64a09bd7007e066be7caf",
+ "2c1891a4c26042c08956982391039dfe",
+ "92d4a3333635430a88cdc38ed8158f49",
+ "f0bf68a25bf7446282f00c22d1093208",
+ "4289a56219ec41acaafdb60d3b7d1360",
+ "8005f31a31ed48d8b1a3e912b3aed139",
+ "ff519a1b9a504a13899a49385b6b9564",
+ "72e9c18021664b9f812916541fc51c7a",
+ "4e9c85779ed3400a8d8b3f14f08770b6",
+ "b11a5cb28f474ba9bd6dc98f5772fcda",
+ "430fa54d746a4743bc162b8e835a093c",
+ "1d4dd1aae7c7452298706a60c84f901d",
+ "e6998fe4f2aa4ef595e9b30b794c5549",
+ "f83d235f098a428d9f6519bba64a385f",
+ "945160da858a439d90de50ffd671396a",
+ "c697ecf18cad4be6990af0899da9503c",
+ "64f4db4f35324cab9abab95c86307a89",
+ "51838f3af71a4535afed388649e691fe",
+ "acf34873eae8493fbf953b1a8a65e177",
+ "872540ef74d6459a99e4647d2a643176",
+ "bed467f249ca47ea8b3ea57cc365dd22",
+ "a5a8f2b461064eecad9cefa57eb89423",
+ "602461cd7b5c471394ee2920b067a8f6",
+ "c163abebb6434568ac10621f99dee880",
+ "4dd5e64fe44c495d8d8d912f0ac06b82",
+ "3b88701571a342b0abea71a105fed88b",
+ "54dc179584c241dea17f59f2b9e93f47",
+ "8a7d1c368a9548d0aecb6564d7aa1bb7",
+ "a97a2a99008f4ac6be1d6377d04504fa",
+ "b217d9ea08a14ff49d274fc2aea760f8",
+ "d500132d4c434179975a124e00c4cec3",
+ "312d2d503a0f47278b47c03ddef6109f",
+ "1edf085b64f24088bd70a6a6954c8156",
+ "3bee2b1a38cc4f68a614ac2460b45f37",
+ "400bbbc0ce6e42ad9f0916a428aeff83",
+ "3bc21fd430c3426283585a874ec1ce94",
+ "37dc882c932347788e668b941222f7a2",
+ "6aedd062950c4596b734f7a98a9cce9c",
+ "5a9aba83d9734e01902c5b9bcb534ac4",
+ "14c199d355824bcfb14460c8e786aa93",
+ "18dcfde5f4c042a08b76acca0e1a6db8",
+ "e9e7c07fa5544978840f4b5c24372ff0",
+ "27635f5481f1430f9e7ec0404f5c393b",
+ "b3c518bde5bc4a5bb2c2f6528d361cc0",
+ "20e7de8cc9e34728871e040e7fe9d80d",
+ "fb7358b3d7c84e058b333694d793ef98",
+ "2a334258549d49c7ab12ae3f07f69ea9",
+ "63994cb769ce402194b4a70ea1079a3d",
+ "8c5762e71db644cfac50336e5de12ec6",
+ "2c5f5b6d6ca04df4b2fc874fdf0ca83c",
+ "ce764110e55b47469fcd0e929808d801",
+ "0c59eab53a8649cf88ed55d135981e1a",
+ "6bfee089c2c6462daf9ccd9baae21cc3",
+ "5af7e60d5fe142f6a2fb59b92c19715b",
+ "06d45a612716458e84cff4dadacde353",
+ "9d9e48cd4d5f4a0c97d7f13d6e727c09",
+ "8f1974332d694edd968fe5bb9ecba070",
+ "1a5e688c08c747eaaf5ca99b9812eec1",
+ "89e75ba649f948e0aa1d458b9800b480",
+ "10bcc231a8ba4b809be9c7c6b95b5b53",
+ "a5506cc4b437400cbfff631c20110891"
+ ]
+ },
+ "id": "MJZHoYa6a8nJ",
+ "outputId": "020751ef-b433-468b-8c8a-a5ea1c9a83d6"
+ },
+ "outputs": [],
+ "source": [
+ "# load necessary components: the processor and the model\n",
+ "processor = BlipProcessor.from_pretrained(\"Salesforce/blip-vqa-base\")\n",
+ "model = BlipForQuestionAnswering.from_pretrained(\"Salesforce/blip-vqa-base\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "aEYmYsrCeB8m"
+ },
+ "outputs": [],
+ "source": [
+ "def get_answer_blip(model, processor, image, question):\n",
+ " \"\"\"Answers the given question and handles all the preprocessing and postprocessing steps\"\"\"\n",
+ " # preprocess the given image and question\n",
+ " inputs = processor(image, question, return_tensors=\"pt\")\n",
+ " # generate the answer (get output)\n",
+ " out = model.generate(**inputs)\n",
+ " # post-process the output to get human friendly english text\n",
+ " print(processor.decode(out[0], skip_special_tokens=True))\n",
+ " return"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "JVB65c-ra8rs",
+ "outputId": "5d1c01ef-6c53-42a9-eba9-82a687791d7e"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 1\n",
+ "question = \"how many dogs are in the picture?\"\n",
+ "get_answer_blip(model, processor, image, question)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "yE36DMXxa8yl",
+ "outputId": "88d2e84a-079a-4c8a-877c-4405f9d11757"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 2\n",
+ "question = \"how will you describe the picture?\"\n",
+ "get_answer_blip(model, processor, image, question)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "c2HiOLFLa809",
+ "outputId": "ff60422e-4741-40c8-c486-ad405aceb52a"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 3\n",
+ "question = \"where are they?\"\n",
+ "get_answer_blip(model, processor, image, question)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "dreS75cKrHeT",
+ "outputId": "11d4e51a-7821-48e5-cd94-005a8a39140b"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 4\n",
+ "question = \"What are they doing?\"\n",
+ "get_answer_blip(model, processor, image, question)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Mu7OZMR1rR7Z",
+ "outputId": "70528cb7-e2ff-4a4a-db1b-f941d6745bb5"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 5\n",
+ "question = \"What the dog is wearing?\"\n",
+ "get_answer_blip(model, processor, image, question)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "8bBwZxCXa83E"
+ },
+ "outputs": [],
+ "source": [
+ "class BLIP_VQA:\n",
+ " \"\"\"Custom implementation of the BLIP model. The code has been adapted from the official transformers implementation\"\"\"\n",
+ "\n",
+ " def __init__(self, vision_model, text_encoder, text_decoder, processor):\n",
+ " \"\"\"Initialize various objects\"\"\"\n",
+ " self.vision_model = vision_model\n",
+ " self.text_encoder = text_encoder\n",
+ " self.text_decoder = text_decoder\n",
+ " self.processor = processor\n",
+ "\n",
+ " def preprocess(self, img, ques):\n",
+ " \"\"\"preprocess the inputs: image, question\"\"\"\n",
+ " # preprocess using the processor\n",
+ " inputs = self.processor(img, ques, return_tensors='pt')\n",
+ " # store the pixel values of the image, input IDs (i.e., token IDs) of the question and the attention masks separately\n",
+ " pixel_values = inputs['pixel_values']\n",
+ " input_ids = inputs['input_ids']\n",
+ " attention_mask = inputs['attention_mask']\n",
+ "\n",
+ " return pixel_values, input_ids, attention_mask\n",
+ "\n",
+ "\n",
+ " def generate_output(self, pixel_values, input_ids, attention_mask):\n",
+ " \"\"\"Generates output from the preprocessed input\"\"\"\n",
+ "\n",
+ " # get the vision outputs (i.e., the image embeds)\n",
+ " vision_outputs = self.vision_model(pixel_values=pixel_values)\n",
+ " img_embeds = vision_outputs[0]\n",
+ "\n",
+ " # create attention mask with 1s on all the image embedding positions\n",
+ " img_attention_mask = torch.ones(img_embeds.size()[: -1], dtype=torch.long)\n",
+ "\n",
+ " # encode the questions\n",
+ " question_outputs = self.text_encoder(input_ids=input_ids,\n",
+ " attention_mask=attention_mask,\n",
+ " encoder_hidden_states=img_embeds,\n",
+ " encoder_attention_mask=img_attention_mask,\n",
+ " return_dict=False)\n",
+ "\n",
+ " # create attention mask with 1s on all the question token IDs positions\n",
+ " question_embeds = question_outputs[0]\n",
+ " question_attention_mask = torch.ones(question_embeds.size()[:-1], dtype=torch.long)\n",
+ "\n",
+ " # initialize the answers with the beginning-of-sentence IDs (bos ID)\n",
+ " bos_ids = torch.full((question_embeds.size(0), 1), fill_value=30522)\n",
+ "\n",
+ " # get output from the decoder. These outputs are the generated IDs\n",
+ " outputs = self.text_decoder.generate(\n",
+ " input_ids=bos_ids,\n",
+ " eos_token_id=102,\n",
+ " pad_token_id=0,\n",
+ " encoder_hidden_states=question_embeds,\n",
+ " encoder_attention_mask=question_attention_mask)\n",
+ "\n",
+ " return outputs\n",
+ "\n",
+ "\n",
+ " def postprocess(self, outputs):\n",
+ " \"\"\"post-process the output generated by the text-decoder\"\"\"\n",
+ "\n",
+ " return self.processor.decode(outputs[0], skip_special_tokens=True)\n",
+ "\n",
+ "\n",
+ " def get_answer(self, image, ques):\n",
+ " \"\"\"Returns human friendly answer to a question\"\"\"\n",
+ "\n",
+ " # preprocess\n",
+ " pixel_values, input_ids, attention_mask = self.preprocess(image, ques)\n",
+ " # generate output\n",
+ " outputs = self.generate_output(pixel_values, input_ids, attention_mask)\n",
+ " # post-process\n",
+ " answer = self.postprocess(outputs)\n",
+ " return answer"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "WBxppK89bhZP"
+ },
+ "outputs": [],
+ "source": [
+ "blip_vqa = BLIP_VQA(vision_model=model.vision_model,\n",
+ " text_encoder=model.text_encoder,\n",
+ " text_decoder=model.text_decoder,\n",
+ " processor=processor)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "YyASdKlAbhbm",
+ "outputId": "060fd21d-2042-418e-88de-e87f4561671d"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 1\n",
+ "ques = \"how will you describe the picture?\"\n",
+ "print(blip_vqa.get_answer(image, ques))\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 217
+ },
+ "id": "BOErJNo1tG6-",
+ "outputId": "25b06783-738f-476e-b952-4d8e38e5aa7c"
+ },
+ "outputs": [],
+ "source": [
+ "# load another image to test BLIP\n",
+ "img_url = \"https://fastly.picsum.photos/id/11/200/200.jpg?hmac=LBGO0uEpEmAVS8NeUXMqxcIdHGIcu0JiOb5DJr4mtUI\"\n",
+ "image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')\n",
+ "image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "6c4X6eI4tG9N",
+ "outputId": "1c7c03d6-28c6-4cc3-9b30-4406410f5492"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 1\n",
+ "ques = \"Describe the picture\"\n",
+ "print(blip_vqa.get_answer(image, ques))\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "5fpA0TbVtHAq",
+ "outputId": "47ea2820-9ea0-4bf4-b9b7-45941b32ffbb"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 2\n",
+ "ques = \"What is the major color present?\"\n",
+ "print(blip_vqa.get_answer(image, ques))\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "5dEIccqnr-uF",
+ "outputId": "7816af8c-83f6-4fe8-e968-365ec732bd92"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 3\n",
+ "ques = \"How's the weather?\"\n",
+ "print(blip_vqa.get_answer(image, ques))"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "73gvmX-Tbk-s"
+ },
+ "source": [
+ "# GIT"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "7EwQAOq-cLH-"
+ },
+ "source": [
+ "- https://github.com/huggingface/transformers/blob/main/src/transformers/models/git/modeling_git.py\n",
+ "- https://huggingface.co/microsoft/git-base-textvqa"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "c4Lf7_G5bhju"
+ },
+ "outputs": [],
+ "source": [
+ "!pip install -qU transformers"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "qY1xeL1oa86Y"
+ },
+ "outputs": [],
+ "source": [
+ "from transformers import AutoProcessor, AutoModelForCausalLM\n",
+ "from huggingface_hub import hf_hub_download\n",
+ "from PIL import Image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 593,
+ "referenced_widgets": [
+ "7a2e3aab0a244cf099002a6064b5ce42",
+ "f58b27200af24c2eb76751b0bff84928",
+ "484c18d0f13148efa47e68dca92cfb48",
+ "60e84d9d72e94db9840aa03c7f15e3c3",
+ "65c7d970eca34f99a47528163a57b246",
+ "edaae38c2fe84bbd830d2cfcd793e2f5",
+ "1338c7844ec64171b0b6f50c6c2740ea",
+ "b2298da115e446eb8b129cf635bad729",
+ "3b8edfee45ef459c8ae1fc8c9ac7cbc9",
+ "20ec2d7af5444323acf5344e4f45a75e",
+ "e5264a161eff4d6484cbefc7ac38c20d"
+ ]
+ },
+ "id": "AgLuCbEyboLn",
+ "outputId": "5c14f355-95aa-4eaa-d3e4-524ff497a27c"
+ },
+ "outputs": [],
+ "source": [
+ "# load the image we will test GIT on\n",
+ "file_path = hf_hub_download(repo_id=\"nielsr/textvqa-sample\", filename=\"bus.png\", repo_type=\"dataset\")\n",
+ "image = Image.open(file_path).convert(\"RGB\")\n",
+ "image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 273,
+ "referenced_widgets": [
+ "c3bfbf522f884eb489410593b6b63abc",
+ "e95fea587b2a4f47a7b8b492db3e1ffc",
+ "b0dba09b02f142c485ce94ba887132b5",
+ "3dedecb37fdb44ceb07c6d1712c4e021",
+ "039c791cb44e42e29fce22b17e6aaeb2",
+ "e11444c22fa24360a293d4e6dad4ef3a",
+ "a4ae31365e3c4370bc2f7e7ce7fe27f9",
+ "65c79edaf8f844979f6d2cfdbded70e8",
+ "cc2dc3160f074fd8a457dcde77cfbc2b",
+ "5c0d9f5a3aa0473b9058fc33f28a9971",
+ "bedf96c9d0c94e7f9f723e4cec98ae8a",
+ "0754fa2f914f4c24a856e321a21319f5",
+ "4bd11779af5243f38a87aee67edeef37",
+ "2b1ac03b7948452faa1282e9f41b8069",
+ "e837565f047041b1b4fe58abe20b4860",
+ "35d468050abe416dbfe791ddf607ee6f",
+ "3b40e3e3b6a94c3a8f5c94d328c7ff8e",
+ "4c9915c0e224462c8381803ca2e404d3",
+ "ce9b5e9018ff4acfb9f59fcb04bdea22",
+ "b6bd97ac6f79431596f1d2e76cf80cc1",
+ "30c8f5bab4ac4beab39c0a282e6a3183",
+ "fa8c6a48412a46ed905d105a2cc4f073",
+ "da2eb9afc6214b7dbdb99bd38a05fedd",
+ "dd77bd4c656748869c4bd34f1ae74508",
+ "0fdfc064f7ac43e29f207cf8c01ebea4",
+ "b132e46fada74341aa52482f1b5f4240",
+ "9f16f63600454da5afdef84ef5afd59d",
+ "3a18c950c8da4cc2b7f3f79a9b91dea2",
+ "dbb37d88052b40f5aeeb1fbf2ab01be4",
+ "1f4f0aecfdfa423a8d219a7a9167b74c",
+ "70dc32700a9a4f268177a83cc2bdb29c",
+ "4c1a2f85fe2744fbbada089a46ac7f20",
+ "f9b7adc37082413f93053106e60eab4d",
+ "7fe5d5638c0c424e94cc8733fd79f5ab",
+ "dfa636e1fb524cf2ae3d6693fd128084",
+ "c4f1648bca844b0ba790a5990ae2170c",
+ "592bbbcf2fd14ed882f9a0adb56a57a3",
+ "8f363594b80e487494d0855f9ddde030",
+ "1dabddf490454df48032d8c05080fe95",
+ "878c5cc4315443018704910dcf37f154",
+ "8cc8a9d55c2546bcaabead9c8dc2ed09",
+ "ff3175e110e94476bf7ed17ef19a0077",
+ "96332b8765b3472c9f6a43626e8a5bb3",
+ "13935b9459d34cb28418ceffe17f8d85",
+ "cee5e9c5e2604a898fc3bd9fae8b260e",
+ "492d702c82564ce5ae62e4989905f176",
+ "fb47f6098ea54e828931f1082eddcfc6",
+ "5a2729d7ebe54449aaedcb658795e19f",
+ "3afb14ab061c459b9276116e0a6c9416",
+ "17af87063b1e4888b8dd22dd325e039f",
+ "fbe842d741e84880ac53241d2d39a566",
+ "20052640edfa418fb52d9a6ed8d5e7c5",
+ "e995f343b325494d9f315d27ab25ede9",
+ "05a15576ce6b4595a228045a2c43a598",
+ "23ac198dda5d4390b1e0998e2553d04c",
+ "5f53f8958f6744329c885898656f0c93",
+ "4f78f4c67c524e1dbf18615cd98fc1e4",
+ "2e904bced0c945498efee80e62acbe22",
+ "5f98a87208c048a199395d58e986799f",
+ "522a01b9856f477b89ce65ee75edea28",
+ "3064bb59f3144fc6a373b1528290b57a",
+ "4b79f47e2713436c91422a7e8db2729d",
+ "7dc9b79e3ad74651ae3f6449a8b968f7",
+ "b68190a10e0b48678a9937693a2e0875",
+ "d2ac867676604aa8a10267219e3c6362",
+ "3af451b24c8a47c99941a0d3676db363",
+ "8a6fad1603b6410eba545e462adb3096",
+ "30944ee9722c4e4da3b23a635a2e561f",
+ "b654f414cfe04f9a9777b076349199f6",
+ "bcb584c47d2e430f8d0ff7db81619909",
+ "9d049ae4478447afb76756aa2eefab5a",
+ "c7af806e9fcf44dfa483f9aee21ab0ef",
+ "743663756db94768a1a82d5bccac5538",
+ "3080191d2d754416988b90ece2f76cb5",
+ "d02a3297387b45c98e78c9a4a13bc6cd",
+ "14574612bb6542a1b557a12bdc189cbc",
+ "628ac6a81d1646418cd58b7fccb814a9",
+ "061384512ae447bca08741680dba7985",
+ "b24e8170391d4a41835bcdb649457ba7",
+ "4f0a42dd0f954a2a9abd2d98dcb3de67",
+ "237b1e5d578841738596dc8d9fb12a23",
+ "96f6b9783cb24579a96e96edb4e9acd9",
+ "e909d23ed13e4652a909b4f1c5702ec7",
+ "82f6ec4e9743477c909d6ef734c06808",
+ "4bca98717ed84770a06524e832f3dc70",
+ "2cb163ea221745cfb446ec9ddcbe622b",
+ "877898b8398541e3b9909a3a372cad14",
+ "d19511fe4049467a9e24bffc8b799027"
+ ]
+ },
+ "id": "Xyze2yuFl7UD",
+ "outputId": "6373ea3f-9076-45cf-c319-74af872647b9"
+ },
+ "outputs": [],
+ "source": [
+ "# load necessary components: the processor and the model\n",
+ "processor = AutoProcessor.from_pretrained(\"microsoft/git-base-textvqa\")\n",
+ "model = AutoModelForCausalLM.from_pretrained(\"microsoft/git-base-textvqa\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "PoP6txfhmPI9"
+ },
+ "outputs": [],
+ "source": [
+ "class GIT_VQA:\n",
+ " \"\"\"Custom implementation of the GIT model for Visual Question Answering (VQA) tasks.\"\"\"\n",
+ "\n",
+ " def __init__(self, model, processor):\n",
+ " \"\"\"Initializes the model and the processor.\"\"\"\n",
+ " self.model = model\n",
+ " self.processor = processor\n",
+ " return\n",
+ "\n",
+ "\n",
+ " def preprocess(self, image, question):\n",
+ " \"\"\"Preprocesses the inputs: image, question\"\"\"\n",
+ " # process the image to get pixel values\n",
+ " pixel_values = self.processor(images=image, return_tensors=\"pt\").pixel_values\n",
+ "\n",
+ " # process the question to get input IDs, but do not add special tokens\n",
+ " input_ids = self.processor(text=question, add_special_tokens=False).input_ids\n",
+ "\n",
+ " # add the CLS token at the beginning of the input_ids and format for model input\n",
+ " input_ids = [self.processor.tokenizer.cls_token_id] + input_ids\n",
+ " input_ids = torch.tensor(input_ids).unsqueeze(0)\n",
+ "\n",
+ " return pixel_values, input_ids\n",
+ "\n",
+ "\n",
+ " def generate(self, pixel_values, input_ids):\n",
+ " \"\"\"Generates the output from the preprocessed inputs.\"\"\"\n",
+ "\n",
+ " # generate output using the model with a maximum length of 50 tokens\n",
+ " outputs = self.model.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50)\n",
+ " return outputs\n",
+ "\n",
+ "\n",
+ " def postprocess(self, outputs):\n",
+ " \"\"\"Post-processes the output generated by the model.\"\"\"\n",
+ "\n",
+ " # decode the output, ignoring special tokens\n",
+ " answer = self.processor.batch_decode(outputs, skip_special_tokens=True)\n",
+ " return answer\n",
+ "\n",
+ "\n",
+ " def get_answer(self, image, question):\n",
+ " \"\"\"Returns human friendly answer to a question\"\"\"\n",
+ "\n",
+ " # preprocess\n",
+ " pixel_values, input_ids = self.preprocess(image, question)\n",
+ " # generate output\n",
+ " outputs = self.generate(pixel_values, input_ids)\n",
+ " # post-process\n",
+ " answer = self.postprocess(outputs)\n",
+ " return answer"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "YXXaDaQZqpen"
+ },
+ "outputs": [],
+ "source": [
+ "# create a GIT instance\n",
+ "git_vqa = GIT_VQA(model=model, processor=processor)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "9HT3VFLsboQE",
+ "outputId": "5f5e7a77-a40f-448d-84e3-d3bbfe594eb8"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 1\n",
+ "question = \"what does the front of the bus say at the top?\"\n",
+ "answer = git_vqa.get_answer(image, question)\n",
+ "print(answer)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Lcj5yO2sboT2",
+ "outputId": "65301084-2148-402f-c641-8bd774e5308c"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 2\n",
+ "question = \"what are all the colors present on the bus?\"\n",
+ "answer = git_vqa.get_answer(image, question)\n",
+ "print(answer)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "PBqTU4qwboXV",
+ "outputId": "a36cf954-da7c-42d6-a1ef-179058fc0270"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 3\n",
+ "question = \"How many wheels you see in the bus?\"\n",
+ "answer = git_vqa.get_answer(image, question)\n",
+ "print(answer)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 517
+ },
+ "id": "cBdRCN28b4FQ",
+ "outputId": "22a64008-64c7-439c-ad3f-2c4a4295dba0"
+ },
+ "outputs": [],
+ "source": [
+ "# load another image to test BLIP\n",
+ "img_url = \"https://fastly.picsum.photos/id/110/500/500.jpg?hmac=wSHhLFNyJ6k3uM94s6etGQ0WWhmwbdUSiZ9ZDL5Hh2Q\"\n",
+ "image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')\n",
+ "image"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "-CD02X_ub4Ho",
+ "outputId": "74fe9c3f-3e1d-4627-9fd0-c8cf166e4942"
+ },
+ "outputs": [],
+ "source": [
+ "# sample question 1\n",
+ "question = \"Is it night in the image?\"\n",
+ "answer = git_vqa.get_answer(image, question)\n",
+ "print(answer)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "uK_KAVyEb4LC"
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "gpuType": "T4",
+ "provenance": []
+ },
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "0324f20083ee42268aac2e7dce294907": {
+ "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_1a27d88a39e64a09bd7007e066be7caf",
+ "placeholder": "",
+ "style": "IPY_MODEL_2c1891a4c26042c08956982391039dfe",
+ "value": "Downloading (…)okenizer_config.json: 100%"
+ }
+ },
+ "039c791cb44e42e29fce22b17e6aaeb2": {
+ "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
+ }
+ },
+ "05a15576ce6b4595a228045a2c43a598": {
+ "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
+ }
+ },
+ "061384512ae447bca08741680dba7985": {
+ "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_b24e8170391d4a41835bcdb649457ba7",
+ "IPY_MODEL_4f0a42dd0f954a2a9abd2d98dcb3de67",
+ "IPY_MODEL_237b1e5d578841738596dc8d9fb12a23"
+ ],
+ "layout": "IPY_MODEL_96f6b9783cb24579a96e96edb4e9acd9"
+ }
+ },
+ "06d45a612716458e84cff4dadacde353": {
+ "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
+ }
+ },
+ "0754fa2f914f4c24a856e321a21319f5": {
+ "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_4bd11779af5243f38a87aee67edeef37",
+ "IPY_MODEL_2b1ac03b7948452faa1282e9f41b8069",
+ "IPY_MODEL_e837565f047041b1b4fe58abe20b4860"
+ ],
+ "layout": "IPY_MODEL_35d468050abe416dbfe791ddf607ee6f"
+ }
+ },
+ "0c59eab53a8649cf88ed55d135981e1a": {
+ "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_9d9e48cd4d5f4a0c97d7f13d6e727c09",
+ "placeholder": "",
+ "style": "IPY_MODEL_8f1974332d694edd968fe5bb9ecba070",
+ "value": "Downloading pytorch_model.bin: 100%"
+ }
+ },
+ "0fdfc064f7ac43e29f207cf8c01ebea4": {
+ "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_1f4f0aecfdfa423a8d219a7a9167b74c",
+ "max": 231508,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_70dc32700a9a4f268177a83cc2bdb29c",
+ "value": 231508
+ }
+ },
+ "10bcc231a8ba4b809be9c7c6b95b5b53": {
+ "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
+ }
+ },
+ "1338c7844ec64171b0b6f50c6c2740ea": {
+ "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": ""
+ }
+ },
+ "13935b9459d34cb28418ceffe17f8d85": {
+ "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": ""
+ }
+ },
+ "14574612bb6542a1b557a12bdc189cbc": {
+ "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
+ }
+ },
+ "14c199d355824bcfb14460c8e786aa93": {
+ "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_18dcfde5f4c042a08b76acca0e1a6db8",
+ "IPY_MODEL_e9e7c07fa5544978840f4b5c24372ff0",
+ "IPY_MODEL_27635f5481f1430f9e7ec0404f5c393b"
+ ],
+ "layout": "IPY_MODEL_b3c518bde5bc4a5bb2c2f6528d361cc0"
+ }
+ },
+ "17af87063b1e4888b8dd22dd325e039f": {
+ "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
+ }
+ },
+ "18dcfde5f4c042a08b76acca0e1a6db8": {
+ "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_20e7de8cc9e34728871e040e7fe9d80d",
+ "placeholder": "",
+ "style": "IPY_MODEL_fb7358b3d7c84e058b333694d793ef98",
+ "value": "Downloading (…)lve/main/config.json: 100%"
+ }
+ },
+ "1a27d88a39e64a09bd7007e066be7caf": {
+ "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
+ }
+ },
+ "1a5e688c08c747eaaf5ca99b9812eec1": {
+ "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
+ }
+ },
+ "1d4dd1aae7c7452298706a60c84f901d": {
+ "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
+ }
+ },
+ "1dabddf490454df48032d8c05080fe95": {
+ "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
+ }
+ },
+ "1edf085b64f24088bd70a6a6954c8156": {
+ "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
+ }
+ },
+ "1f4f0aecfdfa423a8d219a7a9167b74c": {
+ "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
+ }
+ },
+ "20052640edfa418fb52d9a6ed8d5e7c5": {
+ "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
+ }
+ },
+ "20e7de8cc9e34728871e040e7fe9d80d": {
+ "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
+ }
+ },
+ "20ec2d7af5444323acf5344e4f45a75e": {
+ "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
+ }
+ },
+ "228cbb4147cb4fcdb21866278e8f218c": {
+ "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_92d4a3333635430a88cdc38ed8158f49",
+ "max": 592,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_f0bf68a25bf7446282f00c22d1093208",
+ "value": 592
+ }
+ },
+ "237b1e5d578841738596dc8d9fb12a23": {
+ "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_877898b8398541e3b9909a3a372cad14",
+ "placeholder": "",
+ "style": "IPY_MODEL_d19511fe4049467a9e24bffc8b799027",
+ "value": " 141/141 [00:00<00:00, 10.0kB/s]"
+ }
+ },
+ "23ac198dda5d4390b1e0998e2553d04c": {
+ "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": ""
+ }
+ },
+ "27635f5481f1430f9e7ec0404f5c393b": {
+ "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_8c5762e71db644cfac50336e5de12ec6",
+ "placeholder": "",
+ "style": "IPY_MODEL_2c5f5b6d6ca04df4b2fc874fdf0ca83c",
+ "value": " 4.56k/4.56k [00:00<00:00, 400kB/s]"
+ }
+ },
+ "2a334258549d49c7ab12ae3f07f69ea9": {
+ "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
+ }
+ },
+ "2b1ac03b7948452faa1282e9f41b8069": {
+ "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_ce9b5e9018ff4acfb9f59fcb04bdea22",
+ "max": 453,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_b6bd97ac6f79431596f1d2e76cf80cc1",
+ "value": 453
+ }
+ },
+ "2c1891a4c26042c08956982391039dfe": {
+ "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": ""
+ }
+ },
+ "2c5f5b6d6ca04df4b2fc874fdf0ca83c": {
+ "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": ""
+ }
+ },
+ "2cb163ea221745cfb446ec9ddcbe622b": {
+ "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": ""
+ }
+ },
+ "2e904bced0c945498efee80e62acbe22": {
+ "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_7dc9b79e3ad74651ae3f6449a8b968f7",
+ "max": 2822,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_b68190a10e0b48678a9937693a2e0875",
+ "value": 2822
+ }
+ },
+ "3064bb59f3144fc6a373b1528290b57a": {
+ "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
+ }
+ },
+ "3080191d2d754416988b90ece2f76cb5": {
+ "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
+ }
+ },
+ "30944ee9722c4e4da3b23a635a2e561f": {
+ "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_c7af806e9fcf44dfa483f9aee21ab0ef",
+ "placeholder": "",
+ "style": "IPY_MODEL_743663756db94768a1a82d5bccac5538",
+ "value": "Downloading pytorch_model.bin: 100%"
+ }
+ },
+ "30c8f5bab4ac4beab39c0a282e6a3183": {
+ "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
+ }
+ },
+ "312d2d503a0f47278b47c03ddef6109f": {
+ "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_6aedd062950c4596b734f7a98a9cce9c",
+ "placeholder": "",
+ "style": "IPY_MODEL_5a9aba83d9734e01902c5b9bcb534ac4",
+ "value": " 125/125 [00:00<00:00, 10.2kB/s]"
+ }
+ },
+ "35d468050abe416dbfe791ddf607ee6f": {
+ "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
+ }
+ },
+ "366f53d87c6c4b0aa6fd3d167f01c5c3": {
+ "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": ""
+ }
+ },
+ "37dc882c932347788e668b941222f7a2": {
+ "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": ""
+ }
+ },
+ "3a18c950c8da4cc2b7f3f79a9b91dea2": {
+ "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
+ }
+ },
+ "3af451b24c8a47c99941a0d3676db363": {
+ "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": ""
+ }
+ },
+ "3afb14ab061c459b9276116e0a6c9416": {
+ "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
+ }
+ },
+ "3b40e3e3b6a94c3a8f5c94d328c7ff8e": {
+ "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
+ }
+ },
+ "3b88701571a342b0abea71a105fed88b": {
+ "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": ""
+ }
+ },
+ "3b8edfee45ef459c8ae1fc8c9ac7cbc9": {
+ "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": ""
+ }
+ },
+ "3bc21fd430c3426283585a874ec1ce94": {
+ "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
+ }
+ },
+ "3bee2b1a38cc4f68a614ac2460b45f37": {
+ "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
+ }
+ },
+ "3dedecb37fdb44ceb07c6d1712c4e021": {
+ "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_5c0d9f5a3aa0473b9058fc33f28a9971",
+ "placeholder": "",
+ "style": "IPY_MODEL_bedf96c9d0c94e7f9f723e4cec98ae8a",
+ "value": " 503/503 [00:00<00:00, 9.40kB/s]"
+ }
+ },
+ "400bbbc0ce6e42ad9f0916a428aeff83": {
+ "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": ""
+ }
+ },
+ "4289a56219ec41acaafdb60d3b7d1360": {
+ "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
+ }
+ },
+ "430fa54d746a4743bc162b8e835a093c": {
+ "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
+ }
+ },
+ "484c18d0f13148efa47e68dca92cfb48": {
+ "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_b2298da115e446eb8b129cf635bad729",
+ "max": 649618,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_3b8edfee45ef459c8ae1fc8c9ac7cbc9",
+ "value": 649618
+ }
+ },
+ "492d702c82564ce5ae62e4989905f176": {
+ "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_17af87063b1e4888b8dd22dd325e039f",
+ "placeholder": "",
+ "style": "IPY_MODEL_fbe842d741e84880ac53241d2d39a566",
+ "value": "Downloading (…)cial_tokens_map.json: 100%"
+ }
+ },
+ "494a7d5322c84f08b713936633c10d8a": {
+ "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
+ }
+ },
+ "4b79f47e2713436c91422a7e8db2729d": {
+ "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": ""
+ }
+ },
+ "4bca98717ed84770a06524e832f3dc70": {
+ "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
+ }
+ },
+ "4bd11779af5243f38a87aee67edeef37": {
+ "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_3b40e3e3b6a94c3a8f5c94d328c7ff8e",
+ "placeholder": "",
+ "style": "IPY_MODEL_4c9915c0e224462c8381803ca2e404d3",
+ "value": "Downloading (…)okenizer_config.json: 100%"
+ }
+ },
+ "4c1a2f85fe2744fbbada089a46ac7f20": {
+ "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
+ }
+ },
+ "4c9915c0e224462c8381803ca2e404d3": {
+ "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": ""
+ }
+ },
+ "4dd5e64fe44c495d8d8d912f0ac06b82": {
+ "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
+ }
+ },
+ "4e9c85779ed3400a8d8b3f14f08770b6": {
+ "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_f83d235f098a428d9f6519bba64a385f",
+ "max": 231508,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_945160da858a439d90de50ffd671396a",
+ "value": 231508
+ }
+ },
+ "4f0a42dd0f954a2a9abd2d98dcb3de67": {
+ "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_4bca98717ed84770a06524e832f3dc70",
+ "max": 141,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_2cb163ea221745cfb446ec9ddcbe622b",
+ "value": 141
+ }
+ },
+ "4f70b3f18d12429cb3f6a8921a168c00": {
+ "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_f74bcd4d2ab04c6cb3220c2fc64257b1",
+ "IPY_MODEL_76a37f30e9004067b8ba520191d64ac0",
+ "IPY_MODEL_f9d5339a3d464d18846f943017f90257"
+ ],
+ "layout": "IPY_MODEL_5bd2087051324e1db5ca06eb9c098d19"
+ }
+ },
+ "4f78f4c67c524e1dbf18615cd98fc1e4": {
+ "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_3064bb59f3144fc6a373b1528290b57a",
+ "placeholder": "",
+ "style": "IPY_MODEL_4b79f47e2713436c91422a7e8db2729d",
+ "value": "Downloading (…)lve/main/config.json: 100%"
+ }
+ },
+ "51838f3af71a4535afed388649e691fe": {
+ "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_acf34873eae8493fbf953b1a8a65e177",
+ "IPY_MODEL_872540ef74d6459a99e4647d2a643176",
+ "IPY_MODEL_bed467f249ca47ea8b3ea57cc365dd22"
+ ],
+ "layout": "IPY_MODEL_a5a8f2b461064eecad9cefa57eb89423"
+ }
+ },
+ "522a01b9856f477b89ce65ee75edea28": {
+ "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
+ }
+ },
+ "54dc179584c241dea17f59f2b9e93f47": {
+ "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
+ }
+ },
+ "592bbbcf2fd14ed882f9a0adb56a57a3": {
+ "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_96332b8765b3472c9f6a43626e8a5bb3",
+ "placeholder": "",
+ "style": "IPY_MODEL_13935b9459d34cb28418ceffe17f8d85",
+ "value": " 711k/711k [00:00<00:00, 11.8MB/s]"
+ }
+ },
+ "5a2729d7ebe54449aaedcb658795e19f": {
+ "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_05a15576ce6b4595a228045a2c43a598",
+ "placeholder": "",
+ "style": "IPY_MODEL_23ac198dda5d4390b1e0998e2553d04c",
+ "value": " 125/125 [00:00<00:00, 3.22kB/s]"
+ }
+ },
+ "5a9aba83d9734e01902c5b9bcb534ac4": {
+ "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": ""
+ }
+ },
+ "5af7e60d5fe142f6a2fb59b92c19715b": {
+ "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_10bcc231a8ba4b809be9c7c6b95b5b53",
+ "placeholder": "",
+ "style": "IPY_MODEL_a5506cc4b437400cbfff631c20110891",
+ "value": " 1.54G/1.54G [00:16<00:00, 94.9MB/s]"
+ }
+ },
+ "5bd2087051324e1db5ca06eb9c098d19": {
+ "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
+ }
+ },
+ "5c0d9f5a3aa0473b9058fc33f28a9971": {
+ "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
+ }
+ },
+ "5f53f8958f6744329c885898656f0c93": {
+ "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_4f78f4c67c524e1dbf18615cd98fc1e4",
+ "IPY_MODEL_2e904bced0c945498efee80e62acbe22",
+ "IPY_MODEL_5f98a87208c048a199395d58e986799f"
+ ],
+ "layout": "IPY_MODEL_522a01b9856f477b89ce65ee75edea28"
+ }
+ },
+ "5f98a87208c048a199395d58e986799f": {
+ "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_d2ac867676604aa8a10267219e3c6362",
+ "placeholder": "",
+ "style": "IPY_MODEL_3af451b24c8a47c99941a0d3676db363",
+ "value": " 2.82k/2.82k [00:00<00:00, 105kB/s]"
+ }
+ },
+ "602461cd7b5c471394ee2920b067a8f6": {
+ "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
+ }
+ },
+ "60e84d9d72e94db9840aa03c7f15e3c3": {
+ "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_20ec2d7af5444323acf5344e4f45a75e",
+ "placeholder": "",
+ "style": "IPY_MODEL_e5264a161eff4d6484cbefc7ac38c20d",
+ "value": " 650k/650k [00:00<00:00, 10.8MB/s]"
+ }
+ },
+ "628ac6a81d1646418cd58b7fccb814a9": {
+ "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": ""
+ }
+ },
+ "63994cb769ce402194b4a70ea1079a3d": {
+ "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": ""
+ }
+ },
+ "64f4db4f35324cab9abab95c86307a89": {
+ "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": ""
+ }
+ },
+ "65c79edaf8f844979f6d2cfdbded70e8": {
+ "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
+ }
+ },
+ "65c7d970eca34f99a47528163a57b246": {
+ "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
+ }
+ },
+ "6aedd062950c4596b734f7a98a9cce9c": {
+ "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
+ }
+ },
+ "6bfee089c2c6462daf9ccd9baae21cc3": {
+ "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_1a5e688c08c747eaaf5ca99b9812eec1",
+ "max": 1538966629,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_89e75ba649f948e0aa1d458b9800b480",
+ "value": 1538966629
+ }
+ },
+ "70dc32700a9a4f268177a83cc2bdb29c": {
+ "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": ""
+ }
+ },
+ "72e9c18021664b9f812916541fc51c7a": {
+ "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_1d4dd1aae7c7452298706a60c84f901d",
+ "placeholder": "",
+ "style": "IPY_MODEL_e6998fe4f2aa4ef595e9b30b794c5549",
+ "value": "Downloading (…)solve/main/vocab.txt: 100%"
+ }
+ },
+ "743663756db94768a1a82d5bccac5538": {
+ "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": ""
+ }
+ },
+ "76a37f30e9004067b8ba520191d64ac0": {
+ "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_af0a3bf66e8e433db1bea3b41a0c052a",
+ "max": 445,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_9075203ea622474883993bb09cb2636c",
+ "value": 445
+ }
+ },
+ "7a2e3aab0a244cf099002a6064b5ce42": {
+ "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_f58b27200af24c2eb76751b0bff84928",
+ "IPY_MODEL_484c18d0f13148efa47e68dca92cfb48",
+ "IPY_MODEL_60e84d9d72e94db9840aa03c7f15e3c3"
+ ],
+ "layout": "IPY_MODEL_65c7d970eca34f99a47528163a57b246"
+ }
+ },
+ "7dc9b79e3ad74651ae3f6449a8b968f7": {
+ "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
+ }
+ },
+ "7fe5d5638c0c424e94cc8733fd79f5ab": {
+ "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_dfa636e1fb524cf2ae3d6693fd128084",
+ "IPY_MODEL_c4f1648bca844b0ba790a5990ae2170c",
+ "IPY_MODEL_592bbbcf2fd14ed882f9a0adb56a57a3"
+ ],
+ "layout": "IPY_MODEL_8f363594b80e487494d0855f9ddde030"
+ }
+ },
+ "8005f31a31ed48d8b1a3e912b3aed139": {
+ "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": ""
+ }
+ },
+ "82f6ec4e9743477c909d6ef734c06808": {
+ "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": ""
+ }
+ },
+ "872540ef74d6459a99e4647d2a643176": {
+ "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_4dd5e64fe44c495d8d8d912f0ac06b82",
+ "max": 711396,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_3b88701571a342b0abea71a105fed88b",
+ "value": 711396
+ }
+ },
+ "877898b8398541e3b9909a3a372cad14": {
+ "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
+ }
+ },
+ "878c5cc4315443018704910dcf37f154": {
+ "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": ""
+ }
+ },
+ "88243d6adfd04c9faa5732bafc1ae615": {
+ "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_4289a56219ec41acaafdb60d3b7d1360",
+ "placeholder": "",
+ "style": "IPY_MODEL_8005f31a31ed48d8b1a3e912b3aed139",
+ "value": " 592/592 [00:00<00:00, 35.5kB/s]"
+ }
+ },
+ "89e75ba649f948e0aa1d458b9800b480": {
+ "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": ""
+ }
+ },
+ "8a6fad1603b6410eba545e462adb3096": {
+ "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_30944ee9722c4e4da3b23a635a2e561f",
+ "IPY_MODEL_b654f414cfe04f9a9777b076349199f6",
+ "IPY_MODEL_bcb584c47d2e430f8d0ff7db81619909"
+ ],
+ "layout": "IPY_MODEL_9d049ae4478447afb76756aa2eefab5a"
+ }
+ },
+ "8a7d1c368a9548d0aecb6564d7aa1bb7": {
+ "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": ""
+ }
+ },
+ "8b64a23dfc724928a5d23c904dc1595f": {
+ "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_0324f20083ee42268aac2e7dce294907",
+ "IPY_MODEL_228cbb4147cb4fcdb21866278e8f218c",
+ "IPY_MODEL_88243d6adfd04c9faa5732bafc1ae615"
+ ],
+ "layout": "IPY_MODEL_dad6452f3a87437fbf6b691f56614711"
+ }
+ },
+ "8c5762e71db644cfac50336e5de12ec6": {
+ "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
+ }
+ },
+ "8cc8a9d55c2546bcaabead9c8dc2ed09": {
+ "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
+ }
+ },
+ "8f1974332d694edd968fe5bb9ecba070": {
+ "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": ""
+ }
+ },
+ "8f363594b80e487494d0855f9ddde030": {
+ "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
+ }
+ },
+ "9075203ea622474883993bb09cb2636c": {
+ "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": ""
+ }
+ },
+ "92d4a3333635430a88cdc38ed8158f49": {
+ "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
+ }
+ },
+ "945160da858a439d90de50ffd671396a": {
+ "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": ""
+ }
+ },
+ "946e33fee00f4c2aac6406ffe83c419c": {
+ "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": ""
+ }
+ },
+ "96332b8765b3472c9f6a43626e8a5bb3": {
+ "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
+ }
+ },
+ "96f6b9783cb24579a96e96edb4e9acd9": {
+ "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
+ }
+ },
+ "9d049ae4478447afb76756aa2eefab5a": {
+ "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
+ }
+ },
+ "9d9e48cd4d5f4a0c97d7f13d6e727c09": {
+ "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
+ }
+ },
+ "9f16f63600454da5afdef84ef5afd59d": {
+ "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
+ }
+ },
+ "a4ae31365e3c4370bc2f7e7ce7fe27f9": {
+ "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": ""
+ }
+ },
+ "a5506cc4b437400cbfff631c20110891": {
+ "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": ""
+ }
+ },
+ "a5a8f2b461064eecad9cefa57eb89423": {
+ "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
+ }
+ },
+ "a97a2a99008f4ac6be1d6377d04504fa": {
+ "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_b217d9ea08a14ff49d274fc2aea760f8",
+ "IPY_MODEL_d500132d4c434179975a124e00c4cec3",
+ "IPY_MODEL_312d2d503a0f47278b47c03ddef6109f"
+ ],
+ "layout": "IPY_MODEL_1edf085b64f24088bd70a6a6954c8156"
+ }
+ },
+ "acf34873eae8493fbf953b1a8a65e177": {
+ "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_602461cd7b5c471394ee2920b067a8f6",
+ "placeholder": "",
+ "style": "IPY_MODEL_c163abebb6434568ac10621f99dee880",
+ "value": "Downloading (…)/main/tokenizer.json: 100%"
+ }
+ },
+ "af0a3bf66e8e433db1bea3b41a0c052a": {
+ "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
+ }
+ },
+ "b0dba09b02f142c485ce94ba887132b5": {
+ "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_65c79edaf8f844979f6d2cfdbded70e8",
+ "max": 503,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_cc2dc3160f074fd8a457dcde77cfbc2b",
+ "value": 503
+ }
+ },
+ "b11a5cb28f474ba9bd6dc98f5772fcda": {
+ "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_c697ecf18cad4be6990af0899da9503c",
+ "placeholder": "",
+ "style": "IPY_MODEL_64f4db4f35324cab9abab95c86307a89",
+ "value": " 232k/232k [00:00<00:00, 5.74MB/s]"
+ }
+ },
+ "b132e46fada74341aa52482f1b5f4240": {
+ "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_4c1a2f85fe2744fbbada089a46ac7f20",
+ "placeholder": "",
+ "style": "IPY_MODEL_f9b7adc37082413f93053106e60eab4d",
+ "value": " 232k/232k [00:00<00:00, 2.98MB/s]"
+ }
+ },
+ "b217d9ea08a14ff49d274fc2aea760f8": {
+ "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_3bee2b1a38cc4f68a614ac2460b45f37",
+ "placeholder": "",
+ "style": "IPY_MODEL_400bbbc0ce6e42ad9f0916a428aeff83",
+ "value": "Downloading (…)cial_tokens_map.json: 100%"
+ }
+ },
+ "b2298da115e446eb8b129cf635bad729": {
+ "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
+ }
+ },
+ "b24e8170391d4a41835bcdb649457ba7": {
+ "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_e909d23ed13e4652a909b4f1c5702ec7",
+ "placeholder": "",
+ "style": "IPY_MODEL_82f6ec4e9743477c909d6ef734c06808",
+ "value": "Downloading (…)neration_config.json: 100%"
+ }
+ },
+ "b3c518bde5bc4a5bb2c2f6528d361cc0": {
+ "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
+ }
+ },
+ "b654f414cfe04f9a9777b076349199f6": {
+ "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_3080191d2d754416988b90ece2f76cb5",
+ "max": 708756315,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d02a3297387b45c98e78c9a4a13bc6cd",
+ "value": 708756315
+ }
+ },
+ "b68190a10e0b48678a9937693a2e0875": {
+ "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": ""
+ }
+ },
+ "b6bd97ac6f79431596f1d2e76cf80cc1": {
+ "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": ""
+ }
+ },
+ "bcb584c47d2e430f8d0ff7db81619909": {
+ "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_14574612bb6542a1b557a12bdc189cbc",
+ "placeholder": "",
+ "style": "IPY_MODEL_628ac6a81d1646418cd58b7fccb814a9",
+ "value": " 709M/709M [00:05<00:00, 208MB/s]"
+ }
+ },
+ "bed467f249ca47ea8b3ea57cc365dd22": {
+ "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_54dc179584c241dea17f59f2b9e93f47",
+ "placeholder": "",
+ "style": "IPY_MODEL_8a7d1c368a9548d0aecb6564d7aa1bb7",
+ "value": " 711k/711k [00:00<00:00, 8.24MB/s]"
+ }
+ },
+ "bedf96c9d0c94e7f9f723e4cec98ae8a": {
+ "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": ""
+ }
+ },
+ "c163abebb6434568ac10621f99dee880": {
+ "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": ""
+ }
+ },
+ "c3bfbf522f884eb489410593b6b63abc": {
+ "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_e95fea587b2a4f47a7b8b492db3e1ffc",
+ "IPY_MODEL_b0dba09b02f142c485ce94ba887132b5",
+ "IPY_MODEL_3dedecb37fdb44ceb07c6d1712c4e021"
+ ],
+ "layout": "IPY_MODEL_039c791cb44e42e29fce22b17e6aaeb2"
+ }
+ },
+ "c4f1648bca844b0ba790a5990ae2170c": {
+ "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_8cc8a9d55c2546bcaabead9c8dc2ed09",
+ "max": 711396,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_ff3175e110e94476bf7ed17ef19a0077",
+ "value": 711396
+ }
+ },
+ "c697ecf18cad4be6990af0899da9503c": {
+ "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
+ }
+ },
+ "c7af806e9fcf44dfa483f9aee21ab0ef": {
+ "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
+ }
+ },
+ "cc2dc3160f074fd8a457dcde77cfbc2b": {
+ "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": ""
+ }
+ },
+ "ce764110e55b47469fcd0e929808d801": {
+ "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_0c59eab53a8649cf88ed55d135981e1a",
+ "IPY_MODEL_6bfee089c2c6462daf9ccd9baae21cc3",
+ "IPY_MODEL_5af7e60d5fe142f6a2fb59b92c19715b"
+ ],
+ "layout": "IPY_MODEL_06d45a612716458e84cff4dadacde353"
+ }
+ },
+ "ce9b5e9018ff4acfb9f59fcb04bdea22": {
+ "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
+ }
+ },
+ "cee5e9c5e2604a898fc3bd9fae8b260e": {
+ "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_492d702c82564ce5ae62e4989905f176",
+ "IPY_MODEL_fb47f6098ea54e828931f1082eddcfc6",
+ "IPY_MODEL_5a2729d7ebe54449aaedcb658795e19f"
+ ],
+ "layout": "IPY_MODEL_3afb14ab061c459b9276116e0a6c9416"
+ }
+ },
+ "d02a3297387b45c98e78c9a4a13bc6cd": {
+ "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": ""
+ }
+ },
+ "d19511fe4049467a9e24bffc8b799027": {
+ "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": ""
+ }
+ },
+ "d2ac867676604aa8a10267219e3c6362": {
+ "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
+ }
+ },
+ "d500132d4c434179975a124e00c4cec3": {
+ "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_3bc21fd430c3426283585a874ec1ce94",
+ "max": 125,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_37dc882c932347788e668b941222f7a2",
+ "value": 125
+ }
+ },
+ "da2eb9afc6214b7dbdb99bd38a05fedd": {
+ "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_dd77bd4c656748869c4bd34f1ae74508",
+ "IPY_MODEL_0fdfc064f7ac43e29f207cf8c01ebea4",
+ "IPY_MODEL_b132e46fada74341aa52482f1b5f4240"
+ ],
+ "layout": "IPY_MODEL_9f16f63600454da5afdef84ef5afd59d"
+ }
+ },
+ "dad6452f3a87437fbf6b691f56614711": {
+ "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
+ }
+ },
+ "dbb37d88052b40f5aeeb1fbf2ab01be4": {
+ "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": ""
+ }
+ },
+ "dd77bd4c656748869c4bd34f1ae74508": {
+ "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_3a18c950c8da4cc2b7f3f79a9b91dea2",
+ "placeholder": "",
+ "style": "IPY_MODEL_dbb37d88052b40f5aeeb1fbf2ab01be4",
+ "value": "Downloading (…)solve/main/vocab.txt: 100%"
+ }
+ },
+ "dfa636e1fb524cf2ae3d6693fd128084": {
+ "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_1dabddf490454df48032d8c05080fe95",
+ "placeholder": "",
+ "style": "IPY_MODEL_878c5cc4315443018704910dcf37f154",
+ "value": "Downloading (…)/main/tokenizer.json: 100%"
+ }
+ },
+ "e0a6fa485edb419da6b4c33e6d45cd9f": {
+ "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
+ }
+ },
+ "e11444c22fa24360a293d4e6dad4ef3a": {
+ "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
+ }
+ },
+ "e5264a161eff4d6484cbefc7ac38c20d": {
+ "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": ""
+ }
+ },
+ "e6998fe4f2aa4ef595e9b30b794c5549": {
+ "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": ""
+ }
+ },
+ "e837565f047041b1b4fe58abe20b4860": {
+ "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_30c8f5bab4ac4beab39c0a282e6a3183",
+ "placeholder": "",
+ "style": "IPY_MODEL_fa8c6a48412a46ed905d105a2cc4f073",
+ "value": " 453/453 [00:00<00:00, 20.8kB/s]"
+ }
+ },
+ "e909d23ed13e4652a909b4f1c5702ec7": {
+ "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
+ }
+ },
+ "e95fea587b2a4f47a7b8b492db3e1ffc": {
+ "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_e11444c22fa24360a293d4e6dad4ef3a",
+ "placeholder": "",
+ "style": "IPY_MODEL_a4ae31365e3c4370bc2f7e7ce7fe27f9",
+ "value": "Downloading (…)rocessor_config.json: 100%"
+ }
+ },
+ "e995f343b325494d9f315d27ab25ede9": {
+ "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": ""
+ }
+ },
+ "e9e7c07fa5544978840f4b5c24372ff0": {
+ "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_2a334258549d49c7ab12ae3f07f69ea9",
+ "max": 4559,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_63994cb769ce402194b4a70ea1079a3d",
+ "value": 4559
+ }
+ },
+ "edaae38c2fe84bbd830d2cfcd793e2f5": {
+ "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
+ }
+ },
+ "f0bf68a25bf7446282f00c22d1093208": {
+ "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": ""
+ }
+ },
+ "f58b27200af24c2eb76751b0bff84928": {
+ "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_edaae38c2fe84bbd830d2cfcd793e2f5",
+ "placeholder": "",
+ "style": "IPY_MODEL_1338c7844ec64171b0b6f50c6c2740ea",
+ "value": "Downloading bus.png: 100%"
+ }
+ },
+ "f74bcd4d2ab04c6cb3220c2fc64257b1": {
+ "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_494a7d5322c84f08b713936633c10d8a",
+ "placeholder": "",
+ "style": "IPY_MODEL_366f53d87c6c4b0aa6fd3d167f01c5c3",
+ "value": "Downloading (…)rocessor_config.json: 100%"
+ }
+ },
+ "f83d235f098a428d9f6519bba64a385f": {
+ "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
+ }
+ },
+ "f9b7adc37082413f93053106e60eab4d": {
+ "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": ""
+ }
+ },
+ "f9d5339a3d464d18846f943017f90257": {
+ "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_e0a6fa485edb419da6b4c33e6d45cd9f",
+ "placeholder": "",
+ "style": "IPY_MODEL_946e33fee00f4c2aac6406ffe83c419c",
+ "value": " 445/445 [00:00<00:00, 29.9kB/s]"
+ }
+ },
+ "fa8c6a48412a46ed905d105a2cc4f073": {
+ "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": ""
+ }
+ },
+ "fb47f6098ea54e828931f1082eddcfc6": {
+ "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_20052640edfa418fb52d9a6ed8d5e7c5",
+ "max": 125,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_e995f343b325494d9f315d27ab25ede9",
+ "value": 125
+ }
+ },
+ "fb7358b3d7c84e058b333694d793ef98": {
+ "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": ""
+ }
+ },
+ "fbe842d741e84880ac53241d2d39a566": {
+ "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": ""
+ }
+ },
+ "ff3175e110e94476bf7ed17ef19a0077": {
+ "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": ""
+ }
+ },
+ "ff519a1b9a504a13899a49385b6b9564": {
+ "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_72e9c18021664b9f812916541fc51c7a",
+ "IPY_MODEL_4e9c85779ed3400a8d8b3f14f08770b6",
+ "IPY_MODEL_b11a5cb28f474ba9bd6dc98f5772fcda"
+ ],
+ "layout": "IPY_MODEL_430fa54d746a4743bc162b8e835a093c"
+ }
+ }
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/machine-learning/visual-question-answering/requirements.txt b/machine-learning/visual-question-answering/requirements.txt
new file mode 100644
index 00000000..d1fbebb0
--- /dev/null
+++ b/machine-learning/visual-question-answering/requirements.txt
@@ -0,0 +1,6 @@
+torch
+transformers
+accelerate
+scipy
+requests
+Pillow
\ No newline at end of file
diff --git a/machine-learning/visual-question-answering/running_blip2.py b/machine-learning/visual-question-answering/running_blip2.py
new file mode 100644
index 00000000..2feda202
--- /dev/null
+++ b/machine-learning/visual-question-answering/running_blip2.py
@@ -0,0 +1,78 @@
+# %%
+!pip install transformers accelerate
+
+# %%
+import requests
+from PIL import Image
+from transformers import Blip2Processor, Blip2ForConditionalGeneration
+import torch
+import os
+
+device = torch.device("cuda", 0)
+device
+
+# %%
+processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
+model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16)
+
+# %%
+model.to(device)
+
+# %%
+import urllib.parse as parse
+import os
+
+# a function to determine whether a string is a URL or not
+def is_url(https://github.com/string):
+ try:
+ result = parse.urlparse(string)
+ return all([result.scheme, result.netloc, result.path])
+ except:
+ return False
+
+# a function to load an image
+def load_image(image_path):
+ if is_url(https://github.com/image_path):
+ return Image.open(requests.get(image_path, stream=True).raw)
+ elif os.path.exists(image_path):
+ return Image.open(image_path)
+
+# %%
+raw_image = load_image("http://images.cocodataset.org/test-stuff2017/000000007226.jpg")
+
+# %%
+question = "a"
+inputs = processor(raw_image, question, return_tensors="pt").to(device, dtype=torch.float16)
+
+# %%
+out = model.generate(**inputs)
+print(processor.decode(out[0], skip_special_tokens=True))
+
+# %%
+question = "a vintage car driving down a street"
+inputs = processor(raw_image, question, return_tensors="pt").to(device, dtype=torch.float16)
+
+# %%
+out = model.generate(**inputs)
+print(processor.decode(out[0], skip_special_tokens=True))
+
+# %%
+question = "Question: What is the estimated year of these cars? Answer:"
+inputs = processor(raw_image, question, return_tensors="pt").to(device, dtype=torch.float16)
+
+# %%
+out = model.generate(**inputs)
+print(processor.decode(out[0], skip_special_tokens=True))
+
+# %%
+question = "Question: What is the color of the car? Answer:"
+inputs = processor(raw_image, question, return_tensors="pt").to(device, dtype=torch.float16)
+
+# %%
+out = model.generate(**inputs)
+print(processor.decode(out[0], skip_special_tokens=True))
+
+# %%
+
+
+
diff --git a/machine-learning/visual-question-answering/visualquestionanswering_pythoncodetutorial.py b/machine-learning/visual-question-answering/visualquestionanswering_pythoncodetutorial.py
new file mode 100644
index 00000000..b177ef4e
--- /dev/null
+++ b/machine-learning/visual-question-answering/visualquestionanswering_pythoncodetutorial.py
@@ -0,0 +1,262 @@
+# -*- coding: utf-8 -*-
+"""VisualQuestionAnswering_PythonCodeTutorial.ipynb
+
+Automatically generated by Colaboratory.
+
+Original file is located at
+ https://colab.research.google.com/drive/1dM89DgL_hg4K3uiKnTQ-p8rtS05wH_fX
+"""
+
+!pip install -qU transformers
+
+"""# BLIP
+
+- https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py
+- https://huggingface.co/Salesforce/blip-vqa-base/tree/main
+"""
+
+import requests
+from PIL import Image
+from transformers import BlipProcessor, BlipForQuestionAnswering
+import torch
+
+# load the image we will test BLIP on
+img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
+image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
+image
+
+# load necessary components: the processor and the model
+processor = BlipProcessor.from_pretrained("Salesforce/blip-vqa-base")
+model = BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-base")
+
+def get_answer_blip(model, processor, image, question):
+ """Answers the given question and handles all the preprocessing and postprocessing steps"""
+ # preprocess the given image and question
+ inputs = processor(image, question, return_tensors="pt")
+ # generate the answer (get output)
+ out = model.generate(**inputs)
+ # post-process the output to get human friendly english text
+ print(processor.decode(out[0], skip_special_tokens=True))
+ return
+
+# sample question 1
+question = "how many dogs are in the picture?"
+get_answer_blip(model, processor, image, question)
+
+# sample question 2
+question = "how will you describe the picture?"
+get_answer_blip(model, processor, image, question)
+
+# sample question 3
+question = "where are they?"
+get_answer_blip(model, processor, image, question)
+
+# sample question 4
+question = "What are they doing?"
+get_answer_blip(model, processor, image, question)
+
+# sample question 5
+question = "What the dog is wearing?"
+get_answer_blip(model, processor, image, question)
+
+class BLIP_VQA:
+ """Custom implementation of the BLIP model. The code has been adapted from the official transformers implementation"""
+
+ def __init__(self, vision_model, text_encoder, text_decoder, processor):
+ """Initialize various objects"""
+ self.vision_model = vision_model
+ self.text_encoder = text_encoder
+ self.text_decoder = text_decoder
+ self.processor = processor
+
+ def preprocess(self, img, ques):
+ """preprocess the inputs: image, question"""
+ # preprocess using the processor
+ inputs = self.processor(img, ques, return_tensors='pt')
+ # store the pixel values of the image, input IDs (i.e., token IDs) of the question and the attention masks separately
+ pixel_values = inputs['pixel_values']
+ input_ids = inputs['input_ids']
+ attention_mask = inputs['attention_mask']
+
+ return pixel_values, input_ids, attention_mask
+
+
+ def generate_output(self, pixel_values, input_ids, attention_mask):
+ """Generates output from the preprocessed input"""
+
+ # get the vision outputs (i.e., the image embeds)
+ vision_outputs = self.vision_model(pixel_values=pixel_values)
+ img_embeds = vision_outputs[0]
+
+ # create attention mask with 1s on all the image embedding positions
+ img_attention_mask = torch.ones(img_embeds.size()[: -1], dtype=torch.long)
+
+ # encode the questions
+ question_outputs = self.text_encoder(input_ids=input_ids,
+ attention_mask=attention_mask,
+ encoder_hidden_states=img_embeds,
+ encoder_attention_mask=img_attention_mask,
+ return_dict=False)
+
+ # create attention mask with 1s on all the question token IDs positions
+ question_embeds = question_outputs[0]
+ question_attention_mask = torch.ones(question_embeds.size()[:-1], dtype=torch.long)
+
+ # initialize the answers with the beginning-of-sentence IDs (bos ID)
+ bos_ids = torch.full((question_embeds.size(0), 1), fill_value=30522)
+
+ # get output from the decoder. These outputs are the generated IDs
+ outputs = self.text_decoder.generate(
+ input_ids=bos_ids,
+ eos_token_id=102,
+ pad_token_id=0,
+ encoder_hidden_states=question_embeds,
+ encoder_attention_mask=question_attention_mask)
+
+ return outputs
+
+
+ def postprocess(self, outputs):
+ """post-process the output generated by the text-decoder"""
+
+ return self.processor.decode(outputs[0], skip_special_tokens=True)
+
+
+ def get_answer(self, image, ques):
+ """Returns human friendly answer to a question"""
+
+ # preprocess
+ pixel_values, input_ids, attention_mask = self.preprocess(image, ques)
+ # generate output
+ outputs = self.generate_output(pixel_values, input_ids, attention_mask)
+ # post-process
+ answer = self.postprocess(outputs)
+ return answer
+
+blip_vqa = BLIP_VQA(vision_model=model.vision_model,
+ text_encoder=model.text_encoder,
+ text_decoder=model.text_decoder,
+ processor=processor)
+
+# sample question 1
+ques = "how will you describe the picture?"
+print(blip_vqa.get_answer(image, ques))
+
+# load another image to test BLIP
+img_url = "https://fastly.picsum.photos/id/11/200/200.jpg?hmac=LBGO0uEpEmAVS8NeUXMqxcIdHGIcu0JiOb5DJr4mtUI"
+image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
+image
+
+# sample question 1
+ques = "Describe the picture"
+print(blip_vqa.get_answer(image, ques))
+
+# sample question 2
+ques = "What is the major color present?"
+print(blip_vqa.get_answer(image, ques))
+
+# sample question 3
+ques = "How's the weather?"
+print(blip_vqa.get_answer(image, ques))
+
+"""# GIT
+
+- https://github.com/huggingface/transformers/blob/main/src/transformers/models/git/modeling_git.py
+- https://huggingface.co/microsoft/git-base-textvqa
+"""
+
+!pip install -qU transformers
+
+from transformers import AutoProcessor, AutoModelForCausalLM
+from huggingface_hub import hf_hub_download
+from PIL import Image
+
+# load the image we will test GIT on
+file_path = hf_hub_download(repo_id="nielsr/textvqa-sample", filename="bus.png", repo_type="dataset")
+image = Image.open(file_path).convert("RGB")
+image
+
+# load necessary components: the processor and the model
+processor = AutoProcessor.from_pretrained("microsoft/git-base-textvqa")
+model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-textvqa")
+
+class GIT_VQA:
+ """Custom implementation of the GIT model for Visual Question Answering (VQA) tasks."""
+
+ def __init__(self, model, processor):
+ """Initializes the model and the processor."""
+ self.model = model
+ self.processor = processor
+ return
+
+
+ def preprocess(self, image, question):
+ """Preprocesses the inputs: image, question"""
+ # process the image to get pixel values
+ pixel_values = self.processor(images=image, return_tensors="pt").pixel_values
+
+ # process the question to get input IDs, but do not add special tokens
+ input_ids = self.processor(text=question, add_special_tokens=False).input_ids
+
+ # add the CLS token at the beginning of the input_ids and format for model input
+ input_ids = [self.processor.tokenizer.cls_token_id] + input_ids
+ input_ids = torch.tensor(input_ids).unsqueeze(0)
+
+ return pixel_values, input_ids
+
+
+ def generate(self, pixel_values, input_ids):
+ """Generates the output from the preprocessed inputs."""
+
+ # generate output using the model with a maximum length of 50 tokens
+ outputs = self.model.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50)
+ return outputs
+
+
+ def postprocess(self, outputs):
+ """Post-processes the output generated by the model."""
+
+ # decode the output, ignoring special tokens
+ answer = self.processor.batch_decode(outputs, skip_special_tokens=True)
+ return answer
+
+
+ def get_answer(self, image, question):
+ """Returns human friendly answer to a question"""
+
+ # preprocess
+ pixel_values, input_ids = self.preprocess(image, question)
+ # generate output
+ outputs = self.generate(pixel_values, input_ids)
+ # post-process
+ answer = self.postprocess(outputs)
+ return answer
+
+# create a GIT instance
+git_vqa = GIT_VQA(model=model, processor=processor)
+
+# sample question 1
+question = "what does the front of the bus say at the top?"
+answer = git_vqa.get_answer(image, question)
+print(answer)
+
+# sample question 2
+question = "what are all the colors present on the bus?"
+answer = git_vqa.get_answer(image, question)
+print(answer)
+
+# sample question 3
+question = "How many wheels you see in the bus?"
+answer = git_vqa.get_answer(image, question)
+print(answer)
+
+# load another image to test BLIP
+img_url = "https://fastly.picsum.photos/id/110/500/500.jpg?hmac=wSHhLFNyJ6k3uM94s6etGQ0WWhmwbdUSiZ9ZDL5Hh2Q"
+image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
+image
+
+# sample question 1
+question = "Is it night in the image?"
+answer = git_vqa.get_answer(image, question)
+print(answer)
+
diff --git a/python-for-multimedia/compress-image/README.md b/python-for-multimedia/compress-image/README.md
index 32f51450..919414cc 100644
--- a/python-for-multimedia/compress-image/README.md
+++ b/python-for-multimedia/compress-image/README.md
@@ -1,4 +1,56 @@
-# [How to Compress Images in Python](https://www.thepythoncode.com/article/compress-images-in-python)
-To run this:
-- `pip3 install -r requirements.txt`
-- `python compress_image.py --help`
\ No newline at end of file
+# Compress Image
+
+Advanced Image Compressor with Batch Processing
+
+This script provides advanced image compression and resizing features using Python and Pillow.
+
+## Features
+
+- Batch processing of multiple images or directories
+- Lossy and lossless compression (PNG/WebP)
+- Optional JPEG conversion
+- Resize by ratio or explicit dimensions
+- Preserve or strip metadata (EXIF)
+- Custom output directory
+- Progress bar using `tqdm`
+- Detailed logging
+
+## Requirements
+
+- Python 3.6+
+- [Pillow](https://pypi.org/project/Pillow/)
+- [tqdm](https://pypi.org/project/tqdm/)
+
+Install dependencies:
+
+```bash
+pip install pillow tqdm
+```
+
+## Usage
+
+```bash
+python compress_image.py [options] [ ...]
+```
+
+## Options
+- `-o`, `--output-dir`: Output directory (default: same as input)
+- `-q`, `--quality`: Compression quality (0-100, default: 85)
+- `-r`, `--resize-ratio`: Resize ratio (0-1, default: 1.0)
+- `-w`, `--width`: Output width (requires `--height`)
+- `-hh`, `--height`: Output height (requires `--width`)
+- `-j`, `--to-jpg`: Convert output to JPEG
+- `-m`, `--no-metadata`: Strip metadata (default: preserve)
+- `-l`, `--lossless`: Use lossless compression (PNG/WEBP)
+
+## Examples
+
+```bash
+python compress_image.py image.jpg -r 0.5 -q 80 -j
+python compress_image.py images/ -o output/ -m
+python compress_image.py image.png -l
+```
+
+## License
+
+MIT License.
diff --git a/python-for-multimedia/compress-image/compress_image.py b/python-for-multimedia/compress-image/compress_image.py
index ed16d06a..f1696aa0 100644
--- a/python-for-multimedia/compress-image/compress_image.py
+++ b/python-for-multimedia/compress-image/compress_image.py
@@ -1,88 +1,104 @@
import os
from PIL import Image
+import argparse
+import logging
+from tqdm import tqdm
+# Configure logging
+logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
+logger = logging.getLogger(__name__)
def get_size_format(b, factor=1024, suffix="B"):
- """
- Scale bytes to its proper byte format
- e.g:
- 1253656 => '1.20MB'
- 1253656678 => '1.17GB'
- """
+ """Scale bytes to its proper byte format."""
for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]:
if b < factor:
return f"{b:.2f}{unit}{suffix}"
b /= factor
return f"{b:.2f}Y{suffix}"
-
-
-def compress_img(image_name, new_size_ratio=0.9, quality=90, width=None, height=None, to_jpg=True):
- # load the image to memory
- img = Image.open(image_name)
- # print the original image shape
- print("[*] Image shape:", img.size)
- # get the original image size in bytes
- image_size = os.path.getsize(image_name)
- # print the size before compression/resizing
- print("[*] Size before compression:", get_size_format(image_size))
- if new_size_ratio < 1.0:
- # if resizing ratio is below 1.0, then multiply width & height with this ratio to reduce image size
- img = img.resize((int(img.size[0] * new_size_ratio), int(img.size[1] * new_size_ratio)), Image.ANTIALIAS)
- # print new image shape
- print("[+] New Image shape:", img.size)
- elif width and height:
- # if width and height are set, resize with them instead
- img = img.resize((width, height), Image.ANTIALIAS)
- # print new image shape
- print("[+] New Image shape:", img.size)
- # split the filename and extension
- filename, ext = os.path.splitext(image_name)
- # make new filename appending _compressed to the original file name
- if to_jpg:
- # change the extension to JPEG
- new_filename = f"{filename}_compressed.jpg"
- else:
- # retain the same extension of the original image
- new_filename = f"{filename}_compressed{ext}"
+def compress_image(
+ input_path,
+ output_dir=None,
+ quality=85,
+ resize_ratio=1.0,
+ width=None,
+ height=None,
+ to_jpg=False,
+ preserve_metadata=True,
+ lossless=False,
+):
+ """Compress an image with advanced options."""
try:
- # save the image with the corresponding quality and optimize set to True
- img.save(new_filename, quality=quality, optimize=True)
- except OSError:
- # convert the image to RGB mode first
- img = img.convert("RGB")
- # save the image with the corresponding quality and optimize set to True
- img.save(new_filename, quality=quality, optimize=True)
- print("[+] New file saved:", new_filename)
- # get the new image size in bytes
- new_image_size = os.path.getsize(new_filename)
- # print the new size in a good format
- print("[+] Size after compression:", get_size_format(new_image_size))
- # calculate the saving bytes
- saving_diff = new_image_size - image_size
- # print the saving percentage
- print(f"[+] Image size change: {saving_diff/image_size*100:.2f}% of the original image size.")
-
-
+ img = Image.open(input_path)
+ logger.info(f"[*] Processing: {os.path.basename(input_path)}")
+ logger.info(f"[*] Original size: {get_size_format(os.path.getsize(input_path))}")
+
+ # Resize if needed
+ if resize_ratio < 1.0:
+ new_size = (int(img.size[0] * resize_ratio), int(img.size[1] * resize_ratio))
+ img = img.resize(new_size, Image.LANCZOS)
+ logger.info(f"[+] Resized to: {new_size}")
+ elif width and height:
+ img = img.resize((width, height), Image.LANCZOS)
+ logger.info(f"[+] Resized to: {width}x{height}")
+
+ # Prepare output path
+ filename, ext = os.path.splitext(os.path.basename(input_path))
+ output_ext = ".jpg" if to_jpg else ext
+ output_filename = f"{filename}_compressed{output_ext}"
+ output_path = os.path.join(output_dir or os.path.dirname(input_path), output_filename)
+
+ # Save with options
+ save_kwargs = {"quality": quality, "optimize": True}
+ if not preserve_metadata:
+ save_kwargs["exif"] = b"" # Strip metadata
+ if lossless and ext.lower() in (".png", ".webp"):
+ save_kwargs["lossless"] = True
+
+ try:
+ img.save(output_path, **save_kwargs)
+ except OSError:
+ img = img.convert("RGB")
+ img.save(output_path, **save_kwargs)
+
+ logger.info(f"[+] Saved to: {output_path}")
+ logger.info(f"[+] New size: {get_size_format(os.path.getsize(output_path))}")
+ except Exception as e:
+ logger.error(f"[!] Error processing {input_path}: {e}")
+
+def batch_compress(
+ input_paths,
+ output_dir=None,
+ quality=85,
+ resize_ratio=1.0,
+ width=None,
+ height=None,
+ to_jpg=False,
+ preserve_metadata=True,
+ lossless=False,
+):
+ """Compress multiple images."""
+ if output_dir and not os.path.exists(output_dir):
+ os.makedirs(output_dir, exist_ok=True)
+ for path in tqdm(input_paths, desc="Compressing images"):
+ compress_image(path, output_dir, quality, resize_ratio, width, height, to_jpg, preserve_metadata, lossless)
+
if __name__ == "__main__":
- import argparse
- parser = argparse.ArgumentParser(description="Simple Python script for compressing and resizing images")
- parser.add_argument("image", help="Target image to compress and/or resize")
- parser.add_argument("-j", "--to-jpg", action="https://github.com/store_true", help="Whether to convert the image to the JPEG format")
- parser.add_argument("-q", "--quality", type=int, help="Quality ranging from a minimum of 0 (worst) to a maximum of 95 (best). Default is 90", default=90)
- parser.add_argument("-r", "--resize-ratio", type=float, help="Resizing ratio from 0 to 1, setting to 0.5 will multiply width & height of the image by 0.5. Default is 1.0", default=1.0)
- parser.add_argument("-w", "--width", type=int, help="The new width image, make sure to set it with the `height` parameter")
- parser.add_argument("-hh", "--height", type=int, help="The new height for the image, make sure to set it with the `width` parameter")
+ parser = argparse.ArgumentParser(description="Advanced Image Compressor with Batch Processing")
+ parser.add_argument("input", nargs='+', help="Input image(s) or directory")
+ parser.add_argument("-o", "--output-dir", help="Output directory (default: same as input)")
+ parser.add_argument("-q", "--quality", type=int, default=85, help="Compression quality (0-100)")
+ parser.add_argument("-r", "--resize-ratio", type=float, default=1.0, help="Resize ratio (0-1)")
+ parser.add_argument("-w", "--width", type=int, help="Output width (requires --height)")
+ parser.add_argument("-hh", "--height", type=int, help="Output height (requires --width)")
+ parser.add_argument("-j", "--to-jpg", action="https://github.com/store_true", help="Convert output to JPEG")
+ parser.add_argument("-m", "--no-metadata", action="https://github.com/store_false", help="Strip metadata")
+ parser.add_argument("-l", "--lossless", action="https://github.com/store_true", help="Use lossless compression (PNG/WEBP)")
+
args = parser.parse_args()
- # print the passed arguments
- print("="*50)
- print("[*] Image:", args.image)
- print("[*] To JPEG:", args.to_jpg)
- print("[*] Quality:", args.quality)
- print("[*] Resizing ratio:", args.resize_ratio)
- if args.width and args.height:
- print("[*] Width:", args.width)
- print("[*] Height:", args.height)
- print("="*50)
- # compress the image
- compress_img(args.image, args.resize_ratio, args.quality, args.width, args.height, args.to_jpg)
\ No newline at end of file
+ input_paths = []
+ for path in args.input:
+ if os.path.isdir(path): input_paths.extend(os.path.join(path, f) for f in os.listdir(path) if f.lower().endswith((".jpg",".jpeg",".png",".webp")))
+ else: input_paths.append(path)
+ if not input_paths: logger.error("No valid images found!"); exit(1)
+ batch_compress(input_paths, args.output_dir, args.quality, args.resize_ratio, args.width, args.height, args.to_jpg, args.no_metadata, args.lossless)
diff --git a/python-for-multimedia/create-video-from-images/README.md b/python-for-multimedia/create-video-from-images/README.md
new file mode 100644
index 00000000..43cce95b
--- /dev/null
+++ b/python-for-multimedia/create-video-from-images/README.md
@@ -0,0 +1 @@
+# [How to Create Videos from Images in Python](https://thepythoncode.com/article/create-a-video-from-images-opencv-python)
\ No newline at end of file
diff --git a/python-for-multimedia/create-video-from-images/create_video_from_images.py b/python-for-multimedia/create-video-from-images/create_video_from_images.py
new file mode 100644
index 00000000..e81efd9a
--- /dev/null
+++ b/python-for-multimedia/create-video-from-images/create_video_from_images.py
@@ -0,0 +1,43 @@
+import cv2
+import argparse
+import glob
+from pathlib import Path
+import shutil
+
+# Create an ArgumentParser object to handle command-line arguments
+parser = argparse.ArgumentParser(description='Create a video from a set of images')
+
+# Define the command-line arguments
+parser.add_argument('output', type=str, help='Output path for video file')
+parser.add_argument('input', nargs='+', type=str, help='Glob pattern for input images')
+parser.add_argument('-fps', type=int, help='FPS for video file', default=24)
+
+# Parse the command-line arguments
+args = parser.parse_args()
+
+# Create a list of all the input image files
+FILES = []
+for i in args.input:
+ FILES += glob.glob(i)
+
+# Get the filename from the output path
+filename = Path(args.output).name
+print(f'Creating video "{filename}" from images "{FILES}"')
+
+# Load the first image to get the frame size
+frame = cv2.imread(FILES[0])
+height, width, layers = frame.shape
+
+# Create a VideoWriter object to write the video file
+fourcc = cv2.VideoWriter_fourcc(*'mp4v')
+video = cv2.VideoWriter(filename=filename, fourcc=fourcc, fps=args.fps, frameSize=(width, height))
+
+# Loop through the input images and add them to the video
+for image_path in FILES:
+ print(f'Adding image "{image_path}" to video "{args.output}"... ')
+ video.write(cv2.imread(image_path))
+
+# Release the VideoWriter and move the output file to the specified location
+cv2.destroyAllWindows()
+video.release()
+shutil.move(filename, args.output)
diff --git a/python-for-multimedia/create-video-from-images/requirements.txt b/python-for-multimedia/create-video-from-images/requirements.txt
new file mode 100644
index 00000000..1db7aea1
--- /dev/null
+++ b/python-for-multimedia/create-video-from-images/requirements.txt
@@ -0,0 +1 @@
+opencv-python
\ No newline at end of file
diff --git a/python-for-multimedia/recover-deleted-files/README.md b/python-for-multimedia/recover-deleted-files/README.md
new file mode 100644
index 00000000..9b57b100
--- /dev/null
+++ b/python-for-multimedia/recover-deleted-files/README.md
@@ -0,0 +1 @@
+# [How to Recover Deleted Files with Python](https://thepythoncode.com/article/how-to-recover-deleted-file-with-python)
\ No newline at end of file
diff --git a/python-for-multimedia/recover-deleted-files/file_recovery.py b/python-for-multimedia/recover-deleted-files/file_recovery.py
new file mode 100644
index 00000000..057995c4
--- /dev/null
+++ b/python-for-multimedia/recover-deleted-files/file_recovery.py
@@ -0,0 +1,552 @@
+
+import os
+import sys
+import argparse
+import struct
+import time
+import logging
+import subprocess
+import signal
+from datetime import datetime, timedelta
+from pathlib import Path
+import binascii
+
+# File signatures (magic numbers) for common file types
+FILE_SIGNATURES = {
+ 'jpg': [bytes([0xFF, 0xD8, 0xFF, 0xE0]), bytes([0xFF, 0xD8, 0xFF, 0xE1])],
+ 'png': [bytes([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])],
+ 'gif': [bytes([0x47, 0x49, 0x46, 0x38, 0x37, 0x61]), bytes([0x47, 0x49, 0x46, 0x38, 0x39, 0x61])],
+ 'pdf': [bytes([0x25, 0x50, 0x44, 0x46])],
+ 'zip': [bytes([0x50, 0x4B, 0x03, 0x04])],
+ 'docx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature
+ 'xlsx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature
+ 'pptx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature
+ 'mp3': [bytes([0x49, 0x44, 0x33])],
+ 'mp4': [bytes([0x00, 0x00, 0x00, 0x18, 0x66, 0x74, 0x79, 0x70])],
+ 'avi': [bytes([0x52, 0x49, 0x46, 0x46])],
+}
+
+# Additional validation patterns to check after finding the signature
+# This helps reduce false positives
+VALIDATION_PATTERNS = {
+ 'docx': [b'word/', b'[Content_Types].xml'],
+ 'xlsx': [b'xl/', b'[Content_Types].xml'],
+ 'pptx': [b'ppt/', b'[Content_Types].xml'],
+ 'zip': [b'PK\x01\x02'], # Central directory header
+ 'pdf': [b'obj', b'endobj'],
+}
+
+# File endings (trailer signatures) for some file types
+FILE_TRAILERS = {
+ 'jpg': bytes([0xFF, 0xD9]),
+ 'png': bytes([0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82]),
+ 'gif': bytes([0x00, 0x3B]),
+ 'pdf': bytes([0x25, 0x25, 0x45, 0x4F, 0x46]),
+}
+
+# Maximum file sizes to prevent recovering corrupted files
+MAX_FILE_SIZES = {
+ 'jpg': 30 * 1024 * 1024, # 30MB
+ 'png': 50 * 1024 * 1024, # 50MB
+ 'gif': 20 * 1024 * 1024, # 20MB
+ 'pdf': 100 * 1024 * 1024, # 100MB
+ 'zip': 200 * 1024 * 1024, # 200MB
+ 'docx': 50 * 1024 * 1024, # 50MB
+ 'xlsx': 50 * 1024 * 1024, # 50MB
+ 'pptx': 100 * 1024 * 1024, # 100MB
+ 'mp3': 50 * 1024 * 1024, # 50MB
+ 'mp4': 1024 * 1024 * 1024, # 1GB
+ 'avi': 1024 * 1024 * 1024, # 1GB
+}
+
+class FileRecoveryTool:
+ def __init__(self, source, output_dir, file_types=None, deep_scan=False,
+ block_size=512, log_level=logging.INFO, skip_existing=True,
+ max_scan_size=None, timeout_minutes=None):
+ """
+ Initialize the file recovery tool
+
+ Args:
+ source (str): Path to the source device or directory
+ output_dir (str): Directory to save recovered files
+ file_types (list): List of file types to recover
+ deep_scan (bool): Whether to perform a deep scan
+ block_size (int): Block size for reading data
+ log_level (int): Logging level
+ skip_existing (bool): Skip existing files in output directory
+ max_scan_size (int): Maximum number of bytes to scan
+ timeout_minutes (int): Timeout in minutes
+ """
+ self.source = source
+ self.output_dir = Path(output_dir)
+ self.file_types = file_types if file_types else list(FILE_SIGNATURES.keys())
+ self.deep_scan = deep_scan
+ self.block_size = block_size
+ self.skip_existing = skip_existing
+ self.max_scan_size = max_scan_size
+ self.timeout_minutes = timeout_minutes
+ self.timeout_reached = False
+
+ # Setup logging
+ self.setup_logging(log_level)
+
+ # Create output directory if it doesn't exist
+ self.output_dir.mkdir(parents=True, exist_ok=True)
+
+ # Statistics
+ self.stats = {
+ 'total_files_recovered': 0,
+ 'recovered_by_type': {},
+ 'start_time': time.time(),
+ 'bytes_scanned': 0,
+ 'false_positives': 0
+ }
+
+ for file_type in self.file_types:
+ self.stats['recovered_by_type'][file_type] = 0
+
+ def setup_logging(self, log_level):
+ """Set up logging configuration"""
+ logging.basicConfig(
+ level=log_level,
+ format='%(asctime)s - %(levelname)s - %(message)s',
+ handlers=[
+ logging.StreamHandler(),
+ logging.FileHandler(f"recovery_{datetime.now().strftime('%Y%m%d_%H%M%S')}.log")
+ ]
+ )
+ self.logger = logging.getLogger('file_recovery')
+
+ def _setup_timeout(self):
+ """Set up a timeout handler"""
+ if self.timeout_minutes:
+ def timeout_handler(signum, frame):
+ self.logger.warning(f"Timeout of {self.timeout_minutes} minutes reached!")
+ self.timeout_reached = True
+
+ # Set the timeout
+ signal.signal(signal.SIGALRM, timeout_handler)
+ signal.alarm(int(self.timeout_minutes * 60))
+
+ def get_device_size(self):
+ """Get the size of the device or file"""
+ if os.path.isfile(self.source):
+ # Regular file
+ return os.path.getsize(self.source)
+ else:
+ # Block device
+ try:
+ # Try using blockdev command (Linux)
+ result = subprocess.run(['blockdev', '--getsize64', self.source],
+ capture_output=True, text=True, check=True)
+ return int(result.stdout.strip())
+ except (subprocess.SubprocessError, FileNotFoundError):
+ try:
+ # Try using ioctl (requires root)
+ import fcntl
+ with open(self.source, 'rb') as fd:
+ # BLKGETSIZE64 = 0x80081272
+ buf = bytearray(8)
+ fcntl.ioctl(fd, 0x80081272, buf)
+ return struct.unpack('L', buf)[0]
+ except:
+ # Last resort: try to seek to the end
+ try:
+ with open(self.source, 'rb') as fd:
+ fd.seek(0, 2) # Seek to end
+ return fd.tell()
+ except:
+ self.logger.warning("Could not determine device size. Using fallback size.")
+ # Fallback to a reasonable size for testing
+ return 1024 * 1024 * 1024 # 1GB
+
+ def scan_device(self):
+ """Scan the device for deleted files"""
+ self.logger.info(f"Starting scan of {self.source}")
+ self.logger.info(f"Looking for file types: {', '.join(self.file_types)}")
+
+ try:
+ # Get device size
+ device_size = self.get_device_size()
+ self.logger.info(f"Device size: {self._format_size(device_size)}")
+
+ # Set up timeout if specified
+ if self.timeout_minutes:
+ self._setup_timeout()
+ self.logger.info(f"Timeout set for {self.timeout_minutes} minutes")
+
+ with open(self.source, 'rb', buffering=0) as device: # buffering=0 for direct I/O
+ self._scan_device_data(device, device_size)
+
+ except (IOError, OSError) as e:
+ self.logger.error(f"Error accessing source: {e}")
+ return False
+
+ self._print_summary()
+ return True
+
+ def _scan_device_data(self, device, device_size):
+ """Scan the device data for file signatures"""
+ position = 0
+
+ # Limit scan size if specified
+ if self.max_scan_size and self.max_scan_size < device_size:
+ self.logger.info(f"Limiting scan to first {self._format_size(self.max_scan_size)} of device")
+ device_size = self.max_scan_size
+
+ # Create subdirectories for each file type
+ for file_type in self.file_types:
+ (self.output_dir / file_type).mkdir(exist_ok=True)
+
+ scan_start_time = time.time()
+ last_progress_time = scan_start_time
+
+ # Read the device in blocks
+ while position < device_size:
+ # Check if timeout reached
+ if self.timeout_reached:
+ self.logger.warning("Stopping scan due to timeout")
+ break
+
+ try:
+ # Seek to position first
+ device.seek(position)
+
+ # Read a block of data
+ data = device.read(self.block_size)
+ if not data:
+ break
+
+ self.stats['bytes_scanned'] += len(data)
+
+ # Check for file signatures in this block
+ for file_type in self.file_types:
+ signatures = FILE_SIGNATURES.get(file_type, [])
+
+ for signature in signatures:
+ sig_pos = data.find(signature)
+
+ if sig_pos != -1:
+ # Found a file signature, try to recover the file
+ absolute_pos = position + sig_pos
+ device.seek(absolute_pos)
+
+ self.logger.debug(f"Found {file_type} signature at position {absolute_pos}")
+
+ # Recover the file
+ if self._recover_file(device, file_type, absolute_pos):
+ self.stats['total_files_recovered'] += 1
+ self.stats['recovered_by_type'][file_type] += 1
+ else:
+ self.stats['false_positives'] += 1
+
+ # Reset position to continue scanning
+ device.seek(position + self.block_size)
+
+ # Update position and show progress
+ position += self.block_size
+ current_time = time.time()
+
+ # Show progress every 5MB or 10 seconds, whichever comes first
+ if (position % (5 * 1024 * 1024) == 0) or (current_time - last_progress_time >= 10):
+ percent = (position / device_size) * 100 if device_size > 0 else 0
+ elapsed = current_time - self.stats['start_time']
+
+ # Calculate estimated time remaining
+ if position > 0 and device_size > 0:
+ bytes_per_second = position / elapsed if elapsed > 0 else 0
+ remaining_bytes = device_size - position
+ eta_seconds = remaining_bytes / bytes_per_second if bytes_per_second > 0 else 0
+ eta_str = str(timedelta(seconds=int(eta_seconds)))
+ else:
+ eta_str = "unknown"
+
+ self.logger.info(f"Progress: {percent:.2f}% ({self._format_size(position)} / {self._format_size(device_size)}) - "
+ f"{self.stats['total_files_recovered']} files recovered - "
+ f"Elapsed: {timedelta(seconds=int(elapsed))} - ETA: {eta_str}")
+ last_progress_time = current_time
+
+ except Exception as e:
+ self.logger.error(f"Error reading at position {position}: {e}")
+ position += self.block_size # Skip this block and continue
+
+ def _validate_file_content(self, data, file_type):
+ """
+ Additional validation to reduce false positives
+
+ Args:
+ data: File data to validate
+ file_type: Type of file to validate
+
+ Returns:
+ bool: True if file content appears valid
+ """
+ # Check minimum size
+ if len(data) < 100:
+ return False
+
+ # Check for validation patterns
+ patterns = VALIDATION_PATTERNS.get(file_type, [])
+ if patterns:
+ for pattern in patterns:
+ if pattern in data:
+ return True
+ return False # None of the patterns were found
+
+ # For file types without specific validation patterns
+ return True
+
+ def _recover_file(self, device, file_type, start_position):
+ """
+ Recover a file of the given type starting at the given position
+
+ Args:
+ device: Open file handle to the device
+ file_type: Type of file to recover
+ start_position: Starting position of the file
+
+ Returns:
+ bool: True if file was recovered successfully
+ """
+ max_size = MAX_FILE_SIZES.get(file_type, 10 * 1024 * 1024) # Default to 10MB
+ trailer = FILE_TRAILERS.get(file_type)
+
+ # Generate a unique filename
+ filename = f"{file_type}_{start_position}_{int(time.time())}_{binascii.hexlify(os.urandom(4)).decode()}.{file_type}"
+ output_path = self.output_dir / file_type / filename
+
+ if self.skip_existing and output_path.exists():
+ self.logger.debug(f"Skipping existing file: {output_path}")
+ return False
+
+ # Save the current position to restore later
+ current_pos = device.tell()
+
+ try:
+ # Seek to the start of the file
+ device.seek(start_position)
+
+ # Read the file data
+ if trailer and self.deep_scan:
+ # If we know the trailer and deep scan is enabled, read until trailer
+ file_data = self._read_until_trailer(device, trailer, max_size)
+ else:
+ # Otherwise, use heuristics to determine file size
+ file_data = self._read_file_heuristic(device, file_type, max_size)
+
+ if not file_data or len(file_data) < 100: # Ignore very small files
+ return False
+
+ # Additional validation to reduce false positives
+ if not self._validate_file_content(file_data, file_type):
+ self.logger.debug(f"Skipping invalid {file_type} file at position {start_position}")
+ return False
+
+ # Write the recovered file
+ with open(output_path, 'wb') as f:
+ f.write(file_data)
+
+ self.logger.info(f"Recovered {file_type} file: {filename} ({self._format_size(len(file_data))})")
+ return True
+
+ except Exception as e:
+ self.logger.error(f"Error recovering file at position {start_position}: {e}")
+ return False
+ finally:
+ # Restore the original position
+ try:
+ device.seek(current_pos)
+ except:
+ pass # Ignore seek errors in finally block
+
+ def _read_until_trailer(self, device, trailer, max_size):
+ """Read data until a trailer signature is found or max size is reached"""
+ buffer = bytearray()
+ chunk_size = 4096
+
+ while len(buffer) < max_size:
+ try:
+ chunk = device.read(chunk_size)
+ if not chunk:
+ break
+
+ buffer.extend(chunk)
+
+ # Check if trailer is in the buffer
+ trailer_pos = buffer.find(trailer, max(0, len(buffer) - len(trailer) - chunk_size))
+ if trailer_pos != -1:
+ # Found trailer, return data up to and including the trailer
+ return buffer[:trailer_pos + len(trailer)]
+ except Exception as e:
+ self.logger.error(f"Error reading chunk: {e}")
+ break
+
+ # If we reached max size without finding a trailer, return what we have
+ return buffer if len(buffer) > 100 else None
+
+ def _read_file_heuristic(self, device, file_type, max_size):
+ """
+ Use heuristics to determine file size when trailer is unknown
+ This is a simplified approach - real tools use more sophisticated methods
+ """
+ buffer = bytearray()
+ chunk_size = 4096
+ valid_chunks = 0
+ invalid_chunks = 0
+
+ # For Office documents and ZIP files, read a larger initial chunk to validate
+ initial_chunk_size = 16384 if file_type in ['docx', 'xlsx', 'pptx', 'zip'] else chunk_size
+
+ # Read initial chunk for validation
+ initial_chunk = device.read(initial_chunk_size)
+ if not initial_chunk:
+ return None
+
+ buffer.extend(initial_chunk)
+
+ # For Office documents, check if it contains required elements
+ if file_type in ['docx', 'xlsx', 'pptx', 'zip']:
+ # Basic validation for Office Open XML files
+ if file_type == 'docx' and b'word/' not in initial_chunk:
+ return None
+ if file_type == 'xlsx' and b'xl/' not in initial_chunk:
+ return None
+ if file_type == 'pptx' and b'ppt/' not in initial_chunk:
+ return None
+ if file_type == 'zip' and b'PK\x01\x02' not in initial_chunk:
+ return None
+
+ # Continue reading chunks
+ while len(buffer) < max_size:
+ try:
+ chunk = device.read(chunk_size)
+ if not chunk:
+ break
+
+ buffer.extend(chunk)
+
+ # Simple heuristic: for binary files, check if chunk contains too many non-printable characters
+ # This is a very basic approach and would need to be refined for real-world use
+ if file_type in ['jpg', 'png', 'gif', 'pdf', 'zip', 'docx', 'xlsx', 'pptx', 'mp3', 'mp4', 'avi']:
+ # For binary files, we continue reading until we hit max size or end of device
+ valid_chunks += 1
+
+ # For ZIP-based formats, check for corruption
+ if file_type in ['zip', 'docx', 'xlsx', 'pptx'] and b'PK' not in chunk and valid_chunks > 10:
+ # If we've read several chunks and don't see any more PK signatures, we might be past the file
+ invalid_chunks += 1
+
+ else:
+ # For text files, we could check for text validity
+ printable_ratio = sum(32 <= b <= 126 or b in (9, 10, 13) for b in chunk) / len(chunk)
+ if printable_ratio < 0.7: # If less than 70% printable characters
+ invalid_chunks += 1
+ else:
+ valid_chunks += 1
+
+ # If we have too many invalid chunks in a row, stop
+ if invalid_chunks > 3:
+ return buffer[:len(buffer) - (invalid_chunks * chunk_size)]
+ except Exception as e:
+ self.logger.error(f"Error reading chunk in heuristic: {e}")
+ break
+
+ return buffer
+
+ def _format_size(self, size_bytes):
+ """Format size in bytes to a human-readable string"""
+ for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
+ if size_bytes < 1024 or unit == 'TB':
+ return f"{size_bytes:.2f} {unit}"
+ size_bytes /= 1024
+
+ def _print_summary(self):
+ """Print a summary of the recovery operation"""
+ elapsed = time.time() - self.stats['start_time']
+
+ self.logger.info("=" * 50)
+ self.logger.info("Recovery Summary")
+ self.logger.info("=" * 50)
+ self.logger.info(f"Total files recovered: {self.stats['total_files_recovered']}")
+ self.logger.info(f"False positives detected and skipped: {self.stats['false_positives']}")
+ self.logger.info(f"Total data scanned: {self._format_size(self.stats['bytes_scanned'])}")
+ self.logger.info(f"Time elapsed: {timedelta(seconds=int(elapsed))}")
+ self.logger.info("Files recovered by type:")
+
+ for file_type, count in self.stats['recovered_by_type'].items():
+ if count > 0:
+ self.logger.info(f" - {file_type}: {count}")
+
+ if self.timeout_reached:
+ self.logger.info("Note: Scan was stopped due to timeout")
+
+ self.logger.info("=" * 50)
+
+
+def main():
+ """Main function to parse arguments and run the recovery tool"""
+ parser = argparse.ArgumentParser(description='File Recovery Tool - Recover deleted files from storage devices')
+
+ parser.add_argument('source', help='Source device or directory to recover files from (e.g., /dev/sdb, /media/usb)')
+ parser.add_argument('output', help='Directory to save recovered files')
+
+ parser.add_argument('-t', '--types', nargs='+', choices=FILE_SIGNATURES.keys(), default=None,
+ help='File types to recover (default: all supported types)')
+
+ parser.add_argument('-d', '--deep-scan', action='https://github.com/store_true',
+ help='Perform a deep scan (slower but more thorough)')
+
+ parser.add_argument('-b', '--block-size', type=int, default=512,
+ help='Block size for reading data (default: 512 bytes)')
+
+ parser.add_argument('-v', '--verbose', action='https://github.com/store_true',
+ help='Enable verbose output')
+
+ parser.add_argument('-q', '--quiet', action='https://github.com/store_true',
+ help='Suppress all output except errors')
+
+ parser.add_argument('--no-skip', action='https://github.com/store_true',
+ help='Do not skip existing files in output directory')
+
+ parser.add_argument('--max-size', type=int,
+ help='Maximum size to scan in MB (e.g., 1024 for 1GB)')
+
+ parser.add_argument('--timeout', type=int, default=None,
+ help='Stop scanning after specified minutes')
+
+ args = parser.parse_args()
+
+ # Set logging level based on verbosity
+ if args.quiet:
+ log_level = logging.ERROR
+ elif args.verbose:
+ log_level = logging.DEBUG
+ else:
+ log_level = logging.INFO
+
+ # Convert max size from MB to bytes if specified
+ max_scan_size = args.max_size * 1024 * 1024 if args.max_size else None
+
+ # Create and run the recovery tool
+ recovery_tool = FileRecoveryTool(
+ source=args.source,
+ output_dir=args.output,
+ file_types=args.types,
+ deep_scan=args.deep_scan,
+ block_size=args.block_size,
+ log_level=log_level,
+ skip_existing=not args.no_skip,
+ max_scan_size=max_scan_size,
+ timeout_minutes=args.timeout
+ )
+
+ try:
+ recovery_tool.scan_device()
+ except KeyboardInterrupt:
+ print("\nRecovery process interrupted by user.")
+ recovery_tool._print_summary()
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/python-for-multimedia/remove-metadata-from-images/README.md b/python-for-multimedia/remove-metadata-from-images/README.md
new file mode 100644
index 00000000..f1fd7f5c
--- /dev/null
+++ b/python-for-multimedia/remove-metadata-from-images/README.md
@@ -0,0 +1 @@
+# [How to Remove Metadata from an Image in Python](https://thepythoncode.com/article/how-to-clear-image-metadata-in-python)
\ No newline at end of file
diff --git a/python-for-multimedia/remove-metadata-from-images/clear_metadata.py b/python-for-multimedia/remove-metadata-from-images/clear_metadata.py
new file mode 100644
index 00000000..093f6432
--- /dev/null
+++ b/python-for-multimedia/remove-metadata-from-images/clear_metadata.py
@@ -0,0 +1,33 @@
+# Import necessary libraries.
+import argparse
+from PIL import Image
+
+
+# Function to clear Metadata from a specified image.
+def clear_all_metadata(imgname):
+
+ # Open the image file
+ img = Image.open(imgname)
+
+ # Read the image data, excluding metadata.
+ data = list(img.getdata())
+
+ # Create a new image with the same mode and size but without metadata.
+ img_without_metadata = Image.new(img.mode, img.size)
+ img_without_metadata.putdata(data)
+
+ # Save the new image over the original file, effectively removing metadata.
+ img_without_metadata.save(imgname)
+
+ print(f"Metadata successfully cleared from '{imgname}'.")
+
+# Setup command line argument parsing
+parser = argparse.ArgumentParser(description="Remove metadata from an image file.")
+parser.add_argument("img", help="Image file from which to remove metadata")
+
+# Parse arguments
+args = parser.parse_args()
+
+# If an image file is provided, clear its metadata
+if args.img:
+ clear_all_metadata(args.img)
diff --git a/python-for-multimedia/remove-metadata-from-images/requirements.txt b/python-for-multimedia/remove-metadata-from-images/requirements.txt
new file mode 100644
index 00000000..5873a222
--- /dev/null
+++ b/python-for-multimedia/remove-metadata-from-images/requirements.txt
@@ -0,0 +1 @@
+Pillow
\ No newline at end of file
diff --git a/python-standard-library/argparse/1_simple_example.py b/python-standard-library/argparse/1_simple_example.py
new file mode 100644
index 00000000..cbd22bbf
--- /dev/null
+++ b/python-standard-library/argparse/1_simple_example.py
@@ -0,0 +1,7 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument('input', help='Input file to process.')
+
+args = parser.parse_args()
+print(f'Processing file: {args.input}')
diff --git a/python-standard-library/argparse/2.2_default_and_required.py b/python-standard-library/argparse/2.2_default_and_required.py
new file mode 100644
index 00000000..f4d4c276
--- /dev/null
+++ b/python-standard-library/argparse/2.2_default_and_required.py
@@ -0,0 +1,10 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument('input', help='Input file to process.')
+# parser.add_argument('-o', '--output', default='output.txt', help='Output file.')
+parser.add_argument('-o', '--output', required=True, help='Output file.')
+
+args = parser.parse_args()
+print(f'Processing file: {args.input}')
+print(f"Writing to file: {args.output}")
diff --git a/python-standard-library/argparse/2.3_choices.py b/python-standard-library/argparse/2.3_choices.py
new file mode 100644
index 00000000..01db0c06
--- /dev/null
+++ b/python-standard-library/argparse/2.3_choices.py
@@ -0,0 +1,9 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument('input', help='Input file to process.')
+parser.add_argument('-m', '--mode', choices=['add', 'subtract', 'multiply', 'divide'], help='Calculation mode.')
+
+args = parser.parse_args()
+print(f'Processing file: {args.input}')
+print(f"Mode: {args.mode}")
diff --git a/python-standard-library/argparse/2.5_nargs.py b/python-standard-library/argparse/2.5_nargs.py
new file mode 100644
index 00000000..88b9be93
--- /dev/null
+++ b/python-standard-library/argparse/2.5_nargs.py
@@ -0,0 +1,10 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument('--values', nargs=3)
+# parser.add_argument('--value', nargs='?', default='default_value')
+# parser.add_argument('--values', nargs='*')
+# parser.add_argument('--values', nargs='+')
+
+args = parser.parse_args()
+print(f"Values: {args.values}")
diff --git a/python-standard-library/argparse/2.6_builtin_actions.py b/python-standard-library/argparse/2.6_builtin_actions.py
new file mode 100644
index 00000000..256932e8
--- /dev/null
+++ b/python-standard-library/argparse/2.6_builtin_actions.py
@@ -0,0 +1,13 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument('--foo', action='https://github.com/store', help='Store the value of foo.')
+parser.add_argument('--enable', action='https://github.com/store_true', help='Enable the feature.')
+parser.add_argument('--disable', action='https://github.com/store_false', help='Disable the feature.')
+parser.add_argument('--level', action='https://github.com/store_const', const='advanced', help='Set level to advanced.')
+parser.add_argument('--values', action='https://github.com/append', help='Append values to a list.')
+parser.add_argument('--add_const', action='https://github.com/append_const', const=42, help='Add 42 to the list.')
+parser.add_argument('-v', '--verbose', action='https://github.com/count', help='Increase verbosity level.')
+args = parser.parse_args()
+print(f"Values: {args.values}")
+print(f"Verbosity: {args.verbose}")
diff --git a/python-standard-library/argparse/2.6_custom_actions.py b/python-standard-library/argparse/2.6_custom_actions.py
new file mode 100644
index 00000000..86d15392
--- /dev/null
+++ b/python-standard-library/argparse/2.6_custom_actions.py
@@ -0,0 +1,16 @@
+import argparse
+
+class CustomAction(argparse.Action):
+ def __call__(self, parser, namespace, values, option_string=None):
+ # Perform custom processing on the argument values
+ processed_values = [value.upper() for value in values]
+
+ # Set the attribute on the namespace object
+ setattr(namespace, self.dest, processed_values)
+
+# Set up argument parser and add the custom action
+parser = argparse.ArgumentParser(description='Custom argument action example.')
+parser.add_argument('-n', '--names', nargs='+', action=CustomAction, help='A list of names to be processed.')
+
+args = parser.parse_args()
+print(args.names)
diff --git a/python-standard-library/argparse/2.7_argument_types.py b/python-standard-library/argparse/2.7_argument_types.py
new file mode 100644
index 00000000..d595a6fd
--- /dev/null
+++ b/python-standard-library/argparse/2.7_argument_types.py
@@ -0,0 +1,6 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A simple argparse example.')
+parser.add_argument("-r", "--ratio", type=float)
+args = parser.parse_args()
+print(f"Ratio: {args.ratio}")
diff --git a/python-standard-library/argparse/3.3_subcommand_example.py b/python-standard-library/argparse/3.3_subcommand_example.py
new file mode 100644
index 00000000..55088d6c
--- /dev/null
+++ b/python-standard-library/argparse/3.3_subcommand_example.py
@@ -0,0 +1,10 @@
+import argparse
+
+parser = argparse.ArgumentParser(description='A subcommand example.')
+subparsers = parser.add_subparsers(help='Subcommand help')
+
+list_parser = subparsers.add_parser('list', help='List items')
+add_parser = subparsers.add_parser('add', help='Add an item')
+add_parser.add_argument('item', help='Item to add')
+
+args = parser.parse_args()
diff --git a/python-standard-library/argparse/4.1_file_renamer.py b/python-standard-library/argparse/4.1_file_renamer.py
new file mode 100644
index 00000000..0d5f2502
--- /dev/null
+++ b/python-standard-library/argparse/4.1_file_renamer.py
@@ -0,0 +1,46 @@
+import argparse
+import os
+
+# Rename function
+def rename_files(args):
+ # Your file renaming logic here
+ print(f"Renaming files in {args.path}...")
+ print(f"Prefix: {args.prefix}")
+ print(f"Suffix: {args.suffix}")
+ print(f"Replace: {args.replace}")
+ os.chdir(args.path)
+ for file in os.listdir():
+ # Get the file name and extension
+ file_name, file_ext = os.path.splitext(file)
+ # Add prefix
+ if args.prefix:
+ file_name = f"{args.prefix}{file_name}"
+ # Add suffix
+ if args.suffix:
+ file_name = f"{file_name}{args.suffix}"
+ # Replace substring
+ if args.replace:
+ file_name = file_name.replace(args.replace[0], args.replace[1])
+ # Rename the file
+ print(f"Renaming {file} to {file_name}{file_ext}")
+ os.rename(file, f"{file_name}{file_ext}")
+
+# custom type for checking if a path exists
+def path_exists(path):
+ if os.path.exists(path):
+ return path
+ else:
+ raise argparse.ArgumentTypeError(f"Path {path} does not exist.")
+
+
+# Set up argument parser
+parser = argparse.ArgumentParser(description='File renaming tool.')
+parser.add_argument('path', type=path_exists, help='Path to the folder containing the files to rename.')
+parser.add_argument('-p', '--prefix', help='Add a prefix to each file name.')
+parser.add_argument('-s', '--suffix', help='Add a suffix to each file name.')
+parser.add_argument('-r', '--replace', nargs=2, help='Replace a substring in each file name. Usage: -r old_string new_string')
+
+args = parser.parse_args()
+
+# Call the renaming function
+rename_files(args)
diff --git a/python-standard-library/argparse/4.2_simple_calculator.py b/python-standard-library/argparse/4.2_simple_calculator.py
new file mode 100644
index 00000000..2f4ea64d
--- /dev/null
+++ b/python-standard-library/argparse/4.2_simple_calculator.py
@@ -0,0 +1,42 @@
+import argparse
+
+# Operation functions
+def add(args):
+ print(args.x + args.y)
+
+def subtract(args):
+ print(args.x - args.y)
+
+def multiply(args):
+ print(args.x * args.y)
+
+def divide(args):
+ print(args.x / args.y)
+
+# Set up argument parser
+parser = argparse.ArgumentParser(description='Command-line calculator.')
+subparsers = parser.add_subparsers()
+
+# Add subcommands
+add_parser = subparsers.add_parser('add', help='Add two numbers.')
+add_parser.add_argument('x', type=float, help='First number.')
+add_parser.add_argument('y', type=float, help='Second number.')
+add_parser.set_defaults(func=add)
+
+subtract_parser = subparsers.add_parser('subtract', help='Subtract two numbers.')
+subtract_parser.add_argument('x', type=float, help='First number.')
+subtract_parser.add_argument('y', type=float, help='Second number.')
+subtract_parser.set_defaults(func=subtract)
+
+multiply_parser = subparsers.add_parser('multiply', help='Multiply two numbers.')
+multiply_parser.add_argument('x', type=float, help='First number.')
+multiply_parser.add_argument('y', type=float, help='Second number.')
+multiply_parser.set_defaults(func=multiply)
+
+divide_parser = subparsers.add_parser('divide', help='Divide two numbers.')
+divide_parser.add_argument('x', type=float, help='First number.')
+divide_parser.add_argument('y', type=float, help='Second number.')
+divide_parser.set_defaults(func=divide)
+
+args = parser.parse_args()
+args.func(args)
diff --git a/python-standard-library/argparse/README.md b/python-standard-library/argparse/README.md
new file mode 100644
index 00000000..a0565d61
--- /dev/null
+++ b/python-standard-library/argparse/README.md
@@ -0,0 +1,4 @@
+# [How to Use the Argparse Module in Python](https://www.thepythoncode.com/article/how-to-use-argparse-in-python)
+The `argparse` module in Python is a built-in module that helps us to parse command-line arguments. It is a very useful module that allows us to easily write user-friendly command-line interfaces. In this tutorial, we will learn how to use the `argparse` module in Python.
+
+The code is available for each section, so you can run it and see the output.
\ No newline at end of file
diff --git a/python-standard-library/argparse/data/item1.txt b/python-standard-library/argparse/data/item1.txt
new file mode 100644
index 00000000..02103c6d
--- /dev/null
+++ b/python-standard-library/argparse/data/item1.txt
@@ -0,0 +1 @@
+This is a text file
\ No newline at end of file
diff --git a/python-standard-library/argparse/data/item2.txt b/python-standard-library/argparse/data/item2.txt
new file mode 100644
index 00000000..5d8fb96c
--- /dev/null
+++ b/python-standard-library/argparse/data/item2.txt
@@ -0,0 +1 @@
+Another text file is created in the same directory as the original file.
\ No newline at end of file
diff --git a/python-standard-library/credit-card-validation/README.md b/python-standard-library/credit-card-validation/README.md
new file mode 100644
index 00000000..bee74fdd
--- /dev/null
+++ b/python-standard-library/credit-card-validation/README.md
@@ -0,0 +1 @@
+# [How to Validate Credit Card Numbers in Python](https://thepythoncode.com/article/credit-card-validation-in-python)
\ No newline at end of file
diff --git a/python-standard-library/credit-card-validation/credit_card_validation.py b/python-standard-library/credit-card-validation/credit_card_validation.py
new file mode 100644
index 00000000..57a82f5b
--- /dev/null
+++ b/python-standard-library/credit-card-validation/credit_card_validation.py
@@ -0,0 +1,85 @@
+import argparse # Import argparse for command-line argument parsing
+import re # Import re for regular expression matching
+
+# Validate credit card number using Luhn Algorithm
+def luhn_algorithm(card_number):
+ def digits_of(n):
+ return [int(d) for d in str(n)] # Convert each character in the number to an integer
+
+ digits = digits_of(card_number) # Get all digits of the card number
+ odd_digits = digits[-1::-2] # Get digits from the right, skipping one digit each time (odd positions)
+ even_digits = digits[-2::-2] # Get every second digit from the right (even positions)
+
+ checksum = sum(odd_digits) # Sum all odd position digits
+ for d in even_digits:
+ checksum += sum(digits_of(d*2)) # Double each even position digit and sum the resulting digits
+
+ return checksum % 10 == 0 # Return True if checksum modulo 10 is 0
+
+
+# Function to check credit card number using Luhn's alogorithm
+def check_credit_card_number(card_number):
+ card_number = card_number.replace(' ', '') # Remove spaces from the card number
+ if not card_number.isdigit(): # Check if the card number contains only digits
+ return False
+ return luhn_algorithm(card_number) # Validate using the Luhn algorithm
+
+# Function to get the card type based on card number using RegEx
+def get_card_type(card_number):
+ card_number = card_number.replace(' ', '') # Remove spaces from the card number
+ card_types = {
+ "Visa": r"^4[0-9]{12}(?:[0-9]{3})?$", # Visa: Starts with 4, length 13 or 16
+ "MasterCard": r"^5[1-5][0-9]{14}$", # MasterCard: Starts with 51-55, length 16
+ "American Express": r"^3[47][0-9]{13}$", # AmEx: Starts with 34 or 37, length 15
+ "Discover": r"^6(?:011|5[0-9]{2})[0-9]{12}$", # Discover: Starts with 6011 or 65, length 16
+ "JCB": r"^(?:2131|1800|35\d{3})\d{11}$", # JCB: Starts with 2131, 1800, or 35, length 15 or 16
+ "Diners Club": r"^3(?:0[0-5]|[68][0-9])[0-9]{11}$", # Diners Club: Starts with 300-305, 36, or 38, length 14
+ "Maestro": r"^(5018|5020|5038|56|57|58|6304|6759|676[1-3])\d{8,15}$", # Maestro: Various starting patterns, length 12-19
+ "Verve": r"^(506[01]|507[89]|6500)\d{12,15}$" # Verve: Starts with 5060, 5061, 5078, 5079, or 6500, length 16-19
+ }
+
+ for card_type, pattern in card_types.items():
+ if re.match(pattern, card_number): # Check if card number matches the pattern
+ return card_type
+ return "Unknown" # Return Unknown if no pattern matches
+
+
+# Processing a file containing card numbers.
+def process_file(file_path):
+
+ try:
+ with open(file_path, 'r') as file: # Open the file for reading
+ card_numbers = file.readlines() # Read all lines from the file
+ results = {}
+ for card_number in card_numbers:
+ card_number = card_number.strip() # Remove any leading/trailing whitespace
+ is_valid = check_credit_card_number(card_number) # Validate card number
+ card_type = get_card_type(card_number) # Detect card type
+ results[card_number] = (is_valid, card_type) # Store result
+ return results
+ except Exception as e:
+ print(f"Error reading file: {e}") # Print error message if file cannot be read
+ return None
+
+
+def main():
+ parser = argparse.ArgumentParser(description="Check if a credit card number is legitimate and identify its type using the Luhn algorithm.")
+ parser.add_argument('-n', '--number', type=str, help="A single credit card number to validate.") # Argument for single card number
+ parser.add_argument('-f', '--file', type=str, help="A file containing multiple credit card numbers to validate.") # Argument for file input
+
+ args = parser.parse_args() # Parse command-line arguments
+
+ if args.number:
+ is_valid = check_credit_card_number(args.number) # Validate single card number
+ card_type = get_card_type(args.number) # Detect card type
+ print(f"[!] Credit card number {args.number} is {'valid' if is_valid else 'invalid'} and is of type {card_type}.") # Print result
+
+ if args.file:
+ results = process_file(args.file) # Process file with card numbers
+ if results:
+ for card_number, (is_valid, card_type) in results.items():
+ print(f"[!] Credit card number {card_number} is {'valid' if is_valid else 'invalid'} and is of type {card_type}.") # Print results for each card number
+
+# Execute tha main function
+if __name__ == '__main__':
+ main()
diff --git a/python-standard-library/credit-card-validation/credit_cards.txt b/python-standard-library/credit-card-validation/credit_cards.txt
new file mode 100644
index 00000000..b0a33fe6
--- /dev/null
+++ b/python-standard-library/credit-card-validation/credit_cards.txt
@@ -0,0 +1,3 @@
+4111111111111111
+5555555555554444
+378282246310005
\ No newline at end of file
diff --git a/python-standard-library/extension-separator/extension_separator.py b/python-standard-library/extension-separator/extension_separator.py
index 1fc26931..9a50058c 100644
--- a/python-standard-library/extension-separator/extension_separator.py
+++ b/python-standard-library/extension-separator/extension_separator.py
@@ -11,19 +11,24 @@
"ico": "images",
"gif": "images",
"svg": "images",
+ "jfif": "images",
"sql": "sql",
"exe": "programs",
"msi": "programs",
"pdf": "pdf",
+ "epub": "epub",
"xlsx": "excel",
"csv": "excel",
"rar": "archive",
"zip": "archive",
"gz": "archive",
"tar": "archive",
+ "7z": "archive",
"docx": "word",
"torrent": "torrent",
"txt": "text",
+ "log": "text",
+ "md": "text",
"ipynb": "python",
"py": "python",
"pptx": "powerpoint",
@@ -34,10 +39,12 @@
"m3u8": "video",
"webm": "video",
"ts": "video",
+ "avi": "video",
"json": "json",
"css": "web",
"js": "web",
"html": "web",
+ "webp": "web",
"apk": "apk",
"sqlite3": "sqlite3",
}
@@ -62,4 +69,8 @@
dst = os.path.join(path, folder_name, basename)
if verbose:
print(f"[*] Moving {file} to {dst}")
- shutil.move(file, dst)
\ No newline at end of file
+ try:
+ shutil.move(file, dst)
+ except Exception as e:
+ print(f"[!] Error: {e}")
+ continue
\ No newline at end of file
diff --git a/python-standard-library/grep-clone/README.md b/python-standard-library/grep-clone/README.md
new file mode 100644
index 00000000..e6023461
--- /dev/null
+++ b/python-standard-library/grep-clone/README.md
@@ -0,0 +1 @@
+# [How to Make a Grep Clone in Python](https://thepythoncode.com/article/how-to-make-grep-clone-in-python)
\ No newline at end of file
diff --git a/python-standard-library/grep-clone/grep_python.py b/python-standard-library/grep-clone/grep_python.py
new file mode 100644
index 00000000..b3f3fa14
--- /dev/null
+++ b/python-standard-library/grep-clone/grep_python.py
@@ -0,0 +1,33 @@
+# Import the necessary libraries.
+import re, sys
+from colorama import init, Fore
+
+# Initialize colorama.
+init()
+
+# Grep function.
+def grep(pattern, filename):
+ try:
+ found_match = False
+ with open(filename, 'r') as file:
+ for line in file:
+ if re.search(pattern, line):
+ # Print matching lines in green.
+ print(Fore.GREEN + line.strip() + "\n") # We are including new lines to enhance readability.
+ found_match = True
+ if not found_match:
+ # Print message in red if no content is found.
+ print(Fore.RED + f"No content found matching the pattern '{pattern}'.")
+ except FileNotFoundError:
+ # Print error message in red if the file is not found.
+ print(Fore.RED + f"File '{filename}' not found.")
+
+
+if len(sys.argv) != 3:
+ # Print usage message in red if the number of arguments is incorrect.
+ print(Fore.RED + "Usage: python grep_python.py ")
+ sys.exit(1)
+
+pattern = sys.argv[1]
+filename = sys.argv[2]
+grep(pattern, filename)
diff --git a/python-standard-library/grep-clone/phpinfo.php b/python-standard-library/grep-clone/phpinfo.php
new file mode 100644
index 00000000..6d4df079
--- /dev/null
+++ b/python-standard-library/grep-clone/phpinfo.php
@@ -0,0 +1,800 @@
+
+
+
+PHP 7.4.3-4ubuntu2.20 - phpinfo()
+
+
+
+PHP Version 7.4.3-4ubuntu2.20
+
+
+
+System Linux cf00c9c42b69 4.14.336-257.562.amzn2.x86_64 #1 SMP Sat Feb 24 09:50:35 UTC 2024 x86_64
+Build Date Feb 21 2024 13:54:34
+Server API CGI/FastCGI
+Virtual Directory Support disabled
+Configuration File (php.ini) Path /etc/php/7.4/cgi
+Loaded Configuration File /etc/php/7.4/cgi/php.ini
+Scan this dir for additional .ini files /etc/php/7.4/cgi/conf.d
+Additional .ini files parsed /etc/php/7.4/cgi/conf.d/10-opcache.ini,
+/etc/php/7.4/cgi/conf.d/10-pdo.ini,
+/etc/php/7.4/cgi/conf.d/15-xml.ini,
+/etc/php/7.4/cgi/conf.d/20-calendar.ini,
+/etc/php/7.4/cgi/conf.d/20-ctype.ini,
+/etc/php/7.4/cgi/conf.d/20-dom.ini,
+/etc/php/7.4/cgi/conf.d/20-exif.ini,
+/etc/php/7.4/cgi/conf.d/20-ffi.ini,
+/etc/php/7.4/cgi/conf.d/20-fileinfo.ini,
+/etc/php/7.4/cgi/conf.d/20-ftp.ini,
+/etc/php/7.4/cgi/conf.d/20-gettext.ini,
+/etc/php/7.4/cgi/conf.d/20-iconv.ini,
+/etc/php/7.4/cgi/conf.d/20-json.ini,
+/etc/php/7.4/cgi/conf.d/20-phar.ini,
+/etc/php/7.4/cgi/conf.d/20-posix.ini,
+/etc/php/7.4/cgi/conf.d/20-readline.ini,
+/etc/php/7.4/cgi/conf.d/20-shmop.ini,
+/etc/php/7.4/cgi/conf.d/20-simplexml.ini,
+/etc/php/7.4/cgi/conf.d/20-sockets.ini,
+/etc/php/7.4/cgi/conf.d/20-sysvmsg.ini,
+/etc/php/7.4/cgi/conf.d/20-sysvsem.ini,
+/etc/php/7.4/cgi/conf.d/20-sysvshm.ini,
+/etc/php/7.4/cgi/conf.d/20-tokenizer.ini,
+/etc/php/7.4/cgi/conf.d/20-xmlreader.ini,
+/etc/php/7.4/cgi/conf.d/20-xmlwriter.ini,
+/etc/php/7.4/cgi/conf.d/20-xsl.ini,
+/etc/php/7.4/cgi/conf.d/99-academy.ini
+
+PHP API 20190902
+PHP Extension 20190902
+Zend Extension 320190902
+Zend Extension Build API320190902,NTS
+PHP Extension Build API20190902,NTS
+Debug Build no
+Thread Safety disabled
+Zend Signal Handling enabled
+Zend Memory Manager enabled
+Zend Multibyte Support disabled
+IPv6 Support enabled
+DTrace Support available, disabled
+Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
+Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
+Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
+
+
+
+
+This program makes use of the Zend Scripting Language Engine: Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3-4ubuntu2.20, Copyright (c), by Zend Technologies
+
+
+
Configuration
+
+
+Calendar support enabled
+
+
+
+Directive Local Value Master Value
+cgi.check_shebang_line 1 1
+cgi.discard_path 0 0
+cgi.fix_pathinfo 1 1
+cgi.force_redirect 1 1
+cgi.nph 0 0
+cgi.redirect_status_env no value no value
+cgi.rfc2616_headers 0 0
+fastcgi.logging 1 1
+
+
+
+PHP Version 7.4.3-4ubuntu2.20
+
+
+Directive Local Value Master Value
+allow_url_fopen On On
+allow_url_include Off Off
+arg_separator.input & &
+arg_separator.output & &
+auto_append_file no value no value
+auto_globals_jit On On
+auto_prepend_file no value no value
+browscap no value no value
+default_charset UTF-8 UTF-8
+default_mimetype text/html text/html
+disable_classes no value no value
+disable_functions pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
+display_errors Off Off
+display_startup_errors Off Off
+doc_root no value no value
+docref_ext no value no value
+docref_root no value no value
+enable_dl Off Off
+enable_post_data_reading On On
+error_append_string no value no value
+error_log no value no value
+error_prepend_string no value no value
+error_reporting 22527 22527
+expose_php Off Off
+extension_dir /usr/lib/php/20190902 /usr/lib/php/20190902
+file_uploads On On
+hard_timeout 2 2
+highlight.comment #FF8000 #FF8000
+highlight.default #0000BB #0000BB
+highlight.html #000000 #000000
+highlight.keyword #007700 #007700
+highlight.string #DD0000 #DD0000
+html_errors On On
+ignore_repeated_errors Off Off
+ignore_repeated_source Off Off
+ignore_user_abort Off Off
+implicit_flush Off Off
+include_path .:/usr/share/php .:/usr/share/php
+input_encoding no value no value
+internal_encoding no value no value
+log_errors On On
+log_errors_max_len 1024 1024
+mail.add_x_header Off Off
+mail.force_extra_parameters no value no value
+mail.log no value no value
+max_execution_time 30 30
+max_file_uploads 20 20
+max_input_nesting_level 64 64
+max_input_time 60 60
+max_input_vars 1000 1000
+max_multipart_body_parts -1 -1
+memory_limit 128M 128M
+open_basedir no value no value
+output_buffering 4096 4096
+output_encoding no value no value
+output_handler no value no value
+post_max_size 8M 8M
+precision 14 14
+realpath_cache_size 4096K 4096K
+realpath_cache_ttl 120 120
+register_argc_argv Off Off
+report_memleaks On On
+report_zend_debug On On
+request_order GP GP
+sendmail_from no value no value
+sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
+serialize_precision -1 -1
+short_open_tag Off Off
+SMTP localhost localhost
+smtp_port 25 25
+sys_temp_dir no value no value
+syslog.facility LOG_USER LOG_USER
+syslog.filter no-ctrl no-ctrl
+syslog.ident php php
+track_errors Off Off
+unserialize_callback_func no value no value
+upload_max_filesize 2M 2M
+upload_tmp_dir no value no value
+user_dir no value no value
+user_ini.cache_ttl 300 300
+user_ini.filename .user.ini .user.ini
+variables_order GPCS GPCS
+xmlrpc_error_number 0 0
+xmlrpc_errors Off Off
+zend.assertions -1 -1
+zend.detect_unicode On On
+zend.enable_gc On On
+zend.exception_ignore_args Off Off
+zend.multibyte Off Off
+zend.script_encoding no value no value
+zend.signal_check Off Off
+
+
+
+ctype functions enabled
+
+
+
+date/time support enabled
+timelib version 2018.03
+"Olson" Timezone Database Version 0.system
+Timezone Database internal
+Default timezone UTC
+
+
+Directive Local Value Master Value
+date.default_latitude 31.7667 31.7667
+date.default_longitude 35.2333 35.2333
+date.sunrise_zenith 90.583333 90.583333
+date.sunset_zenith 90.583333 90.583333
+date.timezone no value no value
+
+
+
+DOM/XML enabled
+DOM/XML API Version 20031129
+libxml Version 2.9.10
+HTML Support enabled
+XPath Support enabled
+XPointer Support enabled
+Schema Support enabled
+RelaxNG Support enabled
+
+
+
+EXIF Support enabled
+Supported EXIF Version 0220
+Supported filetypes JPEG, TIFF
+Multibyte decoding support using mbstring disabled
+Extended EXIF tag formats Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
+
+
+Directive Local Value Master Value
+exif.decode_jis_intel JIS JIS
+exif.decode_jis_motorola JIS JIS
+exif.decode_unicode_intel UCS-2LE UCS-2LE
+exif.decode_unicode_motorola UCS-2BE UCS-2BE
+exif.encode_jis no value no value
+exif.encode_unicode ISO-8859-15 ISO-8859-15
+
+
+
+
+Directive Local Value Master Value
+ffi.enable preload preload
+ffi.preload no value no value
+
+
+
+fileinfo support enabled
+libmagic 537
+
+
+
+Input Validation and Filtering enabled
+
+
+Directive Local Value Master Value
+filter.default unsafe_raw unsafe_raw
+filter.default_flags no value no value
+
+
+
+FTP support enabled
+FTPS support enabled
+
+
+
+GetText Support enabled
+
+
+
+hash support enabled
+Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
+
+
+MHASH support Enabled
+MHASH API Version Emulated Support
+
+
+
+iconv support enabled
+iconv implementation glibc
+iconv library version 2.31
+
+
+Directive Local Value Master Value
+iconv.input_encoding no value no value
+iconv.internal_encoding no value no value
+iconv.output_encoding no value no value
+
+
+
+
+
+libXML support active
+libXML Compiled Version 2.9.10
+libXML Loaded Version 20910
+libXML streams enabled
+
+
+
+OpenSSL support enabled
+OpenSSL Library Version OpenSSL 1.1.1f 31 Mar 2020
+OpenSSL Header Version OpenSSL 1.1.1f 31 Mar 2020
+Openssl default config /usr/lib/ssl/openssl.cnf
+
+
+Directive Local Value Master Value
+openssl.cafile no value no value
+openssl.capath no value no value
+
+
+
+
+
+PCRE (Perl Compatible Regular Expressions) Support enabled
+PCRE Library Version 10.34 2019-11-21
+PCRE Unicode Version 12.1.0
+PCRE JIT Support enabled
+PCRE JIT Target x86 64bit (little endian + unaligned)
+
+
+Directive Local Value Master Value
+pcre.backtrack_limit 1000000 1000000
+pcre.jit 1 1
+pcre.recursion_limit 100000 100000
+
+
+
+PDO support enabled
+PDO drivers no value
+
+
+
+Phar: PHP Archive support enabled
+Phar API version 1.1.1
+Phar-based phar archives enabled
+Tar-based phar archives enabled
+ZIP-based phar archives enabled
+gzip compression enabled
+bzip2 compression disabled (install ext/bz2)
+Native OpenSSL support enabled
+
+
+
+Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
+
+
+Directive Local Value Master Value
+phar.cache_list no value no value
+phar.readonly On On
+phar.require_hash On On
+
+
+
+
+
+Readline Support enabled
+Readline library EditLine wrapper
+
+
+Directive Local Value Master Value
+cli.pager no value no value
+cli.prompt \b \> \b \>
+
+
+
+
+
+Session Support enabled
+Registered save handlers files user
+Registered serializer handlers php_serialize php php_binary
+
+
+Directive Local Value Master Value
+session.auto_start Off Off
+session.cache_expire 180 180
+session.cache_limiter nocache nocache
+session.cookie_domain no value no value
+session.cookie_httponly no value no value
+session.cookie_lifetime 0 0
+session.cookie_path / /
+session.cookie_samesite no value no value
+session.cookie_secure 0 0
+session.gc_divisor 1000 1000
+session.gc_maxlifetime 1440 1440
+session.gc_probability 0 0
+session.lazy_write On On
+session.name PHPSESSID PHPSESSID
+session.referer_check no value no value
+session.save_handler files files
+session.save_path /var/lib/php/sessions /var/lib/php/sessions
+session.serialize_handler php php
+session.sid_bits_per_character 5 5
+session.sid_length 26 26
+session.upload_progress.cleanup On On
+session.upload_progress.enabled On On
+session.upload_progress.freq 1% 1%
+session.upload_progress.min_freq 1 1
+session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
+session.upload_progress.prefix upload_progress_ upload_progress_
+session.use_cookies 1 1
+session.use_only_cookies 1 1
+session.use_strict_mode 0 0
+session.use_trans_sid 0 0
+
+
+
+
+
+SimpleXML support enabled
+Schema support enabled
+
+
+
+Sockets Support enabled
+
+
+
+sodium support enabled
+libsodium headers version 1.0.18
+libsodium library version 1.0.18
+
+
+
+SPL support enabled
+Interfaces OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
+Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
+
+
+
+Dynamic Library Support enabled
+Path to sendmail /usr/sbin/sendmail -t -i
+
+
+Directive Local Value Master Value
+assert.active 1 1
+assert.bail 0 0
+assert.callback no value no value
+assert.exception 0 0
+assert.quiet_eval 0 0
+assert.warning 1 1
+auto_detect_line_endings 0 0
+default_socket_timeout 60 60
+from no value no value
+session.trans_sid_hosts no value no value
+session.trans_sid_tags a=href,area=href,frame=src,form= a=href,area=href,frame=src,form=
+unserialize_max_depth 4096 4096
+url_rewriter.hosts no value no value
+url_rewriter.tags form= form=
+user_agent no value no value
+
+
+
+sysvmsg support enabled
+
+
+
+sysvsem support enabled
+
+
+
+sysvshm support enabled
+
+
+
+Tokenizer Support enabled
+
+
+
+XML Support active
+XML Namespace Support active
+libxml2 Version 2.9.10
+
+
+
+
+
+
+
+XSL enabled
+libxslt Version 1.1.34
+libxslt compiled against libxml Version 2.9.10
+EXSLT enabled
+libexslt Version 1.1.34
+
+
+
+Opcode Caching Up and Running
+Optimization Enabled
+SHM Cache Enabled
+File Cache Disabled
+Startup OK
+Shared memory model mmap
+Cache hits 0
+Cache misses 1
+Used memory 9168472
+Free memory 125049256
+Wasted memory 0
+Interned Strings Used memory 224744
+Interned Strings Free memory 6066264
+Cached scripts 1
+Cached keys 1
+Max keys 16229
+OOM restarts 0
+Hash keys restarts 0
+Manual restarts 0
+
+
+Directive Local Value Master Value
+opcache.blacklist_filename no value no value
+opcache.consistency_checks 0 0
+opcache.dups_fix Off Off
+opcache.enable On On
+opcache.enable_cli Off Off
+opcache.enable_file_override Off Off
+opcache.error_log no value no value
+opcache.file_cache no value no value
+opcache.file_cache_consistency_checks 1 1
+opcache.file_cache_only 0 0
+opcache.file_update_protection 2 2
+opcache.force_restart_timeout 180 180
+opcache.huge_code_pages Off Off
+opcache.interned_strings_buffer 8 8
+opcache.lockfile_path /tmp /tmp
+opcache.log_verbosity_level 1 1
+opcache.max_accelerated_files 10000 10000
+opcache.max_file_size 0 0
+opcache.max_wasted_percentage 5 5
+opcache.memory_consumption 128 128
+opcache.opt_debug_level 0 0
+opcache.optimization_level 0x7FFEBFFF 0x7FFEBFFF
+opcache.preferred_memory_model no value no value
+opcache.preload no value no value
+opcache.preload_user no value no value
+opcache.protect_memory 0 0
+opcache.restrict_api no value no value
+opcache.revalidate_freq 2 2
+opcache.revalidate_path Off Off
+opcache.save_comments 1 1
+opcache.use_cwd On On
+opcache.validate_permission Off Off
+opcache.validate_root Off Off
+opcache.validate_timestamps On On
+
+
+
+ZLib Support enabled
+Stream Wrapper compress.zlib://
+Stream Filter zlib.inflate, zlib.deflate
+Compiled Version 1.2.11
+Linked Version 1.2.11
+
+
+Directive Local Value Master Value
+zlib.output_compression Off Off
+zlib.output_compression_level -1 -1
+zlib.output_handler no value no value
+
+
Additional Modules
+
+
Environment
+
+Variable Value
+GATEWAY_INTERFACE CGI/1.1
+SUDO_GID 10000
+REMOTE_HOST 105.235.135.13
+USER carlos
+HTTP_ACCEPT_CHARSET *
+SECRET_KEY qpv07o7eirlfsovg81p7ay7m9l8jaw8b
+QUERY_STRING no value
+HOME /home/carlos
+HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
+HTTP_ACCEPT */*
+SCRIPT_FILENAME /home/carlos/cgi-bin/phpinfo.php
+HTTP_HOST 0a8700550346ebd1804c946100f40010.web-security-academy.net
+SUDO_UID 10000
+LOGNAME carlos
+SERVER_SOFTWARE PortSwiggerHttpServer/1.0
+TERM unknown
+PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
+HTTP_ACCEPT_LANGUAGE en-US
+HTTP_REFERER https://0a8700550346ebd1804c946100f40010.web-security-academy.net/cgi-bin/
+SERVER_PROTOCOL HTTP/1.1
+HTTP_ACCEPT_ENCODING identity
+SUDO_COMMAND /usr/bin/sh -c /usr/bin/php-cgi
+SHELL /bin/bash
+REDIRECT_STATUS true
+SUDO_USER academy
+REQUEST_METHOD GET
+PWD /home/carlos/cgi-bin
+SERVER_PORT 443
+SCRIPT_NAME /cgi-bin/phpinfo.php
+SERVER_NAME 10.0.4.200
+
+
PHP Variables
+
+Variable Value
+$_SERVER['GATEWAY_INTERFACE'] CGI/1.1
+$_SERVER['SUDO_GID'] 10000
+$_SERVER['REMOTE_HOST'] 105.235.135.13
+$_SERVER['USER'] carlos
+$_SERVER['HTTP_ACCEPT_CHARSET'] *
+$_SERVER['SECRET_KEY'] qpv07o7eirlfsovg81p7ay7m9l8jaw8b
+$_SERVER['QUERY_STRING'] no value
+$_SERVER['HOME'] /home/carlos
+$_SERVER['HTTP_USER_AGENT'] Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
+$_SERVER['HTTP_ACCEPT'] */*
+$_SERVER['SCRIPT_FILENAME'] /home/carlos/cgi-bin/phpinfo.php
+$_SERVER['HTTP_HOST'] 0a8700550346ebd1804c946100f40010.web-security-academy.net
+$_SERVER['SUDO_UID'] 10000
+$_SERVER['LOGNAME'] carlos
+$_SERVER['SERVER_SOFTWARE'] PortSwiggerHttpServer/1.0
+$_SERVER['TERM'] unknown
+$_SERVER['PATH'] /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
+$_SERVER['HTTP_ACCEPT_LANGUAGE'] en-US
+$_SERVER['HTTP_REFERER'] https://0a8700550346ebd1804c946100f40010.web-security-academy.net/cgi-bin/
+$_SERVER['SERVER_PROTOCOL'] HTTP/1.1
+$_SERVER['HTTP_ACCEPT_ENCODING'] identity
+$_SERVER['SUDO_COMMAND'] /usr/bin/sh -c /usr/bin/php-cgi
+$_SERVER['SHELL'] /bin/bash
+$_SERVER['REDIRECT_STATUS'] true
+$_SERVER['SUDO_USER'] academy
+$_SERVER['REQUEST_METHOD'] GET
+$_SERVER['PWD'] /home/carlos/cgi-bin
+$_SERVER['SERVER_PORT'] 443
+$_SERVER['SCRIPT_NAME'] /cgi-bin/phpinfo.php
+$_SERVER['SERVER_NAME'] 10.0.4.200
+$_SERVER['PHP_SELF'] /cgi-bin/phpinfo.php
+$_SERVER['REQUEST_TIME_FLOAT'] 1712744607.1831
+$_SERVER['REQUEST_TIME'] 1712744607
+
+
+
PHP Credits
+
+PHP Group
+Thies C. Arntzen, Stig Bakken, Shane Caraveo, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski
+
+
+Language Design & Concept
+Andi Gutmans, Rasmus Lerdorf, Zeev Suraski, Marcus Boerger
+
+
+PHP Authors
+Contribution Authors
+Zend Scripting Language Engine Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Marcus Boerger, Dmitry Stogov, Xinchen Hui, Nikita Popov
+Extension Module API Andi Gutmans, Zeev Suraski, Andrei Zmievski
+UNIX Build and Modularization Stig Bakken, Sascha Schumann, Jani Taskinen, Peter Kokot
+Windows Support Shane Caraveo, Zeev Suraski, Wez Furlong, Pierre-Alain Joye, Anatol Belski, Kalle Sommer Nielsen
+Server API (SAPI) Abstraction Layer Andi Gutmans, Shane Caraveo, Zeev Suraski
+Streams Abstraction Layer Wez Furlong, Sara Golemon
+PHP Data Objects Layer Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky
+Output Handler Zeev Suraski, Thies C. Arntzen, Marcus Boerger, Michael Wallner
+Consistent 64 bit support Anthony Ferrara, Anatol Belski
+
+
+SAPI Modules
+Contribution Authors
+Apache 2.0 Handler Ian Holsman, Justin Erenkrantz (based on Apache 2.0 Filter code)
+CGI / FastCGI Rasmus Lerdorf, Stig Bakken, Shane Caraveo, Dmitry Stogov
+CLI Edin Kadribasic, Marcus Boerger, Johannes Schlueter, Moriyoshi Koizumi, Xinchen Hui
+Embed Edin Kadribasic
+FastCGI Process Manager Andrei Nigmatulin, dreamcat4, Antony Dovgal, Jerome Loyet
+litespeed George Wang
+phpdbg Felipe Pena, Joe Watkins, Bob Weinand
+
+
+Module Authors
+Module Authors
+BC Math Andi Gutmans
+Bzip2 Sterling Hughes
+Calendar Shane Caraveo, Colin Viebrock, Hartmut Holzgraefe, Wez Furlong
+COM and .Net Wez Furlong
+ctype Hartmut Holzgraefe
+cURL Sterling Hughes
+Date/Time Support Derick Rethans
+DB-LIB (MS SQL, Sybase) Wez Furlong, Frank M. Kromann, Adam Baratz
+DBA Sascha Schumann, Marcus Boerger
+DOM Christian Stocker, Rob Richards, Marcus Boerger
+enchant Pierre-Alain Joye, Ilia Alshanetsky
+EXIF Rasmus Lerdorf, Marcus Boerger
+FFI Dmitry Stogov
+fileinfo Ilia Alshanetsky, Pierre Alain Joye, Scott MacVicar, Derick Rethans, Anatol Belski
+Firebird driver for PDO Ard Biesheuvel
+FTP Stefan Esser, Andrew Skalski
+GD imaging Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger
+GetText Alex Plotnick
+GNU GMP support Stanislav Malyshev
+Iconv Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi
+IMAP Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky
+Input Filter Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky
+Internationalization Ed Batutis, Vladimir Iordanov, Dmitry Lakhtyuk, Stanislav Malyshev, Vadim Savchuk, Kirti Velankar
+JSON Jakub Zelenka, Omar Kilani, Scott MacVicar
+LDAP Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas
+LIBXML Christian Stocker, Rob Richards, Marcus Boerger, Wez Furlong, Shane Caraveo
+Multibyte String Functions Tsukada Takuya, Rui Hirokawa
+MySQL driver for PDO George Schlossnagle, Wez Furlong, Ilia Alshanetsky, Johannes Schlueter
+MySQLi Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel
+MySQLnd Andrey Hristov, Ulf Wendel, Georg Richter, Johannes Schlüter
+OCI8 Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong, Christopher Jones, Oracle Corporation
+ODBC driver for PDO Wez Furlong
+ODBC Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. Kalowsky
+Opcache Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Dmitry Stogov, Xinchen Hui
+OpenSSL Stig Venaas, Wez Furlong, Sascha Kettler, Scott MacVicar
+Oracle (OCI) driver for PDO Wez Furlong
+pcntl Jason Greene, Arnaud Le Blanc
+Perl Compatible Regexps Andrei Zmievski
+PHP Archive Gregory Beaver, Marcus Boerger
+PHP Data Objects Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky
+PHP hash Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner, Scott MacVicar
+Posix Kristian Koehntopp
+PostgreSQL driver for PDO Edin Kadribasic, Ilia Alshanetsky
+PostgreSQL Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne
+Pspell Vlad Krupin
+Readline Thies C. Arntzen
+Reflection Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter
+Sessions Sascha Schumann, Andrei Zmievski
+Shared Memory Operations Slava Poliakov, Ilia Alshanetsky
+SimpleXML Sterling Hughes, Marcus Boerger, Rob Richards
+SNMP Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne, Boris Lytochkin
+SOAP Brad Lafountain, Shane Caraveo, Dmitry Stogov
+Sockets Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene
+Sodium Frank Denis
+SPL Marcus Boerger, Etienne Kneuss
+SQLite 3.x driver for PDO Wez Furlong
+SQLite3 Scott MacVicar, Ilia Alshanetsky, Brad Dewar
+System V Message based IPC Wez Furlong
+System V Semaphores Tom May
+System V Shared Memory Christian Cartus
+tidy John Coggeshall, Ilia Alshanetsky
+tokenizer Andrei Zmievski, Johannes Schlueter
+XML Stig Bakken, Thies C. Arntzen, Sterling Hughes
+XMLReader Rob Richards
+xmlrpc Dan Libby
+XMLWriter Rob Richards, Pierre-Alain Joye
+XSL Christian Stocker, Rob Richards
+Zip Pierre-Alain Joye, Remi Collet
+Zlib Rasmus Lerdorf, Stefan Roehrich, Zeev Suraski, Jade Nicoletti, Michael Wallner
+
+
+PHP Documentation
+Authors Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson, Philip Olson, Georg Richter, Damien Seguy, Jakub Vrana, Adam Harvey
+Editor Peter Cowburn
+User Note Maintainers Daniel P. Brown, Thiago Henrique Pojda
+Other Contributors Previously active authors, editors and other contributors are listed in the manual.
+
+
+PHP Quality Assurance Team
+Ilia Alshanetsky, Joerg Behrens, Antony Dovgal, Stefan Esser, Moriyoshi Koizumi, Magnus Maatta, Sebastian Nohn, Derick Rethans, Melvyn Sopacua, Pierre-Alain Joye, Dmitry Stogov, Felipe Pena, David Soria Parra, Stanislav Malyshev, Julien Pauli, Stephen Zarkos, Anatol Belski, Remi Collet, Ferenc Kovacs
+
+
+Websites and Infrastructure team
+PHP Websites Team Rasmus Lerdorf, Hannes Magnusson, Philip Olson, Lukas Kahwe Smith, Pierre-Alain Joye, Kalle Sommer Nielsen, Peter Cowburn, Adam Harvey, Ferenc Kovacs, Levi Morrison
+Event Maintainers Damien Seguy, Daniel P. Brown
+Network Infrastructure Daniel P. Brown
+Windows Infrastructure Alex Schoenmaker
+
+
PHP License
+
+
+
+This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
+
+
+
+
\ No newline at end of file
diff --git a/python-standard-library/grep-clone/requirements.txt b/python-standard-library/grep-clone/requirements.txt
new file mode 100644
index 00000000..3d90aaa5
--- /dev/null
+++ b/python-standard-library/grep-clone/requirements.txt
@@ -0,0 +1 @@
+colorama
\ No newline at end of file
diff --git a/python-standard-library/tcp-proxy/README.md b/python-standard-library/tcp-proxy/README.md
new file mode 100644
index 00000000..f3dd655d
--- /dev/null
+++ b/python-standard-library/tcp-proxy/README.md
@@ -0,0 +1 @@
+# [How to Build a TCP Proxy with Python](https://thepythoncode.com/article/building-a-tcp-proxy-with-python)
\ No newline at end of file
diff --git a/python-standard-library/tcp-proxy/tcp_proxy.py b/python-standard-library/tcp-proxy/tcp_proxy.py
new file mode 100644
index 00000000..d27434ef
--- /dev/null
+++ b/python-standard-library/tcp-proxy/tcp_proxy.py
@@ -0,0 +1,147 @@
+import sys
+import socket
+import threading
+import time
+from typing import Optional, Tuple, Dict
+
+class TcpProxy:
+ def __init__(self):
+ self._local_addr: str = ""
+ self._local_port: int = 0
+ self._remote_addr: str = ""
+ self._remote_port: int = 0
+ self._preload: bool = False
+ self._backlog: int = 5
+ self._chunk_size: int = 16
+ self._timeout: int = 5
+ self._buffer_size: int = 4096
+ self._termination_flags: Dict[bytes, bool] = {
+ b'220 ': True,
+ b'331 ': True,
+ b'230 ': True,
+ b'530 ': True
+ }
+
+ def _process_data(self, stream: bytes) -> None:
+ #Transform data stream for analysis
+ for offset in range(0, len(stream), self._chunk_size):
+ block = stream[offset:offset + self._chunk_size]
+
+ # Format block representation
+ bytes_view = ' '.join(f'{byte:02X}' for byte in block)
+ text_view = ''.join(chr(byte) if 32 <= byte <= 126 else '.' for byte in block)
+
+ # Display formatted line
+ print(f"{offset:04X} {bytes_view:<{self._chunk_size * 3}} {text_view}")
+
+ def _extract_stream(self, conn: socket.socket) -> bytes:
+ #Extract data stream from connection
+ accumulator = b''
+ conn.settimeout(self._timeout)
+
+ try:
+ while True:
+ fragment = conn.recv(self._buffer_size)
+ if not fragment:
+ break
+
+ accumulator += fragment
+
+ # Check for protocol markers
+ if accumulator.endswith(b'\r\n'):
+ for flag in self._termination_flags:
+ if flag in accumulator:
+ return accumulator
+
+ except socket.timeout:
+ pass
+
+ return accumulator
+
+ def _monitor_stream(self, direction: str, stream: bytes) -> bytes:
+ # Monitor and decode stream content
+ try:
+ content = stream.decode('utf-8').strip()
+ marker = ">>>" if direction == "in" else "<<<"
+ print(f"{marker} {content}")
+ except UnicodeDecodeError:
+ print(f"{direction}: [binary content]")
+
+ return stream
+
+ def _bridge_connections(self, entry_point: socket.socket) -> None:
+ #Establish and maintain connection bridge
+ # Initialize exit point
+ exit_point = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ try:
+ exit_point.connect((self._remote_addr, self._remote_port))
+ # Handle initial remote response
+ if self._preload:
+ remote_data = self._extract_stream(exit_point)
+ if remote_data:
+ self._process_data(remote_data)
+ processed = self._monitor_stream("out", remote_data)
+ entry_point.send(processed)
+ # Main interaction loop
+ while True:
+ # Process incoming traffic
+ entry_data = self._extract_stream(entry_point)
+ if entry_data:
+ print(f"\n[>] Captured {len(entry_data)} bytes incoming")
+ self._process_data(entry_data)
+ processed = self._monitor_stream("in", entry_data)
+ exit_point.send(processed)
+ # Process outgoing traffic
+ exit_data = self._extract_stream(exit_point)
+ if exit_data:
+ print(f"\n[<] Captured {len(exit_data)} bytes outgoing")
+ self._process_data(exit_data)
+ processed = self._monitor_stream("out", exit_data)
+ entry_point.send(processed)
+ # Prevent CPU saturation
+ if not (entry_data or exit_data):
+ time.sleep(0.1)
+ except Exception as e:
+ print(f"[!] Bridge error: {str(e)}")
+ finally:
+ print("[*] Closing bridge")
+ entry_point.close()
+ exit_point.close()
+
+ def orchestrate(self) -> None:
+ # Orchestrate the proxy operation
+ # Validate input
+ if len(sys.argv[1:]) != 5:
+ print("Usage: script.py [local_addr] [local_port] [remote_addr] [remote_port] [preload]")
+ print("Example: script.py 127.0.0.1 8080 target.com 80 True")
+ sys.exit(1)
+ # Configure proxy parameters
+ self._local_addr = sys.argv[1]
+ self._local_port = int(sys.argv[2])
+ self._remote_addr = sys.argv[3]
+ self._remote_port = int(sys.argv[4])
+ self._preload = "true" in sys.argv[5].lower()
+ # Initialize listener
+ listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ try:
+ listener.bind((self._local_addr, self._local_port))
+ except socket.error as e:
+ print(f"[!] Binding failed: {e}")
+ sys.exit(1)
+ listener.listen(self._backlog)
+ print(f"[*] Service active on {self._local_addr}:{self._local_port}")
+ # Main service loop
+ while True:
+ client, address = listener.accept()
+ print(f"[+] Connection from {address[0]}:{address[1]}")
+ bridge = threading.Thread(
+ target=self._bridge_connections,
+ args=(client,)
+ )
+ bridge.daemon = True
+ bridge.start()
+
+if __name__ == "__main__":
+ bridge = TcpProxy()
+ bridge.orchestrate()
\ No newline at end of file
diff --git a/scapy/crafting-packets/README.md b/scapy/crafting-packets/README.md
new file mode 100644
index 00000000..c57f5974
--- /dev/null
+++ b/scapy/crafting-packets/README.md
@@ -0,0 +1 @@
+# [Crafting Dummy Packets with Scapy Using Python](https://thepythoncode.com/article/crafting-packets-with-scapy-in-python)
\ No newline at end of file
diff --git a/scapy/crafting-packets/network_latency_measure.py b/scapy/crafting-packets/network_latency_measure.py
new file mode 100644
index 00000000..e5b1b43c
--- /dev/null
+++ b/scapy/crafting-packets/network_latency_measure.py
@@ -0,0 +1,21 @@
+server_ips = ["192.168.27.1", "192.168.17.129", "192.168.17.128"]
+
+from scapy.all import IP, ICMP, sr1
+import time
+
+def check_latency(ip):
+ packet = IP(dst=ip) / ICMP()
+ start_time = time.time()
+ response = sr1(packet, timeout=2, verbose=0)
+ end_time = time.time()
+
+ if response:
+ latency = (end_time - start_time) * 1000 # Convert to milliseconds
+ print(f"[+] Latency to {ip}: {latency:.2f} ms")
+ else:
+ print(f"[-] No response from {ip} (possible packet loss)")
+
+for server_ip in server_ips:
+ check_latency(server_ip)
+
+
diff --git a/scapy/crafting-packets/packet_craft.py b/scapy/crafting-packets/packet_craft.py
new file mode 100644
index 00000000..7d0f3399
--- /dev/null
+++ b/scapy/crafting-packets/packet_craft.py
@@ -0,0 +1,34 @@
+# Uncomment them and run according to the tutorial
+#from scapy.all import IP, TCP, send, UDP
+
+# # Step 1: Creating a simple IP packet
+# packet = IP(dst="192.168.1.1") # Setting the destination IP
+# packet = IP(dst="192.168.1.1") / TCP(dport=80, sport=12345, flags="S")
+# print(packet.show()) # Display packet details
+# send(packet)
+
+
+############
+# from scapy.all import ICMP
+
+# # Creating an ICMP Echo request packet
+# icmp_packet = IP(dst="192.168.1.1") / ICMP()
+# send(icmp_packet)
+
+
+############
+# from scapy.all import UDP
+
+# # Creating a UDP packet
+# udp_packet = IP(dst="192.168.1.1") / UDP(dport=53, sport=12345)
+# send(udp_packet)
+
+
+
+###########
+# blocked_packet = IP(dst="192.168.1.1") / TCP(dport=80, flags="S")
+# send(blocked_packet)
+
+# allowed_packet = IP(dst="192.168.1.1") / UDP(dport=53)
+# send(allowed_packet)
+
diff --git a/scapy/crafting-packets/requirements.txt b/scapy/crafting-packets/requirements.txt
new file mode 100644
index 00000000..93b351f4
--- /dev/null
+++ b/scapy/crafting-packets/requirements.txt
@@ -0,0 +1 @@
+scapy
\ No newline at end of file
diff --git a/scapy/ip-spoofer/README.md b/scapy/ip-spoofer/README.md
new file mode 100644
index 00000000..7ff62c7d
--- /dev/null
+++ b/scapy/ip-spoofer/README.md
@@ -0,0 +1,4 @@
+# [How to Perform IP Address Spoofing in Python](https://thepythoncode.com/article/make-an-ip-spoofer-in-python-using-scapy)
+To run this:
+- `pip install -r requirements.txt`
+- `python ip_spoofer.py [target_ip]`
\ No newline at end of file
diff --git a/scapy/ip-spoofer/ip_spoofer.py b/scapy/ip-spoofer/ip_spoofer.py
new file mode 100644
index 00000000..bcb8dc0c
--- /dev/null
+++ b/scapy/ip-spoofer/ip_spoofer.py
@@ -0,0 +1,42 @@
+# Import the neccasary modules.
+import sys
+from scapy.all import sr, IP, ICMP
+from faker import Faker
+from colorama import Fore, init
+
+# Initialize colorama for colored console output.
+init()
+# Create a Faker object for generating fake data.
+fake = Faker()
+
+# Function to generate a fake IPv4 address.
+def generate_fake_ip():
+ return fake.ipv4()
+
+# Function to craft and send an ICMP packet.
+def craft_and_send_packet(source_ip, destination_ip):
+ # Craft an ICMP packet with the specified source and destination IP.
+ packet = IP(src=source_ip, dst=destination_ip) / ICMP()
+ # Send and receive the packet with a timeout.
+ answers, _ = sr(packet, verbose=0, timeout=5)
+ return answers
+
+# Function to display a summary of the sent and received packets.
+def display_packet_summary(sent, received):
+ print(f"{Fore.GREEN}[+] Sent Packet: {sent.summary()}\n")
+ print(f"{Fore.MAGENTA}[+] Response: {received.summary()}")
+
+# Check if the correct number of command-line arguments is provided.
+if len(sys.argv) != 2:
+ print(f"{Fore.RED}[-] Error! {Fore.GREEN} Please run as: {sys.argv[0]} ")
+ sys.exit(1)
+
+# Retrieve the destination IP from the command-line arguments.
+destination_ip = sys.argv[1]
+# Generate a fake source IP.
+source_ip = generate_fake_ip()
+# Craft and send the packet, and receive the response.
+answers = craft_and_send_packet(source_ip, destination_ip)
+# Display the packet summary for each sent and received pair.
+for sent, received in answers:
+ display_packet_summary(sent, received)
diff --git a/scapy/ip-spoofer/requirements.txt b/scapy/ip-spoofer/requirements.txt
new file mode 100644
index 00000000..e9252b0c
--- /dev/null
+++ b/scapy/ip-spoofer/requirements.txt
@@ -0,0 +1,3 @@
+scapy
+faker
+colorama
\ No newline at end of file
diff --git a/scapy/uncover-hidden-wifis/README.md b/scapy/uncover-hidden-wifis/README.md
new file mode 100644
index 00000000..dcd094d6
--- /dev/null
+++ b/scapy/uncover-hidden-wifis/README.md
@@ -0,0 +1 @@
+# [How to See Hidden Wi-Fi Networks in Python](https://thepythoncode.com/article/uncovering-hidden-ssids-with-scapy-in-python)
\ No newline at end of file
diff --git a/scapy/uncover-hidden-wifis/requirements.txt b/scapy/uncover-hidden-wifis/requirements.txt
new file mode 100644
index 00000000..9661693f
--- /dev/null
+++ b/scapy/uncover-hidden-wifis/requirements.txt
@@ -0,0 +1,2 @@
+scapy
+colorama
\ No newline at end of file
diff --git a/scapy/uncover-hidden-wifis/view_hidden_ssids.py b/scapy/uncover-hidden-wifis/view_hidden_ssids.py
new file mode 100644
index 00000000..cd05db05
--- /dev/null
+++ b/scapy/uncover-hidden-wifis/view_hidden_ssids.py
@@ -0,0 +1,58 @@
+# Operating system functions.
+import os
+# Import all functions from scapy library.
+from scapy.all import *
+# Import Fore from colorama for colored console output, and init for colorama initialization.
+from colorama import Fore, init
+# Initialize colorama
+init()
+
+# Set to store unique SSIDs.
+seen_ssids = set()
+
+
+# Function to set the wireless adapter to monitor mode.
+def set_monitor_mode(interface):
+ # Bring the interface down.
+ os.system(f'ifconfig {interface} down')
+ # Set the mode to monitor.
+ os.system(f'iwconfig {interface} mode monitor')
+ # Bring the interface back up.
+ os.system(f'ifconfig {interface} up')
+
+
+# Function to process Wi-Fi packets.
+def process_wifi_packet(packet):
+ # Check if the packet is a Probe Request, Probe Response, or Association Request.
+ if packet.haslayer(Dot11ProbeReq) or packet.haslayer(Dot11ProbeResp) or packet.haslayer(Dot11AssoReq):
+ # Extract SSID and BSSID from the packet.
+ ssid = packet.info.decode('utf-8', errors='ignore')
+ bssid = packet.addr3
+
+ # Check if the SSID is not empty and not in the set of seen SSIDs, and if the BSSID is not the broadcast/multicast address.
+ if ssid and ssid not in seen_ssids and bssid.lower() != 'ff:ff:ff:ff:ff:ff':
+ # Add the SSID to the set.
+ seen_ssids.add(ssid)
+ # Print the identified SSID and BSSID in green.
+ print(f"{Fore.GREEN}[+] SSID: {ssid} ----> BSSID: {bssid}")
+
+
+# Main function.
+def main():
+ # Define the wireless interface.
+ wireless_interface = 'wlan0'
+
+ # Set the wireless adapter to monitor mode.
+ set_monitor_mode(wireless_interface)
+
+ # Print a message indicating that sniffing is starting on the specified interface in magenta.
+ print(f"{Fore.MAGENTA}[+] Sniffing on interface: {wireless_interface}")
+
+ # Start sniffing Wi-Fi packets on the specified interface, calling process_wifi_packet for each packet, and disabling packet storage
+ sniff(iface=wireless_interface, prn=process_wifi_packet, store=0)
+
+
+# Check if the script is being run as the main program.
+if __name__ == "__main__":
+ # Call the main function.
+ main()
diff --git a/web-programming/news_project/README.md b/web-programming/news_project/README.md
new file mode 100644
index 00000000..82c66b9b
--- /dev/null
+++ b/web-programming/news_project/README.md
@@ -0,0 +1 @@
+# [How to Build a News Site API with Django Rest Framework in Python](https://www.thepythoncode.com/article/a-news-site-api-with-django-python)
\ No newline at end of file
diff --git a/web-programming/news_project/db.sqlite3 b/web-programming/news_project/db.sqlite3
new file mode 100644
index 00000000..33a4832e
Binary files /dev/null and b/web-programming/news_project/db.sqlite3 differ
diff --git a/web-programming/news_project/manage.py b/web-programming/news_project/manage.py
new file mode 100644
index 00000000..10b64696
--- /dev/null
+++ b/web-programming/news_project/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'news_project.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/web-programming/news_project/news_app/__init__.py b/web-programming/news_project/news_app/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web-programming/news_project/news_app/admin.py b/web-programming/news_project/news_app/admin.py
new file mode 100644
index 00000000..312d626b
--- /dev/null
+++ b/web-programming/news_project/news_app/admin.py
@@ -0,0 +1,5 @@
+from django.contrib import admin
+from .models import *
+
+admin.site.register(Article)
+admin.site.register(Journalist)
diff --git a/web-programming/news_project/news_app/apps.py b/web-programming/news_project/news_app/apps.py
new file mode 100644
index 00000000..8e5c603c
--- /dev/null
+++ b/web-programming/news_project/news_app/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class NewsAppConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'news_app'
diff --git a/web-programming/news_project/news_app/migrations/0001_initial.py b/web-programming/news_project/news_app/migrations/0001_initial.py
new file mode 100644
index 00000000..90cf8f05
--- /dev/null
+++ b/web-programming/news_project/news_app/migrations/0001_initial.py
@@ -0,0 +1,36 @@
+# Generated by Django 4.1.3 on 2023-01-12 10:42
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Journalist',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('first_name', models.CharField(max_length=60)),
+ ('last_name', models.CharField(max_length=60)),
+ ('bio', models.CharField(max_length=200)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Article',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=120)),
+ ('description', models.CharField(max_length=200)),
+ ('body', models.TextField()),
+ ('location', models.CharField(max_length=120)),
+ ('publication_date', models.DateField()),
+ ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='articles', to='news_app.journalist')),
+ ],
+ ),
+ ]
diff --git a/web-programming/news_project/news_app/migrations/0002_alter_article_publication_date.py b/web-programming/news_project/news_app/migrations/0002_alter_article_publication_date.py
new file mode 100644
index 00000000..24962f60
--- /dev/null
+++ b/web-programming/news_project/news_app/migrations/0002_alter_article_publication_date.py
@@ -0,0 +1,18 @@
+# Generated by Django 4.1.3 on 2023-02-20 14:54
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('news_app', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='article',
+ name='publication_date',
+ field=models.DateField(auto_now_add=True),
+ ),
+ ]
diff --git a/web-programming/news_project/news_app/migrations/__init__.py b/web-programming/news_project/news_app/migrations/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web-programming/news_project/news_app/migrations/__pycache__/0001_initial.cpython-310.pyc b/web-programming/news_project/news_app/migrations/__pycache__/0001_initial.cpython-310.pyc
new file mode 100644
index 00000000..6c2cd5fa
Binary files /dev/null and b/web-programming/news_project/news_app/migrations/__pycache__/0001_initial.cpython-310.pyc differ
diff --git a/web-programming/news_project/news_app/migrations/__pycache__/0002_alter_article_publication_date.cpython-310.pyc b/web-programming/news_project/news_app/migrations/__pycache__/0002_alter_article_publication_date.cpython-310.pyc
new file mode 100644
index 00000000..ea271db7
Binary files /dev/null and b/web-programming/news_project/news_app/migrations/__pycache__/0002_alter_article_publication_date.cpython-310.pyc differ
diff --git a/web-programming/news_project/news_app/migrations/__pycache__/__init__.cpython-310.pyc b/web-programming/news_project/news_app/migrations/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 00000000..ead55c3b
Binary files /dev/null and b/web-programming/news_project/news_app/migrations/__pycache__/__init__.cpython-310.pyc differ
diff --git a/web-programming/news_project/news_app/models.py b/web-programming/news_project/news_app/models.py
new file mode 100644
index 00000000..84d955e1
--- /dev/null
+++ b/web-programming/news_project/news_app/models.py
@@ -0,0 +1,22 @@
+from django.db import models
+
+
+class Journalist(models.Model):
+ first_name = models.CharField(max_length=60)
+ last_name = models.CharField(max_length=60)
+ bio = models.CharField(max_length=200)
+ def __str__(self):
+ return f"{ self.first_name } - { self.last_name }"
+
+class Article(models.Model):
+ author = models.ForeignKey(Journalist,
+ on_delete=models.CASCADE,
+ related_name='articles')
+ title = models.CharField(max_length=120)
+ description = models.CharField(max_length=200)
+ body = models.TextField()
+ location = models.CharField(max_length=120)
+ publication_date = models.DateField(auto_now_add=True)
+
+ def __str__(self):
+ return f"{ self.author } - { self.title }"
diff --git a/web-programming/news_project/news_app/serializers.py b/web-programming/news_project/news_app/serializers.py
new file mode 100644
index 00000000..cb7f2cf7
--- /dev/null
+++ b/web-programming/news_project/news_app/serializers.py
@@ -0,0 +1,27 @@
+from rest_framework import serializers
+from .models import *
+
+class JournalistSerializer(serializers.Serializer):
+ first_name = serializers.CharField(max_length=60)
+ last_name = serializers.CharField(max_length=60)
+ bio = serializers.CharField()
+
+class ArticleSerializer(serializers.Serializer):
+ title = serializers.CharField()
+ description = serializers.CharField()
+ body = serializers.CharField()
+ location = serializers.CharField()
+ author_id = serializers.IntegerField()
+
+ def create(self, validated_data):
+ return Article.objects.create(**validated_data)
+
+ def update(self, instance, validated_data):
+ instance.title = validated_data.get('title', instance.title)
+ instance.description = validated_data.get('description', instance.description)
+ instance.body = validated_data.get('body', instance.body)
+ instance.author_id = validated_data.get('author_id', instance.author_id)
+ instance.location = validated_data.get('location', instance.location)
+ instance.publication_date = validated_data.get('publication_date', instance.publication_date)
+ instance.save()
+ return instance
diff --git a/web-programming/news_project/news_app/tests.py b/web-programming/news_project/news_app/tests.py
new file mode 100644
index 00000000..7ce503c2
--- /dev/null
+++ b/web-programming/news_project/news_app/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/web-programming/news_project/news_app/urls.py b/web-programming/news_project/news_app/urls.py
new file mode 100644
index 00000000..affc3eab
--- /dev/null
+++ b/web-programming/news_project/news_app/urls.py
@@ -0,0 +1,10 @@
+from django.urls import path
+from .views import JournalistView, ArticleView, ArticleDetailView
+
+app_name="news_app"
+
+urlpatterns=[
+ path('journalist/', JournalistView.as_view() ),
+ path('article/', ArticleView.as_view() ),
+ path('article//', ArticleDetailView.as_view()),
+]
diff --git a/web-programming/news_project/news_app/views.py b/web-programming/news_project/news_app/views.py
new file mode 100644
index 00000000..9540db8d
--- /dev/null
+++ b/web-programming/news_project/news_app/views.py
@@ -0,0 +1,42 @@
+from django.shortcuts import render
+
+from rest_framework.response import Response
+from rest_framework.views import APIView
+
+from .models import *
+from .serializers import JournalistSerializer, ArticleSerializer
+# Create your views here.
+from rest_framework.generics import get_object_or_404
+
+
+class JournalistView(APIView):
+ def get (self, request):
+ journalists = Journalist.objects.all()
+ serializer = JournalistSerializer(journalists, many=True)
+ return Response({"journalists":serializer.data})
+
+class ArticleView(APIView):
+ def get (self, request):
+ articles = Article.objects.all()
+ serializer = ArticleSerializer(articles, many=True)
+ return Response({"articles":serializer.data})
+
+ def post(self, request):
+ serializer = ArticleSerializer(data=request.data)
+ if serializer.is_valid(raise_exception=True):
+ saved_article = serializer.save()
+ return Response({"success": "Article '{}' created successfully".format(saved_article.title)})
+
+
+class ArticleDetailView(APIView):
+ def put(self, request, pk):
+ saved_article = get_object_or_404(Article.objects.all(), pk=pk)
+ serializer = ArticleSerializer(instance=saved_article, data=request.data, partial=True)
+ if serializer.is_valid(raise_exception=True):
+ article_saved = serializer.save()
+ return Response({"success": "Article '{}' updated successfully".format(article_saved.title)})
+
+ def delete(self, request, pk):
+ article = get_object_or_404(Article.objects.all(), pk=pk)
+ article.delete()
+ return Response({"message": "Article with id `{}` has been deleted.".format(pk)},status=204)
diff --git a/web-programming/news_project/news_project/__init__.py b/web-programming/news_project/news_project/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web-programming/news_project/news_project/asgi.py b/web-programming/news_project/news_project/asgi.py
new file mode 100644
index 00000000..984b7960
--- /dev/null
+++ b/web-programming/news_project/news_project/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for news_project project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'news_project.settings')
+
+application = get_asgi_application()
diff --git a/web-programming/news_project/news_project/settings.py b/web-programming/news_project/news_project/settings.py
new file mode 100644
index 00000000..4647e327
--- /dev/null
+++ b/web-programming/news_project/news_project/settings.py
@@ -0,0 +1,125 @@
+"""
+Django settings for news_project project.
+
+Generated by 'django-admin startproject' using Django 4.1.2.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.1/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.1/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-*#k+r4uiqb!=o1sn7!c(i%f)9t00s4gmzjzurmznvbphey3ie2'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'news_app',
+ 'rest_framework',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'news_project.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+WSGI_APPLICATION = 'news_project.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
+
+AUTH_PASSWORD_VALIDATORS = [
+ {
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.1/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.1/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/web-programming/news_project/news_project/urls.py b/web-programming/news_project/news_project/urls.py
new file mode 100644
index 00000000..ff163cdf
--- /dev/null
+++ b/web-programming/news_project/news_project/urls.py
@@ -0,0 +1,22 @@
+"""news_project URL Configuration
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/4.1/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path,include
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('api/',include('news_app.urls')),
+]
diff --git a/web-programming/news_project/news_project/wsgi.py b/web-programming/news_project/news_project/wsgi.py
new file mode 100644
index 00000000..712af45f
--- /dev/null
+++ b/web-programming/news_project/news_project/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for news_project project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'news_project.settings')
+
+application = get_wsgi_application()
diff --git a/web-programming/news_project/requirements.txt b/web-programming/news_project/requirements.txt
new file mode 100644
index 00000000..d80bd138
--- /dev/null
+++ b/web-programming/news_project/requirements.txt
@@ -0,0 +1,2 @@
+django
+djangorestframework
\ No newline at end of file
diff --git a/web-programming/restful-api-flask/README.md b/web-programming/restful-api-flask/README.md
new file mode 100644
index 00000000..33cae8c8
--- /dev/null
+++ b/web-programming/restful-api-flask/README.md
@@ -0,0 +1 @@
+# [How to Create a RESTful API with Flask in Python](https://www.thepythoncode.com/article/create-a-restful-api-with-flask-in-python)
\ No newline at end of file
diff --git a/web-programming/restful-api-flask/app.py b/web-programming/restful-api-flask/app.py
new file mode 100644
index 00000000..32e7fcf8
--- /dev/null
+++ b/web-programming/restful-api-flask/app.py
@@ -0,0 +1,22 @@
+from flask import Flask
+from flask_restful import Api
+from models import db
+import config
+from resources import TaskList
+
+# Create the Flask application and the Flask-RESTful API manager.
+app = Flask(__name__)
+app.config.from_object(config)
+# Initialize the Flask-SQLAlchemy object.
+db.init_app(app)
+# Create the Flask-RESTful API manager.
+api = Api(app)
+# Create the endpoints.
+api.add_resource(TaskList, '/tasks')
+
+if __name__ == '__main__':
+ # Create the database tables.
+ with app.app_context():
+ db.create_all()
+ # Start the Flask development web server.
+ app.run(debug=True)
diff --git a/web-programming/restful-api-flask/config.py b/web-programming/restful-api-flask/config.py
new file mode 100644
index 00000000..3974b455
--- /dev/null
+++ b/web-programming/restful-api-flask/config.py
@@ -0,0 +1 @@
+SQLALCHEMY_DATABASE_URI = 'sqlite:///tasks.db'
\ No newline at end of file
diff --git a/web-programming/restful-api-flask/models.py b/web-programming/restful-api-flask/models.py
new file mode 100644
index 00000000..3d792130
--- /dev/null
+++ b/web-programming/restful-api-flask/models.py
@@ -0,0 +1,11 @@
+from flask_sqlalchemy import SQLAlchemy
+
+db = SQLAlchemy()
+
+class Task(db.Model):
+ id = db.Column(db.Integer, primary_key=True)
+ description = db.Column(db.String(200), nullable=False) # nullable=False means that the column cannot be empty
+
+ def __repr__(self):
+ # This method is used to print the object.
+ return f'Task {self.id}: {self.description}'
diff --git a/web-programming/restful-api-flask/requirements.txt b/web-programming/restful-api-flask/requirements.txt
new file mode 100644
index 00000000..d3d142f8
--- /dev/null
+++ b/web-programming/restful-api-flask/requirements.txt
@@ -0,0 +1,3 @@
+Flask
+Flask-RESTful
+Flask-SQLAlchemy
\ No newline at end of file
diff --git a/web-programming/restful-api-flask/resources.py b/web-programming/restful-api-flask/resources.py
new file mode 100644
index 00000000..ea917f7c
--- /dev/null
+++ b/web-programming/restful-api-flask/resources.py
@@ -0,0 +1,29 @@
+from flask_restful import Resource
+from flask import request
+from models import Task, db
+
+class TaskList(Resource):
+ def get(self):
+ # Get all the tasks from the database.
+ tasks = Task.query.all()
+ # Convert the tasks to JSON and return a response.
+ task_list = [{'id': task.id, 'description': task.description} for task in tasks]
+ return {'tasks': task_list}
+
+ def post(self):
+ # Get the JSON data from the request.
+ task_data = request.get_json()
+ # Check if the data is valid.
+ if not task_data:
+ return {'message': 'No input data provided'}, 400
+ description = task_data.get('description')
+ if not description:
+ return {'message': 'Description is required'}, 400
+ # Add the task to the database.
+ new_task = Task(description=description)
+ db.session.add(new_task)
+ # Commit the task to the database.
+ db.session.commit()
+ # Return a message to the user.
+ return {'message': 'Task added', 'task': {'id': new_task.id, 'description': new_task.description}}
+
diff --git a/web-programming/restful-api-flask/tasks.db b/web-programming/restful-api-flask/tasks.db
new file mode 100644
index 00000000..6273f7df
Binary files /dev/null and b/web-programming/restful-api-flask/tasks.db differ
diff --git a/web-programming/webassistant/assistant/templates/assistant/home.html b/web-programming/webassistant/assistant/templates/assistant/home.html
index 76ad6e64..8ca690b3 100644
--- a/web-programming/webassistant/assistant/templates/assistant/home.html
+++ b/web-programming/webassistant/assistant/templates/assistant/home.html
@@ -1,43 +1,35 @@
{% extends 'assistant/base.html' %}
-
{% block title %} Home {% endblock %}
-
{% block content %}
-
-
-
-
-
Hello, am your web assistant here to help you, what's on your mind?
-
+
+ New Chat +
+
+
+ {% for message in messages %}
+
+
+ {{ message.role|title }}: {{ message.content|linebreaksbr }}
+
+
+ {% endfor %}
+
-
-
-
-
- {{ formatted_response }}
-
-
-
-
-
-
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/web-programming/webassistant/assistant/urls.py b/web-programming/webassistant/assistant/urls.py
index 462768cf..94d8d242 100644
--- a/web-programming/webassistant/assistant/urls.py
+++ b/web-programming/webassistant/assistant/urls.py
@@ -5,6 +5,7 @@
# a list of all the urls
urlpatterns = [
- path('home/', views.home, name='home'),
+ path('', views.home, name='home'),
+ path('new_chat/', views.new_chat, name='new_chat'),
path('error-handler/', views.error_handler, name='error_handler'),
]
\ No newline at end of file
diff --git a/web-programming/webassistant/assistant/views.py b/web-programming/webassistant/assistant/views.py
index a0bc2e5c..2d5b573d 100644
--- a/web-programming/webassistant/assistant/views.py
+++ b/web-programming/webassistant/assistant/views.py
@@ -4,43 +4,66 @@
import openai
# import the generated API key from the secret_key file
from .secret_key import API_KEY
-
-
# loading the API key from the secret_key file
openai.api_key = API_KEY
-
# this is the home view for handling home page logic
def home(request):
- # the try statement is for sending request to the API and getting back the response
- # formatting it and rendering it in the template
try:
- # checking if the request method is POST
+ # if the session does not have a messages key, create one
+ if 'messages' not in request.session:
+ request.session['messages'] = [
+ {"role": "system", "content": "You are now chatting with a user, provide them with comprehensive, short and concise answers."},
+ ]
+
if request.method == 'POST':
- # getting prompt data from the form
+ # get the prompt from the form
prompt = request.POST.get('prompt')
- # making a request to the API
- response = openai.Completion.create(model="text-davinci-003", prompt=prompt, temperature=1, max_tokens=1000)
- # formatting the response input
- formatted_response = response['choices'][0]['text']
- # bundling everything in the context
+ # get the temperature from the form
+ temperature = float(request.POST.get('temperature', 0.1))
+ # append the prompt to the messages list
+ request.session['messages'].append({"role": "user", "content": prompt})
+ # set the session as modified
+ request.session.modified = True
+ # call the openai API
+ response = openai.ChatCompletion.create(
+ model="gpt-3.5-turbo",
+ messages=request.session['messages'],
+ temperature=temperature,
+ max_tokens=1000,
+ )
+ # format the response
+ formatted_response = response['choices'][0]['message']['content']
+ # append the response to the messages list
+ request.session['messages'].append({"role": "assistant", "content": formatted_response})
+ request.session.modified = True
+ # redirect to the home page
context = {
- 'formatted_response': formatted_response,
- 'prompt': prompt
+ 'messages': request.session['messages'],
+ 'prompt': '',
+ 'temperature': temperature,
}
- # this will render the results in the home.html template
return render(request, 'assistant/home.html', context)
- # this runs if the request method is GET
else:
- # this will render when there is no request POST or after every POST request
- return render(request, 'assistant/home.html')
-
- # the except statement will capture any error
- except:
- # this will redirect to the 404 page after any error is caught
+ # if the request is not a POST request, render the home page
+ context = {
+ 'messages': request.session['messages'],
+ 'prompt': '',
+ 'temperature': 0.1,
+ }
+ return render(request, 'assistant/home.html', context)
+ except Exception as e:
+ print(e)
+ # if there is an error, redirect to the error handler
return redirect('error_handler')
+def new_chat(request):
+ # clear the messages list
+ request.session.pop('messages', None)
+ return redirect('home')
+
+
# this is the view for handling errors
def error_handler(request):
return render(request, 'assistant/404.html')
diff --git a/web-programming/webassistant/webassistant/urls.py b/web-programming/webassistant/webassistant/urls.py
index e01875f7..c30ec629 100644
--- a/web-programming/webassistant/webassistant/urls.py
+++ b/web-programming/webassistant/webassistant/urls.py
@@ -6,5 +6,5 @@
# the url to the admin site
path('admin/', admin.site.urls),
# registering all the assistant application urls
- path('webassistant/', include('assistant.urls')),
+ path('', include('assistant.urls')),
]
diff --git a/web-scraping/currency-converter/currency_converter_currencyapi.py b/web-scraping/currency-converter/currency_converter_currencyapi.py
new file mode 100644
index 00000000..f70c57c8
--- /dev/null
+++ b/web-scraping/currency-converter/currency_converter_currencyapi.py
@@ -0,0 +1,48 @@
+import requests
+import urllib.parse as p
+
+API_KEY = ""
+base_url = "https://api.currencyapi.com/v3/"
+
+# utility function that both functions will use
+def get_currencyapi_data(endpoint, date=None, base_currency="USD", print_all=True):
+ """Get the list of currency codes from the API"""
+ # construct the url
+ url = p.urljoin(base_url,
+ f"{endpoint}?apikey={API_KEY}{'' if endpoint == 'latest' else f'&date={date}'}&base_currency={base_currency}")
+ # make the request
+ res = requests.get(url)
+ # get the json data
+ data = res.json()
+ # print all the currency codes and their values
+ c = 0
+ if print_all:
+ for currency_code, currency_name in data.get("data").items():
+ print(f"{currency_code}: {currency_name.get('value')}")
+ c += 1
+
+ print(f"Total: {c} currencies")
+ if endpoint == "latest":
+ # get the last updated date
+ last_updated = data.get("meta").get("last_updated_at")
+ print(f"Last updated: {last_updated}")
+ return data
+
+def get_latest_rates(base_currency="USD", print_all=True):
+ """Get the latest rates from the API"""
+ return get_currencyapi_data(endpoint="latest", base_currency=base_currency, print_all=print_all)
+
+def get_historical_rates(base_currency="USD", print_all=True, date="2023-01-01"):
+ """Get the historical rates from the Currency API
+ `date` must be in the format of YYYY-MM-DD"""
+ return get_currencyapi_data(endpoint="historical", base_currency=base_currency, date=date, print_all=print_all)
+
+
+if __name__ == "__main__":
+ latest_rates = get_latest_rates()
+ print(f"\n{'-'*50}\n")
+ # get the historical rates for the date 2021-01-01
+ historical_rates = get_historical_rates(date="2021-01-01", print_all=False)
+ # get EUR rate, for example
+ eur_rate = historical_rates.get("data").get("EUR").get("value")
+ print(f"EUR rate on 2021-01-01: {eur_rate}")
\ No newline at end of file
diff --git a/web-scraping/pdf-image-extractor/README.md b/web-scraping/pdf-image-extractor/README.md
index cd99ee53..3f3826ff 100644
--- a/web-scraping/pdf-image-extractor/README.md
+++ b/web-scraping/pdf-image-extractor/README.md
@@ -12,4 +12,20 @@ To run this:
[+] Found a total of 3 images in page 2
[!] No images found on page 3
[!] No images found on page 4
+ ```
+- To extract and save all images of 800x800 and higher of `1710.05006.pdf` PDF file, and save them in `images` directory in the PNG format, you run:
+ ```
+ python pdf_image_extractor_cli.py 1710.05006.pdf -o extracted-images -f png -w 800 -he 800
+ ```
+ This will save all available images in the `images` directory and outputs:
+ ```
+ [!] No images found on page 0
+ [+] Found a total of 3 images in page 1
+ [-] Skipping image 1 on page 1 due to its small size.
+ [-] Skipping image 2 on page 1 due to its small size.
+ [-] Skipping image 3 on page 1 due to its small size.
+ [+] Found a total of 3 images in page 2
+ [-] Skipping image 2 on page 2 due to its small size.
+ [!] No images found on page 3
+ [!] No images found on page 4
```
\ No newline at end of file
diff --git a/web-scraping/pdf-image-extractor/pdf_image_extractor.py b/web-scraping/pdf-image-extractor/pdf_image_extractor.py
index 8f4b1129..2e873aec 100644
--- a/web-scraping/pdf-image-extractor/pdf_image_extractor.py
+++ b/web-scraping/pdf-image-extractor/pdf_image_extractor.py
@@ -1,31 +1,48 @@
-import fitz # PyMuPDF
+import os
+import fitz # PyMuPDF
import io
from PIL import Image
-# file path you want to extract images from
+# Output directory for the extracted images
+output_dir = "extracted_images"
+# Desired output image format
+output_format = "png"
+# Minimum width and height for extracted images
+min_width = 100
+min_height = 100
+# Create the output directory if it does not exist
+if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+# File path you want to extract images from
file = "1710.05006.pdf"
-# open the file
+# Open the file
pdf_file = fitz.open(file)
-# iterate over PDF pages
+# Iterate over PDF pages
for page_index in range(len(pdf_file)):
- # get the page itself
+ # Get the page itself
page = pdf_file[page_index]
- # get image list
- image_list = page.get_images()
- # printing number of images found in this page
+ # Get image list
+ image_list = page.get_images(full=True)
+ # Print the number of images found on this page
if image_list:
print(f"[+] Found a total of {len(image_list)} images in page {page_index}")
else:
- print("[!] No images found on page", page_index)
+ print(f"[!] No images found on page {page_index}")
+ # Iterate over the images on the page
for image_index, img in enumerate(image_list, start=1):
- # get the XREF of the image
+ # Get the XREF of the image
xref = img[0]
- # extract the image bytes
+ # Extract the image bytes
base_image = pdf_file.extract_image(xref)
image_bytes = base_image["image"]
- # get the image extension
+ # Get the image extension
image_ext = base_image["ext"]
- # load it to PIL
+ # Load it to PIL
image = Image.open(io.BytesIO(image_bytes))
- # save it to local disk
- image.save(open(f"image{page_index+1}_{image_index}.{image_ext}", "wb"))
\ No newline at end of file
+ # Check if the image meets the minimum dimensions and save it
+ if image.width >= min_width and image.height >= min_height:
+ image.save(
+ open(os.path.join(output_dir, f"image{page_index + 1}_{image_index}.{output_format}"), "wb"),
+ format=output_format.upper())
+ else:
+ print(f"[-] Skipping image {image_index} on page {page_index} due to its small size.")
diff --git a/web-scraping/pdf-image-extractor/pdf_image_extractor_cli.py b/web-scraping/pdf-image-extractor/pdf_image_extractor_cli.py
new file mode 100644
index 00000000..2eccc896
--- /dev/null
+++ b/web-scraping/pdf-image-extractor/pdf_image_extractor_cli.py
@@ -0,0 +1,58 @@
+import os
+import fitz # PyMuPDF
+import io
+from PIL import Image
+import argparse
+
+parser = argparse.ArgumentParser(description="Extract images from a PDF file.")
+parser.add_argument("file", help="PDF file to extract images from.")
+parser.add_argument("-o", "--output", help="Output directory for the extracted images.", default="extracted_images")
+parser.add_argument("-f", "--format", help="Desired output image format, default is PNG.", default="png")
+parser.add_argument("-w", "--width", help="Minimum width for extracted images, default is 100.", default=100, type=int)
+parser.add_argument("-he", "--height", help="Minimum height for extracted images, default is 100.", default=100, type=int)
+# Parse the arguments
+args = parser.parse_args()
+
+# Output directory for the extracted images
+output_dir = args.output
+# Desired output image format
+output_format = args.format
+# Minimum width and height for extracted images
+min_width = args.width
+min_height = args.height
+# Create the output directory if it does not exist
+if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+# File path you want to extract images from
+file = args.file
+# Open the file
+pdf_file = fitz.open(file)
+# Iterate over PDF pages
+for page_index in range(len(pdf_file)):
+ # Get the page itself
+ page = pdf_file[page_index]
+ # Get image list
+ image_list = page.get_images(full=True)
+ # Print the number of images found on this page
+ if image_list:
+ print(f"[+] Found a total of {len(image_list)} images in page {page_index}")
+ else:
+ print(f"[!] No images found on page {page_index}")
+ # Iterate over the images on the page
+ for image_index, img in enumerate(image_list, start=1):
+ # Get the XREF of the image
+ xref = img[0]
+ # Extract the image bytes
+ base_image = pdf_file.extract_image(xref)
+ image_bytes = base_image["image"]
+ # Get the image extension
+ image_ext = base_image["ext"]
+ # Load it to PIL
+ image = Image.open(io.BytesIO(image_bytes))
+ # Check if the image meets the minimum dimensions and save it
+ if image.width >= min_width and image.height >= min_height:
+ image.save(
+ open(os.path.join(output_dir, f"image{page_index + 1}_{image_index}.{output_format}"), "wb"),
+ format=output_format.upper())
+ else:
+ print(f"[-] Skipping image {image_index} on page {page_index} due to its small size.")
diff --git a/web-scraping/youtube-extractor/extract_video_info.py b/web-scraping/youtube-extractor/extract_video_info.py
index 042ce4f8..bed184b0 100644
--- a/web-scraping/youtube-extractor/extract_video_info.py
+++ b/web-scraping/youtube-extractor/extract_video_info.py
@@ -1,92 +1,150 @@
-from requests_html import HTMLSession
-from bs4 import BeautifulSoup as bs
+import requests
+from bs4 import BeautifulSoup
import re
import json
-
-# init session
-session = HTMLSession()
-
+import argparse
def get_video_info(url):
- # download HTML code
- response = session.get(url)
- # execute Javascript
- response.html.render(timeout=60)
- # create beautiful soup object to parse HTML
- soup = bs(response.html.html, "html.parser")
- # open("index.html", "w").write(response.html.html)
- # initialize the result
- result = {}
- # video title
- result["title"] = soup.find("meta", itemprop="name")['content']
- # video views
- result["views"] = soup.find("meta", itemprop="interactionCount")['content']
- # video description
- result["description"] = soup.find("meta", itemprop="description")['content']
- # date published
- result["date_published"] = soup.find("meta", itemprop="datePublished")['content']
- # get the duration of the video
- result["duration"] = soup.find("span", {"class": "ytp-time-duration"}).text
- # get the video tags
- result["tags"] = ', '.join([ meta.attrs.get("content") for meta in soup.find_all("meta", {"property": "og:video:tag"}) ])
-
- # Additional video and channel information (with help from: https://stackoverflow.com/a/68262735)
- data = re.search(r"var ytInitialData = ({.*?});", soup.prettify()).group(1)
- data_json = json.loads(data)
- videoPrimaryInfoRenderer = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents'][0]['videoPrimaryInfoRenderer']
- videoSecondaryInfoRenderer = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer']
- # number of likes
- likes_label = videoPrimaryInfoRenderer['videoActions']['menuRenderer']['topLevelButtons'][0]['toggleButtonRenderer']['defaultText']['accessibility']['accessibilityData']['label'] # "No likes" or "###,### likes"
- likes_str = likes_label.split(' ')[0].replace(',','')
- result["likes"] = '0' if likes_str == 'No' else likes_str
- # number of likes (old way) doesn't always work
- # text_yt_formatted_strings = soup.find_all("yt-formatted-string", {"id": "text", "class": "ytd-toggle-button-renderer"})
- # result["likes"] = ''.join([ c for c in text_yt_formatted_strings[0].attrs.get("aria-label") if c.isdigit() ])
- # result["likes"] = 0 if result['likes'] == '' else int(result['likes'])
- # number of dislikes - YouTube does not publish this anymore...
- # result["dislikes"] = ''.join([ c for c in text_yt_formatted_strings[1].attrs.get("aria-label") if c.isdigit() ])
- # result["dislikes"] = '0' if result['dislikes'] == '' else result['dislikes']
- result['dislikes'] = 'UNKNOWN'
- # channel details
- channel_tag = soup.find("meta", itemprop="channelId")['content']
- # channel name
- channel_name = soup.find("span", itemprop="author").next.next['content']
- # channel URL
- # channel_url = soup.find("span", itemprop="author").next['href']
- channel_url = f"https://www.youtube.com/%7Bchannel_tag%7D"
- # number of subscribers as str
- channel_subscribers = videoSecondaryInfoRenderer['owner']['videoOwnerRenderer']['subscriberCountText']['accessibility']['accessibilityData']['label']
- # channel details (old way)
- # channel_tag = soup.find("yt-formatted-string", {"class": "ytd-channel-name"}).find("a")
- # # channel name (old way)
- # channel_name = channel_tag.text
- # # channel URL (old way)
- # channel_url = f"https://www.youtube.com{channel_tag['href']}"
- # number of subscribers as str (old way)
- # channel_subscribers = soup.find("yt-formatted-string", {"id": "owner-sub-count"}).text.strip()
- result['channel'] = {'name': channel_name, 'url': channel_url, 'subscribers': channel_subscribers}
- return result
+ """
+ Extract video information from YouTube using modern approach
+ """
+ headers = {
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
+ }
+
+ try:
+ # Download HTML code
+ response = requests.get(url, headers=headers)
+ response.raise_for_status()
+
+ # Create beautiful soup object to parse HTML
+ soup = BeautifulSoup(response.text, "html.parser")
+
+ # Initialize the result
+ result = {}
+
+ # Extract ytInitialData which contains all the video information
+ data_match = re.search(r'var ytInitialData = ({.*?});', response.text)
+ if not data_match:
+ raise Exception("Could not find ytInitialData in page")
+
+ data_json = json.loads(data_match.group(1))
+
+ # Get the main content sections
+ contents = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents']
+
+ # Extract video information from videoPrimaryInfoRenderer
+ if 'videoPrimaryInfoRenderer' in contents[0]:
+ primary = contents[0]['videoPrimaryInfoRenderer']
+
+ # Video title
+ result["title"] = primary['title']['runs'][0]['text']
+
+ # Video views
+ result["views"] = primary['viewCount']['videoViewCountRenderer']['viewCount']['simpleText']
+
+ # Date published
+ result["date_published"] = primary['dateText']['simpleText']
+
+ # Extract channel information from videoSecondaryInfoRenderer
+ secondary = None
+ if 'videoSecondaryInfoRenderer' in contents[1]:
+ secondary = contents[1]['videoSecondaryInfoRenderer']
+ owner = secondary['owner']['videoOwnerRenderer']
+
+ # Channel name
+ channel_name = owner['title']['runs'][0]['text']
+
+ # Channel ID
+ channel_id = owner['navigationEndpoint']['browseEndpoint']['browseId']
+
+ # Channel URL - FIXED with proper /channel/ path
+ channel_url = f"https://www.youtube.com/channel/%7Bchannel_id%7D"
+
+ # Number of subscribers
+ channel_subscribers = owner['subscriberCountText']['accessibility']['accessibilityData']['label']
+
+ result['channel'] = {
+ 'name': channel_name,
+ 'url': channel_url,
+ 'subscribers': channel_subscribers
+ }
+
+ # Extract video description
+ if secondary and 'attributedDescription' in secondary:
+ description_runs = secondary['attributedDescription']['content']
+ result["description"] = description_runs
+ else:
+ result["description"] = "Description not available"
+
+ # Try to extract video duration from player overlay
+ # This is a fallback approach since the original method doesn't work
+ duration_match = re.search(r'"approxDurationMs":"(\d+)"', response.text)
+ if duration_match:
+ duration_ms = int(duration_match.group(1))
+ minutes = duration_ms // 60000
+ seconds = (duration_ms % 60000) // 1000
+ result["duration"] = f"{minutes}:{seconds:02d}"
+ else:
+ result["duration"] = "Duration not available"
+
+ # Extract video tags if available
+ video_tags = []
+ if 'keywords' in data_json.get('metadata', {}).get('videoMetadataRenderer', {}):
+ video_tags = data_json['metadata']['videoMetadataRenderer']['keywords']
+ result["tags"] = ', '.join(video_tags) if video_tags else "No tags available"
+
+ # Extract likes (modern approach)
+ result["likes"] = "Likes count not available"
+ result["dislikes"] = "UNKNOWN" # YouTube no longer shows dislikes
+
+ # Try to find likes in the new structure
+ for content in contents:
+ if 'compositeVideoPrimaryInfoRenderer' in content:
+ composite = content['compositeVideoPrimaryInfoRenderer']
+ if 'likeButton' in composite:
+ like_button = composite['likeButton']
+ if 'toggleButtonRenderer' in like_button:
+ toggle = like_button['toggleButtonRenderer']
+ if 'defaultText' in toggle:
+ default_text = toggle['defaultText']
+ if 'accessibility' in default_text:
+ accessibility = default_text['accessibility']
+ if 'accessibilityData' in accessibility:
+ label = accessibility['accessibilityData']['label']
+ if 'like' in label.lower():
+ result["likes"] = label
+
+ return result
+
+ except Exception as e:
+ raise Exception(f"Error extracting video info: {str(e)}")
if __name__ == "__main__":
- import argparse
parser = argparse.ArgumentParser(description="YouTube Video Data Extractor")
parser.add_argument("url", help="URL of the YouTube video")
args = parser.parse_args()
+
# parse the video URL from command line
url = args.url
- data = get_video_info(url)
+ try:
+ data = get_video_info(url)
- # print in nice format
- print(f"Title: {data['title']}")
- print(f"Views: {data['views']}")
- print(f"Published at: {data['date_published']}")
- print(f"Video Duration: {data['duration']}")
- print(f"Video tags: {data['tags']}")
- print(f"Likes: {data['likes']}")
- print(f"Dislikes: {data['dislikes']}")
- print(f"\nDescription: {data['description']}\n")
- print(f"\nChannel Name: {data['channel']['name']}")
- print(f"Channel URL: {data['channel']['url']}")
- print(f"Channel Subscribers: {data['channel']['subscribers']}")
+ # print in nice format
+ print(f"Title: {data['title']}")
+ print(f"Views: {data['views']}")
+ print(f"Published at: {data['date_published']}")
+ print(f"Video Duration: {data['duration']}")
+ print(f"Video tags: {data['tags']}")
+ print(f"Likes: {data['likes']}")
+ print(f"Dislikes: {data['dislikes']}")
+ print(f"\nDescription: {data['description']}\n")
+ print(f"\nChannel Name: {data['channel']['name']}")
+ print(f"Channel URL: {data['channel']['url']}")
+ print(f"Channel Subscribers: {data['channel']['subscribers']}")
+
+ except Exception as e:
+ print(f"Error: {e}")
+ print("\nNote: YouTube frequently changes its structure, so this script may need updates.")
\ No newline at end of file
diff --git a/web-scraping/youtube-transcript-summarizer/README.md b/web-scraping/youtube-transcript-summarizer/README.md
new file mode 100644
index 00000000..a3df25a0
--- /dev/null
+++ b/web-scraping/youtube-transcript-summarizer/README.md
@@ -0,0 +1 @@
+# [YouTube Video Transcription Summarization with Python](https://thepythoncode.com/article/youtube-video-transcription-and-summarization-with-python)
\ No newline at end of file
diff --git a/web-scraping/youtube-transcript-summarizer/requirements.txt b/web-scraping/youtube-transcript-summarizer/requirements.txt
new file mode 100644
index 00000000..865ee3b5
--- /dev/null
+++ b/web-scraping/youtube-transcript-summarizer/requirements.txt
@@ -0,0 +1,5 @@
+nltk
+pytube
+youtube_transcript_api
+colorama
+openai
diff --git a/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py b/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py
new file mode 100644
index 00000000..bdb80f54
--- /dev/null
+++ b/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py
@@ -0,0 +1,319 @@
+import os
+import sys
+import nltk
+import pytube
+from youtube_transcript_api import YouTubeTranscriptApi
+from nltk.corpus import stopwords
+from nltk.tokenize import sent_tokenize, word_tokenize
+from nltk.probability import FreqDist
+from heapq import nlargest
+from urllib.parse import urlparse, parse_qs
+import textwrap
+from colorama import Fore, Back, Style, init
+from openai import OpenAI
+
+# Initialize colorama for cross-platform colored terminal output
+init(autoreset=True)
+
+# Download necessary NLTK data
+nltk.download('punkt_tab', quiet=True)
+nltk.download('punkt', quiet=True)
+nltk.download('stopwords', quiet=True)
+
+# Initialize OpenAI client from environment variable
+# Expect the OpenRouter API key to be provided via OPENROUTER_API_KEY
+api_key = os.getenv("OPENROUTER_API_KEY")
+if not api_key:
+ print(Fore.RED + "Error: OPENROUTER_API_KEY environment variable is not set or is still the placeholder ('').")
+ sys.exit(1)
+else:
+ client = OpenAI(
+ base_url="https://openrouter.ai/api/v1",
+ api_key=api_key,
+ )
+
+def extract_video_id(youtube_url):
+ """Extract the video ID from a YouTube URL."""
+ parsed_url = urlparse(youtube_url)
+
+ if parsed_url.netloc == 'youtu.be':
+ return parsed_url.path[1:]
+
+ if parsed_url.netloc in ('www.youtube.com', 'youtube.com'):
+ if parsed_url.path == '/watch':
+ return parse_qs(parsed_url.query)['v'][0]
+ elif parsed_url.path.startswith('/embed/'):
+ return parsed_url.path.split('/')[2]
+ elif parsed_url.path.startswith('/v/'):
+ return parsed_url.path.split('/')[2]
+
+ # If no match found
+ raise ValueError(f"Could not extract video ID from URL: {youtube_url}")
+
+def get_transcript(video_id):
+ """Get the transcript of a YouTube video."""
+ try:
+ youtube_transcript_api = YouTubeTranscriptApi()
+ fetched_transcript = youtube_transcript_api.fetch(video_id)
+ full_transcript = " ".join([snippet.text for snippet in fetched_transcript.snippets])
+ return full_transcript.strip()
+ except Exception as e:
+ return f"Error retrieving transcript: {str(e)}."
+
+def summarize_text_nltk(text, num_sentences=5):
+ """Summarize text using frequency-based extractive summarization with NLTK."""
+ if not text or text.startswith("Error") or text.startswith("Transcript not available"):
+ return text
+
+ # Tokenize the text into sentences and words
+ sentences = sent_tokenize(text)
+
+ # If there are fewer sentences than requested, return all sentences
+ if len(sentences) <= num_sentences:
+ return text
+
+ # Tokenize words and remove stopwords
+ stop_words = set(stopwords.words('english'))
+ words = word_tokenize(text.lower())
+ words = [word for word in words if word.isalnum() and word not in stop_words]
+
+ # Calculate word frequencies
+ freq = FreqDist(words)
+
+ # Score sentences based on word frequencies
+ sentence_scores = {}
+ for i, sentence in enumerate(sentences):
+ for word in word_tokenize(sentence.lower()):
+ if word in freq:
+ if i in sentence_scores:
+ sentence_scores[i] += freq[word]
+ else:
+ sentence_scores[i] = freq[word]
+
+ # Get the top N sentences with highest scores
+ summary_sentences_indices = nlargest(num_sentences, sentence_scores, key=sentence_scores.get)
+ summary_sentences_indices.sort() # Sort to maintain original order
+
+ # Construct the summary
+ summary = ' '.join([sentences[i] for i in summary_sentences_indices])
+ return summary
+
+def summarize_text_ai(text, video_title, num_sentences=5):
+ """Summarize text using the Mistral AI model via OpenRouter."""
+ if not text or text.startswith("Error") or text.startswith("Transcript not available"):
+ return text
+
+ # Truncate text if it's too long (models often have token limits)
+ max_chars = 15000 # Adjust based on model's context window
+ truncated_text = text[:max_chars] if len(text) > max_chars else text
+
+ prompt = f"""Please provide a concise summary of the following YouTube video transcript.
+Title: {video_title}
+
+Transcript:
+{truncated_text}
+
+Create a clear, informative summary that captures the main points and key insights from the video.
+Your summary should be approximately {num_sentences} sentences long.
+"""
+
+ try:
+ completion = client.chat.completions.create(
+ model="mistralai/mistral-small-3.1-24b-instruct:free",
+ messages=[
+ {
+ "role": "user",
+ "content": [
+ {
+ "type": "text",
+ "text": prompt
+ }
+ ]
+ }
+ ]
+ )
+ return completion.choices[0].message.content
+ except Exception as e:
+ return f"Error generating AI summary: {str(e)}"
+
+def summarize_youtube_video(youtube_url, num_sentences=5):
+ """Main function to summarize a YouTube video's transcription."""
+ try:
+ video_id = extract_video_id(youtube_url)
+ transcript = get_transcript(video_id)
+
+ # Get video title for context
+ try:
+ yt = pytube.YouTube(youtube_url)
+ video_title = yt.title
+
+ except Exception as e:
+ video_title = "Unknown Title"
+
+
+ # Generate both summaries
+ print(Fore.YELLOW + f"Generating AI summary with {num_sentences} sentences...")
+ ai_summary = summarize_text_ai(transcript, video_title, num_sentences)
+
+ print(Fore.YELLOW + f"Generating NLTK summary with {num_sentences} sentences...")
+ nltk_summary = summarize_text_nltk(transcript, num_sentences)
+
+ return {
+ "video_title": video_title,
+ "video_id": video_id,
+ "ai_summary": ai_summary,
+ "nltk_summary": nltk_summary,
+ "full_transcript_length": len(transcript.split()),
+ "nltk_summary_length": len(nltk_summary.split()),
+ "ai_summary_length": len(ai_summary.split()) if not ai_summary.startswith("Error") else 0
+ }
+ except Exception as e:
+ return {"error": str(e)}
+
+def format_time(seconds):
+ """Convert seconds to a readable time format."""
+ hours, remainder = divmod(seconds, 3600)
+ minutes, seconds = divmod(remainder, 60)
+
+ if hours > 0:
+ return f"{hours}h {minutes}m {seconds}s"
+ elif minutes > 0:
+ return f"{minutes}m {seconds}s"
+ else:
+ return f"{seconds}s"
+
+def format_number(number):
+ """Format large numbers with commas for readability."""
+ return "{:,}".format(number)
+
+def print_boxed_text(text, width=80, title=None, color=Fore.WHITE):
+ """Print text in a nice box with optional title."""
+ wrapper = textwrap.TextWrapper(width=width-4) # -4 for the box margins
+ wrapped_text = wrapper.fill(text)
+ lines = wrapped_text.split('\n')
+
+ # Print top border with optional title
+ if title:
+ title_space = width - 4 - len(title)
+ left_padding = title_space // 2
+ right_padding = title_space - left_padding
+ print(color + '┌' + '─' * left_padding + title + '─' * right_padding + '┐')
+ else:
+ print(color + '┌' + '─' * (width-2) + '┐')
+
+ # Print content
+ for line in lines:
+ padding = width - 2 - len(line)
+ print(color + '│ ' + line + ' ' * padding + '│')
+
+ # Print bottom border
+ print(color + '└' + '─' * (width-2) + '┘')
+
+def print_summary_result(result, width=80):
+ """Print the summary result in a nicely formatted way."""
+ if "error" in result:
+ print_boxed_text(f"Error: {result['error']}", width=width, title="ERROR", color=Fore.RED)
+ return
+
+ # Terminal width
+ terminal_width = width
+
+ # Print header with video information
+ print("\n" + Fore.CYAN + "=" * terminal_width)
+ print(Fore.CYAN + Style.BRIGHT + result['video_title'].center(terminal_width))
+ print(Fore.CYAN + "=" * terminal_width + "\n")
+
+ # Video metadata section
+ print(Fore.YELLOW + Style.BRIGHT + "VIDEO INFORMATION".center(terminal_width))
+ print(Fore.YELLOW + "─" * terminal_width)
+
+ # Two-column layout for metadata
+ col_width = terminal_width // 2 - 2
+
+ # Row 3
+ print(f"{Fore.GREEN}Video ID: {Fore.WHITE}{result['video_id']:<{col_width}}"
+ f"{Fore.GREEN}URL: {Fore.WHITE}https://youtu.be/{result['video_id']}")
+
+ print(Fore.YELLOW + "─" * terminal_width + "\n")
+
+ # AI Summary section
+ ai_compression = "N/A"
+ if result['ai_summary_length'] > 0:
+ ai_compression = round((1 - result['ai_summary_length'] / result['full_transcript_length']) * 100)
+
+ ai_summary_title = f" AI SUMMARY ({result['ai_summary_length']} words, condensed {ai_compression}% from {result['full_transcript_length']} words) "
+
+ print(Fore.GREEN + Style.BRIGHT + ai_summary_title.center(terminal_width))
+ print(Fore.GREEN + "─" * terminal_width)
+
+ # Print the AI summary with proper wrapping
+ wrapper = textwrap.TextWrapper(width=terminal_width-4,
+ initial_indent=' ',
+ subsequent_indent=' ')
+
+ # Split AI summary into paragraphs and print each
+ ai_paragraphs = result['ai_summary'].split('\n')
+ for paragraph in ai_paragraphs:
+ if paragraph.strip(): # Skip empty paragraphs
+ print(wrapper.fill(paragraph))
+ print() # Empty line between paragraphs
+
+ print(Fore.GREEN + "─" * terminal_width + "\n")
+
+ # NLTK Summary section
+ nltk_compression = round((1 - result['nltk_summary_length'] / result['full_transcript_length']) * 100)
+ nltk_summary_title = f" NLTK SUMMARY ({result['nltk_summary_length']} words, condensed {nltk_compression}% from {result['full_transcript_length']} words) "
+
+ print(Fore.MAGENTA + Style.BRIGHT + nltk_summary_title.center(terminal_width))
+ print(Fore.MAGENTA + "─" * terminal_width)
+
+ # Split NLTK summary into paragraphs and wrap each
+ paragraphs = result['nltk_summary'].split('. ')
+ formatted_paragraphs = []
+
+ current_paragraph = ""
+ for sentence in paragraphs:
+ if not sentence.endswith('.'):
+ sentence += '.'
+
+ if len(current_paragraph) + len(sentence) + 1 <= 150: # Arbitrary length for paragraph
+ current_paragraph += " " + sentence if current_paragraph else sentence
+ else:
+ if current_paragraph:
+ formatted_paragraphs.append(current_paragraph)
+ current_paragraph = sentence
+
+ if current_paragraph:
+ formatted_paragraphs.append(current_paragraph)
+
+ # Print each paragraph
+ for paragraph in formatted_paragraphs:
+ print(wrapper.fill(paragraph))
+ print() # Empty line between paragraphs
+
+ print(Fore.MAGENTA + "─" * terminal_width + "\n")
+
+
+if __name__ == "__main__":
+ # Get terminal width
+ try:
+ terminal_width = os.get_terminal_size().columns
+ # Limit width to reasonable range
+ terminal_width = max(80, min(terminal_width, 120))
+ except:
+ terminal_width = 80 # Default if can't determine
+
+ # Print welcome banner
+ print(Fore.CYAN + Style.BRIGHT + "\n" + "=" * terminal_width)
+ print(Fore.CYAN + Style.BRIGHT + "YOUTUBE VIDEO SUMMARIZER".center(terminal_width))
+ print(Fore.CYAN + Style.BRIGHT + "=" * terminal_width + "\n")
+
+ youtube_url = input(Fore.GREEN + "Enter YouTube video URL: " + Fore.WHITE)
+
+ num_sentences_input = input(Fore.GREEN + "Enter number of sentences for summaries (default 5): " + Fore.WHITE)
+ num_sentences = int(num_sentences_input) if num_sentences_input.strip() else 5
+
+ print(Fore.YELLOW + "\nFetching and analyzing video transcript... Please wait...\n")
+
+ result = summarize_youtube_video(youtube_url, num_sentences)
+ print_summary_result(result, width=terminal_width)