diff --git "a/tinypress_colab.ipynb" "b/tinypress_colab.ipynb" --- "a/tinypress_colab.ipynb" +++ "b/tinypress_colab.ipynb" @@ -1,336 +1,7606 @@ { - "nbformat": 4, - "nbformat_minor": 5, - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" + "cells": [ + { + "cell_type": "markdown", + "id": "cell-title", + "metadata": { + "id": "cell-title" + }, + "source": [ + "# TinyPress โ€” Prompt Compression Engine\n", + "\n", + "**HuggingFace Build Small Hackathon ยท Track: Thousand Token Wood**\n", + "\n", + "| Layer | Detail |\n", + "|-------|--------|\n", + "| Compression | `Qwen/Qwen2.5-1.5B-Instruct` (default, switchable) |\n", + "| Scoring | `sentence-transformers/all-MiniLM-L6-v2` (default, switchable) |\n", + "| UI | Gradio 5 โ€” public share URL |\n", + "| Storage | SQLite at `/content/tinypress.db` |\n", + "\n", + "**Features**\n", + "- Compress text to a user-defined token budget\n", + "- Live ๐Ÿ”ด / ๐ŸŸข compression readiness banner\n", + "- Per-token colour highlight panel (toggle on/off)\n", + "- Dynamic compression model switching (5 curated <32B models)\n", + "- Dynamic scoring embedder switching (6 models, with per-model impact info)\n", + "- ๐Ÿ‘ / ๐Ÿ‘Ž feedback on every compression result, with optional text comment\n", + "- Compression run history persisted to SQLite\n", + "- Column picker in History tab โ€” compact default view, expandable to all fields\n", + "- Per-row delete in history\n", + "- Side-by-side word-level diff viewer with feedback badge and token detail\n", + "\n", + "> **Recommended runtime:** GPU โ†’ Runtime โ†’ Change runtime type โ†’ T4 GPU\n", + "\n", + "---\n", + "\n", + "### About the author\n", + "\n", + "Built by **Sriharsha C R** โ€” AI Engineer, Cloud Native developer, and knowledge sharer.\n", + "If this was useful, feel free to connect โ€” always happy to chat about AI, LLMs, or anything in between.\n", + "\n", + "[![LinkedIn](https://img.shields.io/badge/LinkedIn-sriharsha--cr-0a66c2?logo=linkedin&logoColor=white)](https://www.linkedin.com/in/sriharsha-cr)\n", + "[![X / Twitter](https://img.shields.io/badge/X-@sriharsha__cr-000000?logo=x&logoColor=white)](https://x.com/sriharsha_cr)\n", + "[![HuggingFace](https://img.shields.io/badge/HuggingFace-sriharsha--cr-ff9d00?logo=huggingface&logoColor=white)](https://huggingface.co/sriharsha-cr)\n", + "[![GitHub](https://img.shields.io/badge/GitHub-SriharshaCR-181717?logo=github&logoColor=white)](https://github.com/SriharshaCR)" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s1-hdr", + "metadata": { + "id": "cell-s1-hdr" + }, + "source": [ + "## Step 1 โ€” Install dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-install", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "collapsed": true, + "id": "cell-install", + "outputId": "cb76788b-9d5a-4b8a-b107-3d21e06c1bfc" + }, + "outputs": [], + "source": [ + "!pip install -q \\\n", + " \"gradio==5.0\" \\\n", + " \"transformers>=4.40.0\" \\\n", + " \"sentence-transformers>=3.0.0\" \\\n", + " \"torch>=2.2.0\" \\\n", + " \"numpy>=1.26.0\" \\\n", + " \"pandas>=2.0.0\" \\\n", + " \"accelerate>=0.30.0\" \\\n", + " \"huggingface_hub==0.25.2\"" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s2-hdr", + "metadata": { + "id": "cell-s2-hdr" + }, + "source": [ + "## Step 2 โ€” Runtime check" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-runtime", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-runtime", + "outputId": "0d5544c5-650d-4aa5-8640-fdd0170f1d6e" + }, + "outputs": [], + "source": [ + "import torch\n", + "\n", + "device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", + "dtype = torch.float16 if device == 'cuda' else torch.float32\n", + "\n", + "print(f'Device : {device}')\n", + "if device == 'cuda':\n", + " print(f'GPU : {torch.cuda.get_device_name(0)}')\n", + " print(f'VRAM : {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB')\n", + "print(f'dtype : {dtype}')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s3-hdr", + "metadata": { + "id": "cell-s3-hdr" + }, + "source": [ + "## Step 3 โ€” Configuration" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "T1fBTJIxdWHP", + "metadata": { + "id": "T1fBTJIxdWHP" + }, + "outputs": [], + "source": [ + "# Curated <32B open-weight causal LMs for local / Colab inference.\n", + "AVAILABLE_MODELS = [\n", + " 'Qwen/Qwen2.5-1.5B-Instruct',\n", + " 'Qwen/Qwen2.5-0.5B-Instruct',\n", + " 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n", + " 'microsoft/Phi-3.5-mini-instruct',\n", + " 'meta-llama/Llama-3.2-1B-Instruct',\n", + "]\n", + "\n", + "# Curated sentence-transformer embedding models for quality scoring.\n", + "AVAILABLE_EMBEDDER_MODELS = [\n", + " 'sentence-transformers/all-MiniLM-L6-v2',\n", + " 'sentence-transformers/all-mpnet-base-v2',\n", + " 'BAAI/bge-small-en-v1.5',\n", + " 'BAAI/bge-base-en-v1.5',\n", + " 'mixedbread-ai/mxbai-embed-large-v1',\n", + " 'Alibaba-NLP/gte-Qwen2-1.5B-instruct',\n", + "]\n", + "\n", + "EMBEDDER_INFO = {\n", + " 'sentence-transformers/all-MiniLM-L6-v2': (\n", + " 'โšก **Fast ยท 22M params ยท Default** \\n'\n", + " 'Great baseline. Scores are reliable for typical compression ratios. '\n", + " 'Runs comfortably on CPU โ€” minimal overhead.'\n", + " ),\n", + " 'sentence-transformers/all-mpnet-base-v2': (\n", + " 'โš–๏ธ **Balanced ยท 110M params** \\n'\n", + " 'Noticeably sharper quality scores than MiniLM, especially on longer texts. '\n", + " 'Small speed trade-off; fine on CPU.'\n", + " ),\n", + " 'BAAI/bge-small-en-v1.5': (\n", + " 'โšก **Fast ยท 33M params** \\n'\n", + " 'Strong quality-to-size ratio โ€” often matches MiniLM on accuracy while being '\n", + " 'slightly more sensitive to meaning shifts. Good CPU option.'\n", + " ),\n", + " 'BAAI/bge-base-en-v1.5': (\n", + " 'โš–๏ธ **Balanced ยท 109M params** \\n'\n", + " 'Consistently strong on semantic similarity benchmarks. '\n", + " 'Scores will be more discriminating โ€” small differences in compression quality show up more clearly.'\n", + " ),\n", + " 'mixedbread-ai/mxbai-embed-large-v1': (\n", + " '๐Ÿ† **High quality ยท 335M params** \\n'\n", + " 'Top-tier similarity scores. Quality readings will be the most accurate here, '\n", + " 'but slower to load and run. GPU recommended.'\n", + " ),\n", + " 'Alibaba-NLP/gte-Qwen2-1.5B-instruct': (\n", + " '๐Ÿ”ฌ **Best quality ยท 1.5B params** \\n'\n", + " 'Strongest semantic understanding in this list. Scores will reflect subtle meaning loss '\n", + " 'that smaller models miss. Requires significant RAM/VRAM โ€” GPU strongly recommended.'\n", + " ),\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-config", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-config", + "outputId": "f98bce01-b9ec-49dc-8f5a-e58d82e1de69" + }, + "outputs": [], + "source": [ + "import os\n", + "\n", + "LLM_MODEL = os.getenv('LLM_MODEL', AVAILABLE_MODELS[1])\n", + "EMBEDDER_MODEL = os.getenv('EMBEDDER_MODEL', AVAILABLE_EMBEDDER_MODELS[0])\n", + "DB_PATH = os.getenv('DB_PATH', '/content/tinypress.db')\n", + "SERVER_PORT = int(os.getenv('PORT', 7860))\n", + "\n", + "DEFAULT_TARGET_TOKENS = 500\n", + "MAX_NEW_TOKENS = 1024\n", + "APP_TITLE = 'TinyPress'\n", + "\n", + "PUBLIC_UI = True\n", + "\n", + "print(f'LLM : {LLM_MODEL}')\n", + "print(f'Embedder : {EMBEDDER_MODEL}')\n", + "print(f'DB : {DB_PATH}')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s4-hdr", + "metadata": { + "id": "cell-s4-hdr" + }, + "source": [ + "## Step 4 โ€” Model loader" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-model-loader", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-model-loader", + "outputId": "e6c0f401-e6c9-4eee-d577-8831907a7a36" + }, + "outputs": [], + "source": [ + "from transformers import AutoTokenizer, AutoModelForCausalLM\n", + "from sentence_transformers import SentenceTransformer\n", + "import gc\n", + "\n", + "_llm = None\n", + "_tokenizer = None\n", + "_embedder = None\n", + "_current_model_id = None\n", + "_current_embedder_id = None\n", + "\n", + "\n", + "def get_current_model_id():\n", + " return _current_model_id\n", + "\n", + "\n", + "def get_current_tokenizer_id():\n", + " # Tokenizer is always loaded from the same HF repo as the model.\n", + " return _current_model_id\n", + "\n", + "\n", + "def get_current_embedder_id():\n", + " return _current_embedder_id\n", + "\n", + "\n", + "def get_llm():\n", + " global _llm, _tokenizer\n", + " if _llm is None:\n", + " _load_llm(LLM_MODEL)\n", + " return _llm, _tokenizer\n", + "\n", + "\n", + "def switch_llm(model_id: str) -> str:\n", + " global _current_model_id\n", + " if _current_model_id == model_id:\n", + " return f'Already using {model_id}'\n", + " _unload_llm()\n", + " _load_llm(model_id)\n", + " return f'Loaded: {model_id}'\n", + "\n", + "\n", + "def _load_llm(model_id: str):\n", + " \"\"\"Load model + its paired tokenizer. Both come from the same model_id.\"\"\"\n", + " global _llm, _tokenizer, _current_model_id\n", + " print(f'Loading LLM: {model_id} ...')\n", + " _tokenizer = AutoTokenizer.from_pretrained(model_id)\n", + " _llm = AutoModelForCausalLM.from_pretrained(\n", + " model_id,\n", + " torch_dtype=dtype,\n", + " device_map='auto',\n", + " )\n", + " _llm.eval()\n", + " _current_model_id = model_id\n", + " print(f'LLM ready: {model_id}')\n", + "\n", + "\n", + "def _unload_llm():\n", + " \"\"\"Free GPU/CPU memory before loading a different model.\"\"\"\n", + " global _llm, _tokenizer, _current_model_id\n", + " del _llm, _tokenizer\n", + " _llm = None\n", + " _tokenizer = None\n", + " _current_model_id = None\n", + " gc.collect()\n", + " if torch.cuda.is_available():\n", + " torch.cuda.empty_cache()\n", + "\n", + "\n", + "def get_embedder():\n", + " global _embedder, _current_embedder_id\n", + " if _embedder is None:\n", + " _load_embedder(EMBEDDER_MODEL)\n", + " return _embedder\n", + "\n", + "\n", + "def switch_embedder(model_id: str) -> str:\n", + " global _current_embedder_id\n", + " if _current_embedder_id == model_id:\n", + " return f'Already using {model_id}'\n", + " _unload_embedder()\n", + " _load_embedder(model_id)\n", + " return f'Loaded: {model_id}'\n", + "\n", + "\n", + "def _load_embedder(model_id: str):\n", + " global _embedder, _current_embedder_id\n", + " print(f'Loading embedder: {model_id} ...')\n", + " # Explicitly set device to 'cpu' to avoid ZeroGPU conflicts\n", + " _embedder = SentenceTransformer(model_id, device='cpu')\n", + " _current_embedder_id = model_id\n", + " print(f'Embedder ready: {model_id}')\n", + "\n", + "\n", + "def _unload_embedder():\n", + " global _embedder, _current_embedder_id\n", + " del _embedder\n", + " _embedder = None\n", + " _current_embedder_id = None\n", + " gc.collect()\n", + " if torch.cuda.is_available():\n", + " torch.cuda.empty_cache()\n", + "\n", + "\n", + "print('Model loader defined.')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s5-hdr", + "metadata": { + "id": "cell-s5-hdr" + }, + "source": [ + "## Step 5 โ€” Core pipeline" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-core", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-core", + "outputId": "2092a376-eebe-4b70-e600-4d1f684222b4" + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "\n", + "# โ”€โ”€ tokenizer utils โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", + "\n", + "def count_tokens(text: str) -> int:\n", + " _, tokenizer = get_llm()\n", + " return len(tokenizer.encode(text, add_special_tokens=False))\n", + "\n", + "\n", + "def get_token_strings(text: str) -> list:\n", + " \"\"\"Return the decoded surface string for every token in text.\"\"\"\n", + " _, tokenizer = get_llm()\n", + " ids = tokenizer.encode(text, add_special_tokens=False)\n", + " return [tokenizer.decode([i]) for i in ids]\n", + "\n", + "\n", + "# โ”€โ”€ compressor โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", + "\n", + "_PROMPT_TEMPLATE = (\n", + " 'You are a lossless compression assistant. '\n", + " 'Compress the following text to at most {target} tokens.\\n'\n", + " 'Preserve all key facts, decisions, and intent. '\n", + " 'Do not add commentary. Output only the compressed text.\\n\\n'\n", + " 'TEXT:\\n{text}\\n\\nCOMPRESSED:'\n", + ")\n", + "\n", + "\n", + "def _generate(prompt: str) -> str:\n", + " model, tokenizer = get_llm()\n", + " inputs = tokenizer(prompt, return_tensors='pt').to(model.device)\n", + " with torch.no_grad():\n", + " output_ids = model.generate(\n", + " **inputs,\n", + " max_new_tokens=MAX_NEW_TOKENS,\n", + " do_sample=False,\n", + " pad_token_id=tokenizer.eos_token_id,\n", + " )\n", + " new_tokens = output_ids[0][inputs['input_ids'].shape[1]:]\n", + " return tokenizer.decode(new_tokens, skip_special_tokens=True).strip()\n", + "\n", + "\n", + "def compress(text: str, target_tokens: int) -> tuple:\n", + " \"\"\"Returns (compressed_text, input_token_count, output_token_count).\"\"\"\n", + " input_tokens = count_tokens(text)\n", + " if input_tokens <= target_tokens:\n", + " return text, input_tokens, input_tokens\n", + "\n", + " prompt = _PROMPT_TEMPLATE.format(target=target_tokens, text=text)\n", + " compressed = _generate(prompt)\n", + "\n", + " # Hard-trim if model overshoots.\n", + " _, tokenizer = get_llm()\n", + " ids = tokenizer.encode(compressed, add_special_tokens=False)\n", + " if len(ids) > target_tokens:\n", + " compressed = tokenizer.decode(ids[:target_tokens], skip_special_tokens=True)\n", + "\n", + " output_tokens = count_tokens(compressed)\n", + " return compressed, input_tokens, output_tokens\n", + "\n", + "\n", + "# โ”€โ”€ scorer โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", + "\n", + "def semantic_score(original: str, compressed: str) -> float:\n", + " embedder = get_embedder()\n", + " vecs = embedder.encode([original, compressed], convert_to_numpy=True)\n", + " cos = float(\n", + " np.dot(vecs[0], vecs[1]) / (np.linalg.norm(vecs[0]) * np.linalg.norm(vecs[1]))\n", + " )\n", + " return round(max(0.0, min(1.0, cos)), 4)\n", + "\n", + "\n", + "print('Core pipeline defined.')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s6-hdr", + "metadata": { + "id": "cell-s6-hdr" + }, + "source": [ + "## Step 6 โ€” Diff renderer" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-diff", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-diff", + "outputId": "34230370-85e9-4d36-fd28-1e8542ffa448" + }, + "outputs": [], + "source": [ + "import difflib\n", + "import html as _h\n", + "\n", + "\n", + "def _word_diff(original: str, compressed: str) -> tuple:\n", + " \"\"\"\n", + " Word-level SequenceMatcher diff.\n", + " Returns (annotated_original_html, annotated_compressed_html).\n", + " Colour key:\n", + " original โ€” red strikethrough = dropped\n", + " compressed โ€” amber = rewritten\n", + " compressed โ€” green = inserted\n", + " plain = unchanged\n", + " \"\"\"\n", + " orig_words = original.split()\n", + " comp_words = compressed.split()\n", + " matcher = difflib.SequenceMatcher(None, orig_words, comp_words, autojunk=False)\n", + "\n", + " orig_parts, comp_parts = [], []\n", + "\n", + " for tag, i1, i2, j1, j2 in matcher.get_opcodes():\n", + " ow = _h.escape(' '.join(orig_words[i1:i2]))\n", + " cw = _h.escape(' '.join(comp_words[j1:j2]))\n", + "\n", + " if tag == 'equal':\n", + " orig_parts.append(ow)\n", + " comp_parts.append(cw)\n", + "\n", + " elif tag == 'delete':\n", + " orig_parts.append(\n", + " f'{ow}'\n", + " )\n", + "\n", + " elif tag == 'insert':\n", + " comp_parts.append(\n", + " f'{cw}'\n", + " )\n", + "\n", + " elif tag == 'replace':\n", + " orig_parts.append(\n", + " f'{ow}'\n", + " )\n", + " comp_parts.append(\n", + " f'{cw}'\n", + " )\n", + "\n", + " return ' '.join(orig_parts), ' '.join(comp_parts)\n", + "\n", + "\n", + "def render_diff_html(record: dict) -> str:\n", + " \"\"\"Build a self-contained side-by-side diff HTML block for a compression run.\"\"\"\n", + " original = record.get('input_text', '')\n", + " compressed = record.get('output_text', '')\n", + " if not original or not compressed:\n", + " return ''\n", + "\n", + " orig_html, comp_html = _word_diff(original, compressed)\n", + "\n", + " model = _h.escape(record.get('model', 'โ€”'))\n", + " tokenizer = _h.escape(record.get('tokenizer', 'โ€”'))\n", + " ts = _h.escape(record.get('timestamp', 'โ€”'))\n", + " in_tok = record.get('input_tokens', 'โ€”')\n", + " out_tok = record.get('output_tokens', 'โ€”')\n", + " target_tok = record.get('target_tokens', 'โ€”')\n", + " ratio = record.get('compression_ratio', 0)\n", + " quality = record.get('quality_score', 0)\n", + " duration = record.get('duration_ms', 'โ€”')\n", + " run_id = record.get('id', 'โ€”')\n", + "\n", + " feedback_val = record.get('feedback')\n", + " feedback_note = _h.escape(record.get('feedback_comment') or '')\n", + "\n", + " # Build optional feedback block\n", + " if feedback_val is not None:\n", + " badge_bg = '#f0fdf4' if feedback_val == 1 else '#fef2f2'\n", + " badge_color = '#15803d' if feedback_val == 1 else '#b91c1c'\n", + " badge_text = '๐Ÿ‘ Helpful' if feedback_val == 1 else '๐Ÿ‘Ž Not helpful'\n", + " feedback_block = (\n", + " f'
'\n", + " f'{badge_text}'\n", + " )\n", + " if feedback_note:\n", + " feedback_block += (\n", + " f''\n", + " f'\"{feedback_note}\"'\n", + " )\n", + " feedback_block += '
'\n", + " else:\n", + " feedback_block = ''\n", + "\n", + " return f\"\"\"\n", + "
\n", + "\n", + " \n", + "
\n", + " Run #{run_id}\n", + " {ts}\n", + " {model}\n", + " Quality {quality:.4f}\n", + " Ratio {ratio:.4f}\n", + " ⏱ {duration} ms\n", + "
\n", + "\n", + " \n", + "
\n", + " {in_tok} in โ†’ {out_tok} out (target {target_tok})\n", + " tokenizer: {tokenizer}\n", + "
\n", + "\n", + " \n", + "
\n", + "
\n", + "
\n", + " ORIGINAL\n", + " {in_tok} tokens\n", + "
\n", + "
{orig_html}
\n", + "
\n", + "
\n", + "
\n", + " COMPRESSED\n", + " {out_tok} tokens\n", + "
\n", + "
{comp_html}
\n", + "
\n", + "
\n", + "\n", + " {feedback_block}\n", + "\n", + " \n", + "
\n", + " dropped\n", + " rewritten\n", + " inserted\n", + " plain = unchanged\n", + "
\n", + "\n", + "
\n", + "\"\"\"\n", + "\n", + "\n", + "print('Diff renderer defined.')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s7-hdr", + "metadata": { + "id": "cell-s7-hdr" + }, + "source": [ + "## Step 7 โ€” Database" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-db", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-db", + "outputId": "b88b9cfb-edcc-4c15-e766-34207b320651" + }, + "outputs": [], + "source": [ + "import sqlite3\n", + "\n", + "_SCHEMA = \"\"\"\n", + "CREATE TABLE IF NOT EXISTS compression_runs (\n", + " id INTEGER PRIMARY KEY AUTOINCREMENT,\n", + " timestamp TEXT NOT NULL,\n", + " model TEXT NOT NULL,\n", + " tokenizer TEXT NOT NULL,\n", + " input_tokens INTEGER NOT NULL,\n", + " output_tokens INTEGER NOT NULL,\n", + " target_tokens INTEGER NOT NULL,\n", + " compression_ratio REAL NOT NULL,\n", + " quality_score REAL NOT NULL,\n", + " duration_ms REAL NOT NULL,\n", + " input_text TEXT NOT NULL,\n", + " output_text TEXT NOT NULL,\n", + " feedback INTEGER,\n", + " feedback_comment TEXT\n", + ");\n", + "\"\"\"\n", + "\n", + "\n", + "def _connect():\n", + " conn = sqlite3.connect(DB_PATH)\n", + " conn.row_factory = sqlite3.Row\n", + " return conn\n", + "\n", + "\n", + "def init_db():\n", + " conn = _connect()\n", + " conn.executescript(_SCHEMA)\n", + " for col, typedef in [\n", + " ('tokenizer', 'TEXT NOT NULL DEFAULT \"\"'),\n", + " ('duration_ms', 'REAL NOT NULL DEFAULT 0'),\n", + " ('feedback', 'INTEGER'),\n", + " ('feedback_comment', 'TEXT'),\n", + " ]:\n", + " try:\n", + " conn.execute(f'ALTER TABLE compression_runs ADD COLUMN {col} {typedef}')\n", + " except sqlite3.OperationalError:\n", + " pass\n", + " conn.commit()\n", + " conn.close()\n", + "\n", + "\n", + "def save_run(record: dict) -> int:\n", + " conn = _connect()\n", + " cursor = conn.execute(\n", + " '''\n", + " INSERT INTO compression_runs\n", + " (timestamp, model, tokenizer, input_tokens, output_tokens, target_tokens,\n", + " compression_ratio, quality_score, duration_ms, input_text, output_text)\n", + " VALUES\n", + " (:timestamp, :model, :tokenizer, :input_tokens, :output_tokens, :target_tokens,\n", + " :compression_ratio, :quality_score, :duration_ms, :input_text, :output_text)\n", + " ''',\n", + " record,\n", + " )\n", + " run_id = cursor.lastrowid\n", + " conn.commit()\n", + " conn.close()\n", + " return run_id\n", + "\n", + "\n", + "def update_feedback(run_id: int, value: int):\n", + " conn = _connect()\n", + " conn.execute('UPDATE compression_runs SET feedback = ? WHERE id = ?', (value, run_id))\n", + " conn.commit()\n", + " conn.close()\n", + "\n", + "\n", + "def update_feedback_comment(run_id: int, comment: str):\n", + " conn = _connect()\n", + " conn.execute('UPDATE compression_runs SET feedback_comment = ? WHERE id = ?', (comment, run_id))\n", + " conn.commit()\n", + " conn.close()\n", + "\n", + "\n", + "def delete_run(run_id: int):\n", + " conn = _connect()\n", + " conn.execute('DELETE FROM compression_runs WHERE id = ?', (run_id,))\n", + " conn.commit()\n", + " conn.close()\n", + "\n", + "\n", + "def get_run(run_id: int):\n", + " conn = _connect()\n", + " row = conn.execute('SELECT * FROM compression_runs WHERE id = ?', (run_id,)).fetchone()\n", + " conn.close()\n", + " return dict(row) if row else None\n", + "\n", + "\n", + "def get_runs(limit: int = 100) -> list:\n", + " conn = _connect()\n", + " rows = conn.execute(\n", + " 'SELECT * FROM compression_runs ORDER BY id DESC LIMIT ?', (limit,)\n", + " ).fetchall()\n", + " conn.close()\n", + " return [dict(r) for r in rows]\n", + "\n", + "\n", + "init_db()\n", + "print(f'Database ready at {DB_PATH}')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s8-hdr", + "metadata": { + "id": "cell-s8-hdr" + }, + "source": [ + "## Step 8 โ€” Load models\n", + "\n", + "Downloads and caches weights. GPU warm-cache: ~30 s. First run: a few minutes." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-load-models", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 697, + "referenced_widgets": [ + "d8b0b6cc26054726b9e2180129eaf7af", + "acdc3d6c39504de7a3653643edc5f7f5", + "2b3c9f98d5c34a28b6d245f9efdbe760", + "266905e7bb414cb39202e5fde84923c6", + "842d462166ea41b7904206c0aeb1ce10", + "e4bb360e16164cf9ae4aa86528d52f71", + "af4c937a7962407d9ce4c639c55d0950", + "d653d8db1b9d4202ac575719d5eb40eb", + "fdc1e46322b64aa6a0e08febed90e416", + "4f486c1d3f534b7799aafcd5be30f755", + "0b821afe9f9747788596b53b33cf572b", + "877ffd16338f49f295c0a656dedd3263", + "c70e074c4c8e479c9a5caad5b3145e82", + "4bd46fe2cc87404b8cdd779313de0405", + "1b1a31ec87d546148274dd6ffd8d9a21", + "dee8708cdd7f4efa8e5cc9b6210de08c", + "863efad6d47948f4aa31251bcbe9af28", + "dc48302b392848e5985e0d837e637c1d", + "86a42b60d4c64845b184688eca70673c", + "8fb5436d774848fb84c53ea583977139", + "c34b8ccfd1f54cf2a101cdbc91a5caa2", + "5735583c783a412eb6ff1b34819694e1", + "20d68b4f72ab404ba049072897365db9", + "f35b1739b28e413aab0ad157fcd52b0d", + "c1b74f1ee87d42edb99aa8202e64256c", + "53e9431e49004871978aa2becabff883", + "e4da675acfe94396ad129935b4a45fc8", + "9a443eda41b0401881ab7b3724dbece1", + "45d6b1e230c54892865489614d0ae61a", + "2b2e4665f5e74241a3f72b40b7d02499", + "748aa78a7bb045e7afd95316e980c20c", + "14e0b81755d849cc8c8430b950e720bf", + "dd2cbf7cf4bd4c8fae77d5fc67f00162", + "37ae3d33126545d4be2b214aa682f141", + "8b9a4e239b6d4d519ff08acf8d417f8a", + "6610879b9eb14d19a67f330baccc5220", + "c10a15bd27b0463380de57066ee29baa", + "45b03b2a1f9443a580db57deed0d093b", + "fefe86fb9c894838bc5ada7dc07e55ee", + "a79b4718befe451ca7236d6838d7b069", + "e1349589fb2a436d883e00810c4a47c3", + "d778da6959b74a0288cc3ee1b0076dae", + "ec7db29b0fa44f5fa0456101f9fe553e", + "ee9eb764d409401f87a740210126691a", + "ddcdc6faaab54e81924e59fdf181ec39", + "a828eb556a8d4caf953f8dd9ebcb2ec9", + "5b3b693262104419970eb0cbddcdbc52", + "16e113440f304136aefa2228220f783f", + "1982f74538654ec28d7ca64f2fd47f47", + "455e1a41e22242b78bd9399563934671", + "5b6e6ffe2b204afb956b473edbe5d7cc", + "a8ea51198fc144968700efceb5f7b629", + "3ac3098568e84616b8ed65b9ec1a7ff3", + "ffc41e3d49164a72b13b04d9b2997185", + "34f1d264df0342d9965c625dee0401ac", + "8f3ec4767b64426ab9e4418069e5b068", + "08b54ba5a85f4bdcb33beb0170be6c55", + "b6b526f9e9224119a1b44030471e35f1", + "07b793c034eb47a49ebe97591f80f96f", + "3b91f1c28c2e4f3ca8a77eef1e6469a0", + "9282e6d9863d41519e7851996b926089", + "0a9b76dd55f64ba3b53fa2bc65540871", + "979508c145ca4ebfac34b60c839d54b9", + "f873d1c61f3b492f99928b5aa679898c", + "f8ec5b43276b4ee493ebb44ecd7c8c38", + "b5ea650433874a219d68cd3303fcc623", + "7b052c546aae4aa9bac89583a9aadae2", + "6d7ec2a0bdbb4ff9b438811c925146e6", + "56ca25710aa3489abe23f0bd0106c5c5", + "dcd1e27a50234e3d804f52c3f1fb0a10", + "3e8567565981415392b9d068f3210077", + "99d9bc5a6537407887fcba8fce3e95d4", + "b681b18a2e484c4bb2ccc66b45b6a6e8", + "28948db04d2d434381cd3b1e062a78f8", + "6679abfa47a14fc09d69719d89068f4b", + "d737eef8235543b3a4b37569d7f5d9b2", + "06e9e4a34191497fa4bf053f5967be95", + "43f3073e89f5489aabff4fb53bf85de9", + "300036e1955c4267ad01633912cca9d7", + "5a97d6b673754672a3e796b154abc941", + "82b2f501b6c4473aaef699ce646174e7", + "b7c8bca92fda4027ae4e0193e72f2304", + "d5b4973f75b14203b6ba421d4caa08bf", + "446ae643f6f44de1bee7567958798a64", + "19776268e5914a1b8d3db393bed603cd", + "5b60bf684c37410c836283aa9f6c6e50", + "a3d7435d0c584135af354ef83607022f", + "e73632fe53e9480da0c822f9481871b8", + "e62772dad1d84edfa694bfdf393c11e7", + "36b435845b8a471b85bf502373778d61", + "e4b9e2bc5c1d4f54bd7a2e8420d92672", + "04df92563c1646b3b31c6a4ed015e639", + "a646ebdbccac40c5997ad50a3a635c15", + "6b2638d76cf1416d92685ff38b4116dc", + "4e5337b5e1394a2888bbd5ed933f93cf", + "87e0a00af8334ca2bc2464723ea2e290", + "c4fa09605a124234ac947d9246430025", + "3b98d427f36143f5afaa2b16abcf69dd", + "0a7067dc3140472caafb53e4d6061648", + "a74d804ca28a4921ad0f22a05f258d15", + "5e791e4e162449389e29e7a1d945df07", + "b93b7bc488854c9294fe311b9750cf10", + "034798f6ce1547a9a9d019ab0ea5a5e5", + "2d5231085c35477cae1d81e73a2aeb94", + "ef9e1d18f649419caede4a28346c6525", + "5ca97deed9294cb5b2eb47bd6c792ead", + "459d09ca3eb24af89f8cfca38b77d326", + "70bd088bf5804825bc72a935d11423c0", + "e09d7af25de444c09fe002d80c7c7679", + "ba39e2404f74459bafe2d48d25662e64", + "166fc4df9dd547a6846f9bf1c5ffc5e8", + "84f7c42b278f4d23a21d502d47966847", + "c8ea9dbad67440f49c04c19c33ce268d", + "afdc1836c4394ce8b8a3c78ddd421d28", + "9eaee64af8bf468d859355eb24eb734a", + "15b4d98ffafd467ea201910a8536a4ad", + "bc2039ffa8854ff8a93832c5f305c6d1", + "01702241deda4a05acc37f7893eb23cb", + "0798f81dd991487b9352c847253cd804", + "caf604222f5b447483a24a3f9cc13333", + "1a7150b322d94f638395a837f89b546d", + "09aaff5abe364322b3a0b0157cdd7210", + "4d2810a51ab14f72aed8f4ccbd56aa4e", + "6981fe06e38f4e57b4ed4f83640ffd58", + "4afe422d66ae4492ac0d28af39d161d7", + "852c95fead2948729f00707fc5da16f1", + "2df2ca0e3563477da4ba041475478361", + "0322d1e687a044789ee19db838984881", + "532672ea5a98498187a33fc88f035c18", + "ec1f65c213b74f51adb1d063a05e5c9e", + "8c7ebd0b84ca4f47aa5d1cf6c5500e7c", + "701903ea651e482abcd5f2eb4ed4eb3b", + "87f0d47835cd48a8becbb64520f10ae1", + "dd5b7d5c950a4bcea27c3f32521f0147", + "2072b1e65ec44d80ae98671319f2e516", + "0457a14472e7407ca67f4abc381a6b9d", + "a322f82b662c4eb99fb3739a736103e4", + "fff946350daf4c18ae2233efcd609a39", + "5e7da0b5c91c42f49649a1a4258a4476", + "188db1cdd6f54d3082a7f2b865c85283", + "812bc4836f744c9da7f549fe6d22d6c2", + "338128b1193c4663887b7a2a9410742f", + "520e880b0368424f9e361b7db4dd1769", + "c3ea0edaaa254ab6b106f8d0b319ed67", + "ae45e5ae56c8411e872b1b397099b509", + "e810d3cd2fb14789ad7f35399d440ade", + "479cfa207f6c4a98bcebf0dcd76b20cd", + "a01895995aca438d9a5010bbabdcdeb5", + "0b1de00ccf1e404f9156f5984914bcbd", + "090c97081fca4404b24daa1ccc38ab78", + "89bf7666ffe64a44bdb14188a2c10ca8", + "3076b8e410224008858a8359f1883f7a", + "61ebce3b47e942b4b9b57df8249be017", + "16df608350944104954ff2a0b023a445", + "bd741b1b62fe4644831d1918cc31446e", + "00b53a98aa7647fca26bb4f996d5dedf", + "9f54867e8b694e10a60c55aa882fe530", + "a9ed80d798844edea14ad5818bd77f4d", + "dc65e533e5614f5088164134acdd0aac", + "b788dd53573f4b068c7323140f2b1548", + "ab9f95b3960240cdbae1d32b9a0e4b33", + "6212c86e4ef64b6fbec89f944b8335d7", + "82640d6d6d974d268cd36b2b4a375fdb", + "7364b4bc923a464399ecb19214e746ad", + "0a8caef939394348bb1153e2b2cfc439", + "e3ebc817075b4bbeaade52266e47b963", + "b5b8928b5b6c41aa934d70874e6b92bf", + "25ebbe46f81a4db6b92dcb312eb8202d", + "036254161e6146b4bc64140e37b83fbc", + "96517f6317f34de29d99df8f713e6698", + "ee3658b9a4714be8bb6c19203219e6f0", + "7cb6e4e1e0d04ae2a611617a949bfa5b", + "def2bb08ee774a2c8bc8bf0d40b5a642", + "7fb43aeb8f9f40fa88bab2ac694d0b01", + "48f96d4825024a8da76b2ff8f4f78f28", + "543765a79fc34584b1f79b137177fa82", + "49a32534bfcf410f936e163705279d34", + "29f3c69826e94c32b33ac0a53a412dc3", + "68956b3e4b3d4334984c6402ee8f6b0b", + "ae6bc2404ee449d78a5f07b2a07f438f", + "b100f9b0e4d24e949f290c1645818708", + "99538531b6114f47afe0d5cc98adeea8", + "b465bec02fd243c69688146accb67173", + "3b7651d9f7c54c40bdae1844a6b5570b", + "e64652a2b0ea4a41935f927d0951ed65", + "dda7b715ab5d4c73ac1a2c990a3d7041", + "e70f310ae5e84423b62188a8309be533", + "982b638d41d84945a0d7322d8f067e54", + "1f66ea369cb24a46a830498eabd2a724", + "27a37798b7564f16a7c4f905f7be4a12", + "203fed80e5b0469d86ed91bff406a7be", + "5d043fb3c81f4523b3ef20270ba15a4f", + "85916d656c8744a8ad0ba3f377cfea16", + "6c0e9ab9386745a7a87dbbf83dd44117", + "90d6a30e96e14d05ba10335275e18069", + "051f458a22e7438e87d0bc5bff6e74a5", + "9a18feb0bc4e4dd699fd725a8a7b2d63", + "830145c2ea78403291bc4d2e563b357e" + ] + }, + "collapsed": true, + "id": "cell-load-models", + "outputId": "c3dcc479-bd58-427b-cfdd-008d12973b82" + }, + "outputs": [], + "source": [ + "get_llm()\n", + "get_embedder()\n", + "print('\\nAll models loaded and ready.')" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s9-hdr", + "metadata": { + "id": "cell-s9-hdr" + }, + "source": [ + "## Step 9 โ€” Launch Gradio UI\n", + "\n", + "Prints a **public share URL** when ready. All features are live in the UI." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "cell-gradio", + "metadata": { + "id": "cell-gradio" + }, + "outputs": [], + "source": [ + "import html as _h\n", + "import time\n", + "from datetime import datetime, timezone\n", + "\n", + "import gradio as gr\n", + "import pandas as pd\n", + "\n", + "\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "# COMPRESS TAB โ€” handlers\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "\n", + "_PALETTE = [\n", + " '#fde68a', '#bbf7d0', '#bfdbfe', '#fecaca', '#e9d5ff',\n", + " '#fed7aa', '#99f6e4', '#e0e7ff', '#fce7f3', '#d1fae5',\n", + "]\n", + "_BTN_SHOW = '๐Ÿ” Show Token Highlights'\n", + "_BTN_HIDE = '๐Ÿ™ˆ Hide Token Highlights'\n", + "\n", + "\n", + "def _render_token_html(text: str) -> str:\n", + " if not text.strip():\n", + " return ''\n", + " tokens = get_token_strings(text)\n", + " if not tokens:\n", + " return ''\n", + " spans = []\n", + " for i, tok in enumerate(tokens):\n", + " color = _PALETTE[i % len(_PALETTE)]\n", + " display = _h.escape(tok).replace(' ', 'ยท')\n", + " spans.append(\n", + " f'{display}'\n", + " )\n", + " return (\n", + " '
'\n", + " f'
'\n", + " f'{len(tokens)} tokens โ€” each chip = one token, hover for index
'\n", + " '
'\n", + " + ''.join(spans) + '
'\n", + " )\n", + "\n", + "\n", + "def toggle_token_panel(is_visible: bool, text: str):\n", + " new_visible = not is_visible\n", + " html_content = _render_token_html(text) if new_visible else ''\n", + " btn_label = _BTN_HIDE if new_visible else _BTN_SHOW\n", + " return new_visible, html_content, gr.update(value=btn_label)\n", + "\n", + "\n", + "def update_token_panel(text: str, is_visible: bool) -> str:\n", + " return _render_token_html(text) if is_visible else ''\n", + "\n", + "\n", + "_STATUS_EMPTY = ''\n", + "_STATUS_RED = (\n", + " '
'\n", + " '๐Ÿ”ด Compression not needed โ€” input ({input_tok} tokens) '\n", + " 'is already within the {budget}-token budget.
'\n", + ")\n", + "_STATUS_GREEN = (\n", + " '
'\n", + " '๐ŸŸข Ready to compress โ€” {input_tok} tokens โ†’ {budget} token budget '\n", + " '({delta} tokens to shed).
'\n", + ")\n", + "\n", + "\n", + "def compression_status(text: str, target_tokens: int) -> str:\n", + " if not text.strip():\n", + " return _STATUS_EMPTY\n", + " n = count_tokens(text)\n", + " if n <= int(target_tokens):\n", + " return _STATUS_RED.format(input_tok=n, budget=int(target_tokens))\n", + " return _STATUS_GREEN.format(input_tok=n, budget=int(target_tokens), delta=n - int(target_tokens))\n", + "\n", + "\n", + "def run_compression(text: str, target_tokens: int):\n", + " _hidden = gr.update(visible=False)\n", + " if not text.strip():\n", + " return ('', 0, 0, 0, 0.0, None,\n", + " _hidden, _hidden, gr.update(value='', visible=False),\n", + " gr.update(value='', visible=False), _hidden, gr.update(value='', visible=False))\n", + "\n", + " t0 = time.perf_counter()\n", + " compressed, input_tokens, output_tokens = compress(text, int(target_tokens))\n", + " duration_ms = round((time.perf_counter() - t0) * 1000, 1)\n", + "\n", + " ratio = round(output_tokens / input_tokens, 4) if input_tokens else 0.0\n", + " quality = semantic_score(text, compressed)\n", + "\n", + " run_id = save_run({\n", + " 'timestamp': datetime.now(timezone.utc).isoformat(),\n", + " 'model': get_current_model_id() or LLM_MODEL,\n", + " 'tokenizer': get_current_tokenizer_id() or LLM_MODEL,\n", + " 'input_tokens': input_tokens,\n", + " 'output_tokens': output_tokens,\n", + " 'target_tokens': int(target_tokens),\n", + " 'compression_ratio': ratio,\n", + " 'quality_score': quality,\n", + " 'duration_ms': duration_ms,\n", + " 'input_text': text,\n", + " 'output_text': compressed,\n", + " })\n", + "\n", + " return (\n", + " compressed, input_tokens, output_tokens, ratio, quality,\n", + " run_id,\n", + " gr.update(visible=True), gr.update(visible=True),\n", + " gr.update(value='', visible=True),\n", + " gr.update(value='', visible=False),\n", + " gr.update(visible=False),\n", + " gr.update(value='', visible=False),\n", + " )\n", + "\n", + "\n", + "def load_model(model_id: str) -> str:\n", + " if not model_id:\n", + " return 'No model selected.'\n", + " try:\n", + " return switch_llm(model_id)\n", + " except Exception as exc:\n", + " return f'Error loading {model_id}: {exc}'\n", + "\n", + "\n", + "def load_embedder(model_id: str) -> str:\n", + " if not model_id:\n", + " return 'No model selected.'\n", + " try:\n", + " return switch_embedder(model_id)\n", + " except Exception as exc:\n", + " return f'Error loading {model_id}: {exc}'\n", + "\n", + "\n", + "def on_embedder_change(model_id: str) -> str:\n", + " return EMBEDDER_INFO.get(model_id, '')\n", + "\n", + "\n", + "def submit_feedback(run_id, value: int):\n", + " if run_id is None:\n", + " return 'Run a compression first.', gr.update(visible=False), gr.update(visible=False), gr.update(value='', visible=False)\n", + " update_feedback(run_id, value)\n", + " msg = '๐Ÿ‘ Marked as helpful โ€” thanks!' if value == 1 else '๐Ÿ‘Ž Noted โ€” thanks for the feedback!'\n", + " return msg, gr.update(visible=True), gr.update(visible=True), gr.update(value='', visible=False)\n", + "\n", + "\n", + "def save_comment(run_id, comment: str):\n", + " if run_id is None:\n", + " return gr.update(value='Run a compression first.', visible=True)\n", + " if not comment.strip():\n", + " return gr.update(value='Type a note first.', visible=True)\n", + " update_feedback_comment(run_id, comment.strip())\n", + " return gr.update(value='โœ“ Note saved.', visible=True)\n", + "\n", + "\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "# HISTORY TAB โ€” handlers\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "\n", + "_DEFAULT_COLS = ['id', 'timestamp', 'model', 'compression_ratio', 'quality_score', 'feedback']\n", + "_ALL_COLS = [\n", + " 'id', 'timestamp', 'model', 'tokenizer',\n", + " 'input_tokens', 'output_tokens', 'target_tokens',\n", + " 'compression_ratio', 'quality_score', 'duration_ms',\n", + " 'feedback', 'feedback_comment',\n", + "]\n", + "\n", + "\n", + "def load_history(selected_cols=None):\n", + " cols = selected_cols if selected_cols else _DEFAULT_COLS\n", + " runs = get_runs(limit=100)\n", + " if not runs:\n", + " return pd.DataFrame(columns=cols), '', '', ''\n", + " df = pd.DataFrame(runs)\n", + " existing = [c for c in cols if c in df.columns]\n", + " df = df[existing]\n", + " avg_q = f\"{df['quality_score'].mean():.4f}\" if 'quality_score' in df.columns else 'โ€”'\n", + " avg_r = f\"{df['compression_ratio'].mean():.4f}\" if 'compression_ratio' in df.columns else 'โ€”'\n", + " return df, avg_q, avg_r, ''\n", + "\n", + "\n", + "def on_row_select(evt: gr.SelectData, df: pd.DataFrame):\n", + " if df is None or df.empty:\n", + " return None, '', 'No rows available.'\n", + " row_idx = evt.index[0]\n", + " run_id = int(df.iloc[row_idx]['id'])\n", + " record = get_run(run_id)\n", + " if not record:\n", + " return None, '', f'Row {run_id} not found in database.'\n", + " return run_id, render_diff_html(record), f'Row {run_id} selected โ€” click Delete to remove.'\n", + "\n", + "\n", + "def delete_selected(run_id, selected_cols):\n", + " if run_id is None:\n", + " df, avg_q, avg_r, _ = load_history(selected_cols)\n", + " return df, avg_q, avg_r, None, '', 'No row selected.'\n", + " delete_run(run_id)\n", + " df, avg_q, avg_r, _ = load_history(selected_cols)\n", + " return df, avg_q, avg_r, None, '', f'Row {run_id} deleted.'\n", + "\n", + "\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "# BUILD APP\n", + "# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n", + "\n", + "def build_app() -> gr.Blocks:\n", + " with gr.Blocks(title=APP_TITLE) as app:\n", + "\n", + " # โ”€โ”€ Compress tab โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", + " with gr.Tab('Compress'):\n", + " gr.Markdown('## TinyPress โ€” Prompt Compression Engine')\n", + " gr.Markdown(\n", + " 'Paste any long text. Set your token budget. Get a compressed version '\n", + " 'that preserves intent โ€” scored for quality.'\n", + " )\n", + "\n", + " with gr.Accordion('Model Settings', open=False):\n", + " gr.Markdown('**Compression Model**')\n", + " model_dropdown = gr.Dropdown(\n", + " choices=AVAILABLE_MODELS, value=LLM_MODEL,\n", + " label='Compression Model', allow_custom_value=True,\n", + " )\n", + " load_model_btn = gr.Button('Load Model', variant='secondary')\n", + " model_status = gr.Textbox(label='Model Status', value=f'Active: {LLM_MODEL}', interactive=False)\n", + "\n", + " gr.Markdown(\"---\") # Replaced gr.Divider() with gr.Markdown(\"---\")\n", + "\n", + " gr.Markdown('**Scoring Embedder**')\n", + " embedder_dropdown = gr.Dropdown(\n", + " choices=AVAILABLE_EMBEDDER_MODELS, value=EMBEDDER_MODEL,\n", + " label='Embedder Model', allow_custom_value=True,\n", + " )\n", + " embedder_info_panel = gr.Markdown(value=EMBEDDER_INFO.get(EMBEDDER_MODEL, ''))\n", + " load_embedder_btn = gr.Button('Load Embedder', variant='secondary')\n", + " embedder_status = gr.Textbox(label='Embedder Status', value=f'Active: {EMBEDDER_MODEL}', interactive=False)\n", + "\n", + " with gr.Row():\n", + " with gr.Column():\n", + " input_text = gr.Textbox(label='Input Text', lines=12, placeholder='Paste your text here...')\n", + " token_toggle_btn = gr.Button(_BTN_SHOW, variant='secondary', size='sm')\n", + " token_panel = gr.HTML(value='')\n", + " tokens_visible = gr.State(value=False)\n", + " target_slider = gr.Slider(minimum=100, maximum=1000, value=DEFAULT_TARGET_TOKENS, step=50, label='Target Token Budget')\n", + " status_banner = gr.HTML(value=_STATUS_EMPTY)\n", + " compress_btn = gr.Button('Compress', variant='primary')\n", + "\n", + " with gr.Column():\n", + " output_text = gr.Textbox(label='Compressed Output', lines=12)\n", + " with gr.Row():\n", + " input_tok = gr.Number(label='Input Tokens', interactive=False)\n", + " output_tok = gr.Number(label='Output Tokens', interactive=False)\n", + " with gr.Row():\n", + " ratio = gr.Number(label='Compression Ratio', interactive=False)\n", + " quality = gr.Number(label='Quality Score (0โ€“1)', interactive=False)\n", + " gr.Markdown('**Was this compression helpful?**')\n", + " with gr.Row():\n", + " thumbs_up_btn = gr.Button('๐Ÿ‘ Helpful', variant='secondary', visible=False, scale=1)\n", + " thumbs_down_btn = gr.Button('๐Ÿ‘Ž Not helpful', variant='secondary', visible=False, scale=1)\n", + " feedback_status = gr.Markdown('', visible=False)\n", + " comment_box = gr.Textbox(\n", + " label='Add a note (optional)',\n", + " placeholder=\"e.g. 'lost key dates', 'too short', 'great summary'\",\n", + " lines=2, visible=False,\n", + " )\n", + " save_comment_btn = gr.Button('Save note', variant='secondary', size='sm', visible=False)\n", + " comment_saved = gr.Markdown('', visible=False)\n", + "\n", + " last_run_id = gr.State(value=None)\n", + "\n", + " token_toggle_btn.click(fn=toggle_token_panel, inputs=[tokens_visible, input_text], outputs=[tokens_visible, token_panel, token_toggle_btn])\n", + " input_text.change(fn=update_token_panel, inputs=[input_text, tokens_visible], outputs=[token_panel])\n", + " _sa = dict(inputs=[input_text, target_slider], outputs=[status_banner])\n", + " input_text.change(fn=compression_status, **_sa)\n", + " target_slider.change(fn=compression_status, **_sa)\n", + " load_model_btn.click(fn=load_model, inputs=[model_dropdown], outputs=[model_status])\n", + " embedder_dropdown.change(fn=on_embedder_change, inputs=[embedder_dropdown], outputs=[embedder_info_panel])\n", + " load_embedder_btn.click(fn=load_embedder, inputs=[embedder_dropdown], outputs=[embedder_status])\n", + " compress_btn.click(\n", + " fn=run_compression,\n", + " inputs=[input_text, target_slider],\n", + " outputs=[output_text, input_tok, output_tok, ratio, quality,\n", + " last_run_id, thumbs_up_btn, thumbs_down_btn, feedback_status,\n", + " comment_box, save_comment_btn, comment_saved],\n", + " )\n", + " thumbs_up_btn.click(\n", + " fn=lambda run_id: submit_feedback(run_id, 1),\n", + " inputs=[last_run_id],\n", + " outputs=[feedback_status, comment_box, save_comment_btn, comment_saved],\n", + " )\n", + " thumbs_down_btn.click(\n", + " fn=lambda run_id: submit_feedback(run_id, -1),\n", + " inputs=[last_run_id],\n", + " outputs=[feedback_status, comment_box, save_comment_btn, comment_saved],\n", + " )\n", + " save_comment_btn.click(fn=save_comment, inputs=[last_run_id, comment_box], outputs=[comment_saved])\n", + "\n", + " # โ”€โ”€ History tab โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", + " with gr.Tab('History') as history_tab:\n", + " gr.Markdown('## Compression Run History')\n", + " with gr.Row():\n", + " refresh_btn = gr.Button('Refresh', variant='secondary')\n", + " delete_btn = gr.Button('Delete Selected Row', variant='stop')\n", + "\n", + " with gr.Accordion('Column visibility', open=False):\n", + " col_picker = gr.CheckboxGroup(choices=_ALL_COLS, value=_DEFAULT_COLS, label=None)\n", + "\n", + " with gr.Row():\n", + " avg_quality = gr.Textbox(label='Avg Quality Score', interactive=False)\n", + " avg_ratio = gr.Textbox(label='Avg Compression Ratio', interactive=False)\n", + " history_table = gr.DataFrame(label='Past Runs โ€” click a row to see its diff', interactive=False)\n", + " delete_status = gr.Textbox(label='Status', value='Click a row to select it.', interactive=False)\n", + " gr.Markdown('### Side-by-side Diff')\n", + " diff_panel = gr.HTML(value='')\n", + " selected_id = gr.State(value=None)\n", + "\n", + " _outputs = [history_table, avg_quality, avg_ratio, diff_panel]\n", + " refresh_btn.click(fn=load_history, inputs=[col_picker], outputs=_outputs)\n", + " history_tab.select(fn=load_history, inputs=[col_picker], outputs=_outputs)\n", + " col_picker.change(fn=load_history, inputs=[col_picker], outputs=_outputs)\n", + " history_table.select(fn=on_row_select, inputs=[history_table], outputs=[selected_id, diff_panel, delete_status])\n", + " delete_btn.click(\n", + " fn=delete_selected,\n", + " inputs=[selected_id, col_picker],\n", + " outputs=[history_table, avg_quality, avg_ratio, selected_id, diff_panel, delete_status],\n", + " )\n", + "\n", + " return app" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "co7JKDlXeGqo", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 715 + }, + "id": "co7JKDlXeGqo", + "outputId": "a62a6ec7-41bb-4fb8-ff02-61a13910f504" + }, + "outputs": [], + "source": [ + "# Launch UI\n", + "\n", + "app = build_app()\n", + "app.launch(share=PUBLIC_UI, server_port=SERVER_PORT, debug = True)" + ] + }, + { + "cell_type": "markdown", + "id": "cell-s10-hdr", + "metadata": { + "id": "cell-s10-hdr" + }, + "source": [ + "## Step 10 โ€” Programmatic demo (no UI needed)\n", + "\n", + "Run this cell to compress a sample text directly and inspect all metrics inline." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cell-demo", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cell-demo", + "outputId": "9d8a823f-5995-4164-9dd3-99924d1d2a8e" + }, + "outputs": [], + "source": [ + "SAMPLE_TEXT = \"\"\"\n", + "The transformer architecture, introduced in the seminal paper Attention Is All You Need by Vaswani et al.\n", + "in 2017, fundamentally changed how we approach sequence modelling tasks in natural language processing.\n", + "Prior to transformers, recurrent neural networks (RNNs) and long short-term memory (LSTM) networks were\n", + "the dominant architectures for tasks such as machine translation, text summarisation, and question answering.\n", + "However, these models suffered from several limitations: they processed tokens sequentially, making\n", + "parallelisation difficult; they struggled to capture long-range dependencies due to vanishing gradients;\n", + "and training was slow even on modern hardware. The transformer addressed all of these issues through\n", + "its self-attention mechanism, which allows every token in a sequence to directly attend to every other\n", + "token in a single operation. Multi-head attention further extends this by running several attention\n", + "functions in parallel, capturing different types of relationships between tokens simultaneously.\n", + "Position encodings are added to token embeddings to give the model a sense of sequence order, since\n", + "unlike RNNs the architecture has no inherent notion of position. Feed-forward sub-layers, layer\n", + "normalisation, and residual connections complete each transformer block. The result is a model that\n", + "trains faster, scales better with data and compute, and generalises more effectively than its\n", + "predecessors, setting the stage for large language models like GPT, BERT, and the entire modern\n", + "LLM ecosystem.\n", + "\"\"\".strip()\n", + "\n", + "TARGET = 150 # token budget\n", + "\n", + "input_tok_count = count_tokens(SAMPLE_TEXT)\n", + "print(f'Input tokens : {input_tok_count}')\n", + "print(f'Target tokens: {TARGET}')\n", + "print(f'Status : {\"ready to compress\" if input_tok_count > TARGET else \"already within budget\"}')\n", + "print()\n", + "\n", + "t0 = time.perf_counter()\n", + "compressed, in_tok, out_tok = compress(SAMPLE_TEXT, TARGET)\n", + "elapsed = round((time.perf_counter() - t0) * 1000, 1)\n", + "\n", + "score = semantic_score(SAMPLE_TEXT, compressed)\n", + "ratio = round(out_tok / in_tok, 4)\n", + "\n", + "print('โ”€' * 60)\n", + "print(compressed)\n", + "print('โ”€' * 60)\n", + "print(f'Output tokens : {out_tok}')\n", + "print(f'Compression ratio: {ratio}')\n", + "print(f'Quality score : {score}')\n", + "print(f'Duration : {elapsed} ms')\n", + "print(f'Model : {get_current_model_id()}')\n", + "print(f'Tokenizer : {get_current_tokenizer_id()}')" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.10.0" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "00b53a98aa7647fca26bb4f996d5dedf": { + "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_b788dd53573f4b068c7323140f2b1548", + "placeholder": "โ€‹", + "style": "IPY_MODEL_ab9f95b3960240cdbae1d32b9a0e4b33", + "value": "vocab.txt:โ€‡" + } + }, + "01702241deda4a05acc37f7893eb23cb": { + "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 + } + }, + "0322d1e687a044789ee19db838984881": { + "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": "" + } + }, + "034798f6ce1547a9a9d019ab0ea5a5e5": { + "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_e09d7af25de444c09fe002d80c7c7679", + "placeholder": "โ€‹", + "style": "IPY_MODEL_ba39e2404f74459bafe2d48d25662e64", + "value": "โ€‡10.5k/?โ€‡[00:00<00:00,โ€‡939kB/s]" + } + }, + "036254161e6146b4bc64140e37b83fbc": { + "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_48f96d4825024a8da76b2ff8f4f78f28", + "placeholder": "โ€‹", + "style": "IPY_MODEL_543765a79fc34584b1f79b137177fa82", + "value": "โ€‡466k/?โ€‡[00:00<00:00,โ€‡2.36MB/s]" + } + }, + "0457a14472e7407ca67f4abc381a6b9d": { + "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_338128b1193c4663887b7a2a9410742f", + "placeholder": "โ€‹", + "style": "IPY_MODEL_520e880b0368424f9e361b7db4dd1769", + "value": "โ€‡90.9M/90.9Mโ€‡[00:00<00:00,โ€‡208MB/s]" + } + }, + "04df92563c1646b3b31c6a4ed015e639": { + "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_3b98d427f36143f5afaa2b16abcf69dd", + "placeholder": "โ€‹", + "style": "IPY_MODEL_0a7067dc3140472caafb53e4d6061648", + "value": "โ€‡116/116โ€‡[00:00<00:00,โ€‡11.9kB/s]" + } + }, + "051f458a22e7438e87d0bc5bff6e74a5": { + "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": "" + } + }, + "06e9e4a34191497fa4bf053f5967be95": { + "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": "" + } + }, + "0798f81dd991487b9352c847253cd804": { + "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": "" + } + }, + "07b793c034eb47a49ebe97591f80f96f": { + "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_f8ec5b43276b4ee493ebb44ecd7c8c38", + "placeholder": "โ€‹", + "style": "IPY_MODEL_b5ea650433874a219d68cd3303fcc623", + "value": "โ€‡988M/988Mโ€‡[00:11<00:00,โ€‡53.1MB/s]" + } + }, + "08b54ba5a85f4bdcb33beb0170be6c55": { + "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_9282e6d9863d41519e7851996b926089", + "placeholder": "โ€‹", + "style": "IPY_MODEL_0a9b76dd55f64ba3b53fa2bc65540871", + "value": "model.safetensors:โ€‡100%" + } + }, + "090c97081fca4404b24daa1ccc38ab78": { + "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": "" + } + }, + "09aaff5abe364322b3a0b0157cdd7210": { + "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_4d2810a51ab14f72aed8f4ccbd56aa4e", + "IPY_MODEL_6981fe06e38f4e57b4ed4f83640ffd58", + "IPY_MODEL_4afe422d66ae4492ac0d28af39d161d7" + ], + "layout": "IPY_MODEL_852c95fead2948729f00707fc5da16f1" + } + }, + "0a7067dc3140472caafb53e4d6061648": { + "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": "" + } + }, + "0a8caef939394348bb1153e2b2cfc439": { + "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": "" + } + }, + "0a9b76dd55f64ba3b53fa2bc65540871": { + "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": "" + } + }, + "0b1de00ccf1e404f9156f5984914bcbd": { + "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 + } + }, + "0b821afe9f9747788596b53b33cf572b": { + "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": "" + } + }, + "14e0b81755d849cc8c8430b950e720bf": { + "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 + } + }, + "15b4d98ffafd467ea201910a8536a4ad": { + "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 + } + }, + "166fc4df9dd547a6846f9bf1c5ffc5e8": { + "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_84f7c42b278f4d23a21d502d47966847", + "IPY_MODEL_c8ea9dbad67440f49c04c19c33ce268d", + "IPY_MODEL_afdc1836c4394ce8b8a3c78ddd421d28" + ], + "layout": "IPY_MODEL_9eaee64af8bf468d859355eb24eb734a" + } + }, + "16df608350944104954ff2a0b023a445": { + "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": "" + } + }, + "16e113440f304136aefa2228220f783f": { + "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_ffc41e3d49164a72b13b04d9b2997185", + "placeholder": "โ€‹", + "style": "IPY_MODEL_34f1d264df0342d9965c625dee0401ac", + "value": "โ€‡659/659โ€‡[00:00<00:00,โ€‡57.9kB/s]" + } + }, + "188db1cdd6f54d3082a7f2b865c85283": { + "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 + } + }, + "19776268e5914a1b8d3db393bed603cd": { + "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 + } + }, + "1982f74538654ec28d7ca64f2fd47f47": { + "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 + } + }, + "1a7150b322d94f638395a837f89b546d": { + "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": "" + } + }, + "1b1a31ec87d546148274dd6ffd8d9a21": { + "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_c34b8ccfd1f54cf2a101cdbc91a5caa2", + "placeholder": "โ€‹", + "style": "IPY_MODEL_5735583c783a412eb6ff1b34819694e1", + "value": "โ€‡2.78M/?โ€‡[00:00<00:00,โ€‡34.1MB/s]" + } + }, + "1f66ea369cb24a46a830498eabd2a724": { + "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_85916d656c8744a8ad0ba3f377cfea16", + "placeholder": "โ€‹", + "style": "IPY_MODEL_6c0e9ab9386745a7a87dbbf83dd44117", + "value": "config.json:โ€‡100%" + } + }, + "203fed80e5b0469d86ed91bff406a7be": { + "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_9a18feb0bc4e4dd699fd725a8a7b2d63", + "placeholder": "โ€‹", + "style": "IPY_MODEL_830145c2ea78403291bc4d2e563b357e", + "value": "โ€‡190/190โ€‡[00:00<00:00,โ€‡9.43kB/s]" + } + }, + "2072b1e65ec44d80ae98671319f2e516": { + "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_188db1cdd6f54d3082a7f2b865c85283", + "max": 90868376, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_812bc4836f744c9da7f549fe6d22d6c2", + "value": 90868376 + } + }, + "20d68b4f72ab404ba049072897365db9": { + "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_f35b1739b28e413aab0ad157fcd52b0d", + "IPY_MODEL_c1b74f1ee87d42edb99aa8202e64256c", + "IPY_MODEL_53e9431e49004871978aa2becabff883" + ], + "layout": "IPY_MODEL_e4da675acfe94396ad129935b4a45fc8" + } + }, + "25ebbe46f81a4db6b92dcb312eb8202d": { + "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_def2bb08ee774a2c8bc8bf0d40b5a642", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7fb43aeb8f9f40fa88bab2ac694d0b01", + "value": 1 + } + }, + "266905e7bb414cb39202e5fde84923c6": { + "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_4f486c1d3f534b7799aafcd5be30f755", + "placeholder": "โ€‹", + "style": "IPY_MODEL_0b821afe9f9747788596b53b33cf572b", + "value": "โ€‡7.30k/?โ€‡[00:00<00:00,โ€‡326kB/s]" + } + }, + "27a37798b7564f16a7c4f905f7be4a12": { + "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_90d6a30e96e14d05ba10335275e18069", + "max": 190, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_051f458a22e7438e87d0bc5bff6e74a5", + "value": 190 + } + }, + "28948db04d2d434381cd3b1e062a78f8": { + "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 + } + }, + "29f3c69826e94c32b33ac0a53a412dc3": { + "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_99538531b6114f47afe0d5cc98adeea8", + "placeholder": "โ€‹", + "style": "IPY_MODEL_b465bec02fd243c69688146accb67173", + "value": "special_tokens_map.json:โ€‡100%" + } + }, + "2b2e4665f5e74241a3f72b40b7d02499": { + "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": "20px" + } + }, + "2b3c9f98d5c34a28b6d245f9efdbe760": { + "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_d653d8db1b9d4202ac575719d5eb40eb", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_fdc1e46322b64aa6a0e08febed90e416", + "value": 1 + } + }, + "2d5231085c35477cae1d81e73a2aeb94": { + "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 + } + }, + "2df2ca0e3563477da4ba041475478361": { + "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 + } + }, + "300036e1955c4267ad01633912cca9d7": { + "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_d5b4973f75b14203b6ba421d4caa08bf", + "placeholder": "โ€‹", + "style": "IPY_MODEL_446ae643f6f44de1bee7567958798a64", + "value": "modules.json:โ€‡100%" + } + }, + "3076b8e410224008858a8359f1883f7a": { + "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": "" + } + }, + "338128b1193c4663887b7a2a9410742f": { + "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 + } + }, + "34f1d264df0342d9965c625dee0401ac": { + "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": "" + } + }, + "36b435845b8a471b85bf502373778d61": { + "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_6b2638d76cf1416d92685ff38b4116dc", + "placeholder": "โ€‹", + "style": "IPY_MODEL_4e5337b5e1394a2888bbd5ed933f93cf", + "value": "config_sentence_transformers.json:โ€‡100%" + } + }, + "37ae3d33126545d4be2b214aa682f141": { + "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_8b9a4e239b6d4d519ff08acf8d417f8a", + "IPY_MODEL_6610879b9eb14d19a67f330baccc5220", + "IPY_MODEL_c10a15bd27b0463380de57066ee29baa" + ], + "layout": "IPY_MODEL_45b03b2a1f9443a580db57deed0d093b" + } + }, + "3ac3098568e84616b8ed65b9ec1a7ff3": { + "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": "" + } + }, + "3b7651d9f7c54c40bdae1844a6b5570b": { + "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 + } + }, + "3b91f1c28c2e4f3ca8a77eef1e6469a0": { + "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 + } + }, + "3b98d427f36143f5afaa2b16abcf69dd": { + "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 + } + }, + "3e8567565981415392b9d068f3210077": { + "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 + } + }, + "43f3073e89f5489aabff4fb53bf85de9": { + "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_300036e1955c4267ad01633912cca9d7", + "IPY_MODEL_5a97d6b673754672a3e796b154abc941", + "IPY_MODEL_82b2f501b6c4473aaef699ce646174e7" + ], + "layout": "IPY_MODEL_b7c8bca92fda4027ae4e0193e72f2304" + } + }, + "446ae643f6f44de1bee7567958798a64": { + "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": "" + } + }, + "455e1a41e22242b78bd9399563934671": { + "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 + } + }, + "459d09ca3eb24af89f8cfca38b77d326": { + "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": "20px" + } + }, + "45b03b2a1f9443a580db57deed0d093b": { + "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 + } + }, + "45d6b1e230c54892865489614d0ae61a": { + "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": "" + } + }, + "479cfa207f6c4a98bcebf0dcd76b20cd": { + "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_61ebce3b47e942b4b9b57df8249be017", + "placeholder": "โ€‹", + "style": "IPY_MODEL_16df608350944104954ff2a0b023a445", + "value": "โ€‡350/350โ€‡[00:00<00:00,โ€‡35.1kB/s]" + } + }, + "48f96d4825024a8da76b2ff8f4f78f28": { + "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 + } + }, + "49a32534bfcf410f936e163705279d34": { + "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_29f3c69826e94c32b33ac0a53a412dc3", + "IPY_MODEL_68956b3e4b3d4334984c6402ee8f6b0b", + "IPY_MODEL_ae6bc2404ee449d78a5f07b2a07f438f" + ], + "layout": "IPY_MODEL_b100f9b0e4d24e949f290c1645818708" + } + }, + "4afe422d66ae4492ac0d28af39d161d7": { + "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_8c7ebd0b84ca4f47aa5d1cf6c5500e7c", + "placeholder": "โ€‹", + "style": "IPY_MODEL_701903ea651e482abcd5f2eb4ed4eb3b", + "value": "โ€‡612/612โ€‡[00:00<00:00,โ€‡40.3kB/s]" + } + }, + "4bd46fe2cc87404b8cdd779313de0405": { + "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_86a42b60d4c64845b184688eca70673c", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_8fb5436d774848fb84c53ea583977139", + "value": 1 + } + }, + "4d2810a51ab14f72aed8f4ccbd56aa4e": { + "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_2df2ca0e3563477da4ba041475478361", + "placeholder": "โ€‹", + "style": "IPY_MODEL_0322d1e687a044789ee19db838984881", + "value": "config.json:โ€‡100%" + } + }, + "4e5337b5e1394a2888bbd5ed933f93cf": { + "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": "" + } + }, + "4f486c1d3f534b7799aafcd5be30f755": { + "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 + } + }, + "520e880b0368424f9e361b7db4dd1769": { + "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": "" + } + }, + "532672ea5a98498187a33fc88f035c18": { + "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 + } + }, + "53e9431e49004871978aa2becabff883": { + "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_14e0b81755d849cc8c8430b950e720bf", + "placeholder": "โ€‹", + "style": "IPY_MODEL_dd2cbf7cf4bd4c8fae77d5fc67f00162", + "value": "โ€‡1.67M/?โ€‡[00:00<00:00,โ€‡36.9MB/s]" + } + }, + "543765a79fc34584b1f79b137177fa82": { + "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": "" + } + }, + "56ca25710aa3489abe23f0bd0106c5c5": { + "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_28948db04d2d434381cd3b1e062a78f8", + "max": 242, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_6679abfa47a14fc09d69719d89068f4b", + "value": 242 + } + }, + "5735583c783a412eb6ff1b34819694e1": { + "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": "" + } + }, + "5a97d6b673754672a3e796b154abc941": { + "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_19776268e5914a1b8d3db393bed603cd", + "max": 349, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_5b60bf684c37410c836283aa9f6c6e50", + "value": 349 + } + }, + "5b3b693262104419970eb0cbddcdbc52": { + "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_a8ea51198fc144968700efceb5f7b629", + "max": 659, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3ac3098568e84616b8ed65b9ec1a7ff3", + "value": 659 + } + }, + "5b60bf684c37410c836283aa9f6c6e50": { + "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": "" + } + }, + "5b6e6ffe2b204afb956b473edbe5d7cc": { + "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": "" + } + }, + "5ca97deed9294cb5b2eb47bd6c792ead": { + "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": "" + } + }, + "5d043fb3c81f4523b3ef20270ba15a4f": { + "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 + } + }, + "5e791e4e162449389e29e7a1d945df07": { + "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_ef9e1d18f649419caede4a28346c6525", + "placeholder": "โ€‹", + "style": "IPY_MODEL_5ca97deed9294cb5b2eb47bd6c792ead", + "value": "README.md:โ€‡" + } + }, + "5e7da0b5c91c42f49649a1a4258a4476": { + "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": "" + } + }, + "61ebce3b47e942b4b9b57df8249be017": { + "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 + } + }, + "6212c86e4ef64b6fbec89f944b8335d7": { + "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": "20px" + } + }, + "6610879b9eb14d19a67f330baccc5220": { + "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_e1349589fb2a436d883e00810c4a47c3", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d778da6959b74a0288cc3ee1b0076dae", + "value": 1 + } + }, + "6679abfa47a14fc09d69719d89068f4b": { + "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": "" + } + }, + "68956b3e4b3d4334984c6402ee8f6b0b": { + "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_3b7651d9f7c54c40bdae1844a6b5570b", + "max": 112, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e64652a2b0ea4a41935f927d0951ed65", + "value": 112 + } + }, + "6981fe06e38f4e57b4ed4f83640ffd58": { + "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_532672ea5a98498187a33fc88f035c18", + "max": 612, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ec1f65c213b74f51adb1d063a05e5c9e", + "value": 612 + } + }, + "6b2638d76cf1416d92685ff38b4116dc": { + "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 + } + }, + "6c0e9ab9386745a7a87dbbf83dd44117": { + "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": "" + } + }, + "6d7ec2a0bdbb4ff9b438811c925146e6": { + "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_99d9bc5a6537407887fcba8fce3e95d4", + "placeholder": "โ€‹", + "style": "IPY_MODEL_b681b18a2e484c4bb2ccc66b45b6a6e8", + "value": "generation_config.json:โ€‡100%" + } + }, + "701903ea651e482abcd5f2eb4ed4eb3b": { + "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": "" + } + }, + "70bd088bf5804825bc72a935d11423c0": { + "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": "" + } + }, + "7364b4bc923a464399ecb19214e746ad": { + "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 + } + }, + "748aa78a7bb045e7afd95316e980c20c": { + "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": "" + } + }, + "7b052c546aae4aa9bac89583a9aadae2": { + "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_6d7ec2a0bdbb4ff9b438811c925146e6", + "IPY_MODEL_56ca25710aa3489abe23f0bd0106c5c5", + "IPY_MODEL_dcd1e27a50234e3d804f52c3f1fb0a10" + ], + "layout": "IPY_MODEL_3e8567565981415392b9d068f3210077" + } + }, + "7cb6e4e1e0d04ae2a611617a949bfa5b": { + "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": "" + } + }, + "7fb43aeb8f9f40fa88bab2ac694d0b01": { + "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": "" + } + }, + "812bc4836f744c9da7f549fe6d22d6c2": { + "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": "" + } + }, + "82640d6d6d974d268cd36b2b4a375fdb": { + "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": "" + } + }, + "82b2f501b6c4473aaef699ce646174e7": { + "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_a3d7435d0c584135af354ef83607022f", + "placeholder": "โ€‹", + "style": "IPY_MODEL_e73632fe53e9480da0c822f9481871b8", + "value": "โ€‡349/349โ€‡[00:00<00:00,โ€‡30.9kB/s]" + } + }, + "830145c2ea78403291bc4d2e563b357e": { + "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": "" + } + }, + "842d462166ea41b7904206c0aeb1ce10": { + "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 + } + }, + "84f7c42b278f4d23a21d502d47966847": { + "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_15b4d98ffafd467ea201910a8536a4ad", + "placeholder": "โ€‹", + "style": "IPY_MODEL_bc2039ffa8854ff8a93832c5f305c6d1", + "value": "sentence_bert_config.json:โ€‡100%" + } + }, + "852c95fead2948729f00707fc5da16f1": { + "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 + } + }, + "85916d656c8744a8ad0ba3f377cfea16": { + "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 + } + }, + "863efad6d47948f4aa31251bcbe9af28": { + "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 + } + }, + "86a42b60d4c64845b184688eca70673c": { + "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": "20px" + } + }, + "877ffd16338f49f295c0a656dedd3263": { + "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_c70e074c4c8e479c9a5caad5b3145e82", + "IPY_MODEL_4bd46fe2cc87404b8cdd779313de0405", + "IPY_MODEL_1b1a31ec87d546148274dd6ffd8d9a21" + ], + "layout": "IPY_MODEL_dee8708cdd7f4efa8e5cc9b6210de08c" + } + }, + "87e0a00af8334ca2bc2464723ea2e290": { + "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 + } + }, + "87f0d47835cd48a8becbb64520f10ae1": { + "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_dd5b7d5c950a4bcea27c3f32521f0147", + "IPY_MODEL_2072b1e65ec44d80ae98671319f2e516", + "IPY_MODEL_0457a14472e7407ca67f4abc381a6b9d" + ], + "layout": "IPY_MODEL_a322f82b662c4eb99fb3739a736103e4" + } + }, + "89bf7666ffe64a44bdb14188a2c10ca8": { + "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 + } + }, + "8b9a4e239b6d4d519ff08acf8d417f8a": { + "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_fefe86fb9c894838bc5ada7dc07e55ee", + "placeholder": "โ€‹", + "style": "IPY_MODEL_a79b4718befe451ca7236d6838d7b069", + "value": "tokenizer.json:โ€‡" + } + }, + "8c7ebd0b84ca4f47aa5d1cf6c5500e7c": { + "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 + } + }, + "8f3ec4767b64426ab9e4418069e5b068": { + "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_08b54ba5a85f4bdcb33beb0170be6c55", + "IPY_MODEL_b6b526f9e9224119a1b44030471e35f1", + "IPY_MODEL_07b793c034eb47a49ebe97591f80f96f" + ], + "layout": "IPY_MODEL_3b91f1c28c2e4f3ca8a77eef1e6469a0" + } + }, + "8fb5436d774848fb84c53ea583977139": { + "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": "" + } + }, + "90d6a30e96e14d05ba10335275e18069": { + "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 + } + }, + "9282e6d9863d41519e7851996b926089": { + "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 + } + }, + "96517f6317f34de29d99df8f713e6698": { + "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 + } + }, + "979508c145ca4ebfac34b60c839d54b9": { + "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 + } + }, + "982b638d41d84945a0d7322d8f067e54": { + "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_1f66ea369cb24a46a830498eabd2a724", + "IPY_MODEL_27a37798b7564f16a7c4f905f7be4a12", + "IPY_MODEL_203fed80e5b0469d86ed91bff406a7be" + ], + "layout": "IPY_MODEL_5d043fb3c81f4523b3ef20270ba15a4f" + } + }, + "99538531b6114f47afe0d5cc98adeea8": { + "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 + } + }, + "99d9bc5a6537407887fcba8fce3e95d4": { + "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 + } + }, + "9a18feb0bc4e4dd699fd725a8a7b2d63": { + "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 + } + }, + "9a443eda41b0401881ab7b3724dbece1": { + "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 + } + }, + "9eaee64af8bf468d859355eb24eb734a": { + "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 + } + }, + "9f54867e8b694e10a60c55aa882fe530": { + "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_6212c86e4ef64b6fbec89f944b8335d7", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_82640d6d6d974d268cd36b2b4a375fdb", + "value": 1 + } + }, + "a01895995aca438d9a5010bbabdcdeb5": { + "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 + } + }, + "a322f82b662c4eb99fb3739a736103e4": { + "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 + } + }, + "a3d7435d0c584135af354ef83607022f": { + "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 + } + }, + "a646ebdbccac40c5997ad50a3a635c15": { + "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 + } + }, + "a74d804ca28a4921ad0f22a05f258d15": { + "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_5e791e4e162449389e29e7a1d945df07", + "IPY_MODEL_b93b7bc488854c9294fe311b9750cf10", + "IPY_MODEL_034798f6ce1547a9a9d019ab0ea5a5e5" + ], + "layout": "IPY_MODEL_2d5231085c35477cae1d81e73a2aeb94" + } + }, + "a79b4718befe451ca7236d6838d7b069": { + "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": "" + } + }, + "a828eb556a8d4caf953f8dd9ebcb2ec9": { + "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_455e1a41e22242b78bd9399563934671", + "placeholder": "โ€‹", + "style": "IPY_MODEL_5b6e6ffe2b204afb956b473edbe5d7cc", + "value": "config.json:โ€‡100%" + } + }, + "a8ea51198fc144968700efceb5f7b629": { + "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 + } + }, + "a9ed80d798844edea14ad5818bd77f4d": { + "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_7364b4bc923a464399ecb19214e746ad", + "placeholder": "โ€‹", + "style": "IPY_MODEL_0a8caef939394348bb1153e2b2cfc439", + "value": "โ€‡232k/?โ€‡[00:00<00:00,โ€‡410kB/s]" + } + }, + "ab9f95b3960240cdbae1d32b9a0e4b33": { + "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": "" + } + }, + "acdc3d6c39504de7a3653643edc5f7f5": { + "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_e4bb360e16164cf9ae4aa86528d52f71", + "placeholder": "โ€‹", + "style": "IPY_MODEL_af4c937a7962407d9ce4c639c55d0950", + "value": "tokenizer_config.json:โ€‡" + } + }, + "ae45e5ae56c8411e872b1b397099b509": { + "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_0b1de00ccf1e404f9156f5984914bcbd", + "placeholder": "โ€‹", + "style": "IPY_MODEL_090c97081fca4404b24daa1ccc38ab78", + "value": "tokenizer_config.json:โ€‡100%" + } + }, + "ae6bc2404ee449d78a5f07b2a07f438f": { + "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_dda7b715ab5d4c73ac1a2c990a3d7041", + "placeholder": "โ€‹", + "style": "IPY_MODEL_e70f310ae5e84423b62188a8309be533", + "value": "โ€‡112/112โ€‡[00:00<00:00,โ€‡10.7kB/s]" + } + }, + "af4c937a7962407d9ce4c639c55d0950": { + "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": "" + } + }, + "afdc1836c4394ce8b8a3c78ddd421d28": { + "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_caf604222f5b447483a24a3f9cc13333", + "placeholder": "โ€‹", + "style": "IPY_MODEL_1a7150b322d94f638395a837f89b546d", + "value": "โ€‡53.0/53.0โ€‡[00:00<00:00,โ€‡4.04kB/s]" + } + }, + "b100f9b0e4d24e949f290c1645818708": { + "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 + } + }, + "b465bec02fd243c69688146accb67173": { + "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": "" + } + }, + "b5b8928b5b6c41aa934d70874e6b92bf": { + "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_ee3658b9a4714be8bb6c19203219e6f0", + "placeholder": "โ€‹", + "style": "IPY_MODEL_7cb6e4e1e0d04ae2a611617a949bfa5b", + "value": "tokenizer.json:โ€‡" + } + }, + "b5ea650433874a219d68cd3303fcc623": { + "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": "" + } + }, + "b681b18a2e484c4bb2ccc66b45b6a6e8": { + "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": "" + } + }, + "b6b526f9e9224119a1b44030471e35f1": { + "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_979508c145ca4ebfac34b60c839d54b9", + "max": 988097824, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f873d1c61f3b492f99928b5aa679898c", + "value": 988097824 + } + }, + "b788dd53573f4b068c7323140f2b1548": { + "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 + } + }, + "b7c8bca92fda4027ae4e0193e72f2304": { + "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 + } + }, + "b93b7bc488854c9294fe311b9750cf10": { + "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_459d09ca3eb24af89f8cfca38b77d326", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_70bd088bf5804825bc72a935d11423c0", + "value": 1 + } + }, + "ba39e2404f74459bafe2d48d25662e64": { + "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": "" + } + }, + "bc2039ffa8854ff8a93832c5f305c6d1": { + "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": "" + } + }, + "bd741b1b62fe4644831d1918cc31446e": { + "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_00b53a98aa7647fca26bb4f996d5dedf", + "IPY_MODEL_9f54867e8b694e10a60c55aa882fe530", + "IPY_MODEL_a9ed80d798844edea14ad5818bd77f4d" + ], + "layout": "IPY_MODEL_dc65e533e5614f5088164134acdd0aac" + } + }, + "c10a15bd27b0463380de57066ee29baa": { + "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_ec7db29b0fa44f5fa0456101f9fe553e", + "placeholder": "โ€‹", + "style": "IPY_MODEL_ee9eb764d409401f87a740210126691a", + "value": "โ€‡7.03M/?โ€‡[00:00<00:00,โ€‡87.1MB/s]" + } + }, + "c1b74f1ee87d42edb99aa8202e64256c": { + "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_2b2e4665f5e74241a3f72b40b7d02499", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_748aa78a7bb045e7afd95316e980c20c", + "value": 1 + } + }, + "c34b8ccfd1f54cf2a101cdbc91a5caa2": { + "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 + } + }, + "c3ea0edaaa254ab6b106f8d0b319ed67": { + "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_ae45e5ae56c8411e872b1b397099b509", + "IPY_MODEL_e810d3cd2fb14789ad7f35399d440ade", + "IPY_MODEL_479cfa207f6c4a98bcebf0dcd76b20cd" + ], + "layout": "IPY_MODEL_a01895995aca438d9a5010bbabdcdeb5" + } + }, + "c4fa09605a124234ac947d9246430025": { + "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": "" + } + }, + "c70e074c4c8e479c9a5caad5b3145e82": { + "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_863efad6d47948f4aa31251bcbe9af28", + "placeholder": "โ€‹", + "style": "IPY_MODEL_dc48302b392848e5985e0d837e637c1d", + "value": "vocab.json:โ€‡" + } + }, + "c8ea9dbad67440f49c04c19c33ce268d": { + "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_01702241deda4a05acc37f7893eb23cb", + "max": 53, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_0798f81dd991487b9352c847253cd804", + "value": 53 + } + }, + "caf604222f5b447483a24a3f9cc13333": { + "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 + } + }, + "d5b4973f75b14203b6ba421d4caa08bf": { + "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 + } + }, + "d653d8db1b9d4202ac575719d5eb40eb": { + "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": "20px" + } + }, + "d737eef8235543b3a4b37569d7f5d9b2": { + "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 + } + }, + "d778da6959b74a0288cc3ee1b0076dae": { + "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": "" + } + }, + "d8b0b6cc26054726b9e2180129eaf7af": { + "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_acdc3d6c39504de7a3653643edc5f7f5", + "IPY_MODEL_2b3c9f98d5c34a28b6d245f9efdbe760", + "IPY_MODEL_266905e7bb414cb39202e5fde84923c6" + ], + "layout": "IPY_MODEL_842d462166ea41b7904206c0aeb1ce10" + } + }, + "dc48302b392848e5985e0d837e637c1d": { + "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": "" + } + }, + "dc65e533e5614f5088164134acdd0aac": { + "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 + } + }, + "dcd1e27a50234e3d804f52c3f1fb0a10": { + "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_d737eef8235543b3a4b37569d7f5d9b2", + "placeholder": "โ€‹", + "style": "IPY_MODEL_06e9e4a34191497fa4bf053f5967be95", + "value": "โ€‡242/242โ€‡[00:00<00:00,โ€‡19.9kB/s]" + } + }, + "dd2cbf7cf4bd4c8fae77d5fc67f00162": { + "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": "" + } + }, + "dd5b7d5c950a4bcea27c3f32521f0147": { + "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_fff946350daf4c18ae2233efcd609a39", + "placeholder": "โ€‹", + "style": "IPY_MODEL_5e7da0b5c91c42f49649a1a4258a4476", + "value": "model.safetensors:โ€‡100%" + } + }, + "dda7b715ab5d4c73ac1a2c990a3d7041": { + "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 + } + }, + "ddcdc6faaab54e81924e59fdf181ec39": { + "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_a828eb556a8d4caf953f8dd9ebcb2ec9", + "IPY_MODEL_5b3b693262104419970eb0cbddcdbc52", + "IPY_MODEL_16e113440f304136aefa2228220f783f" + ], + "layout": "IPY_MODEL_1982f74538654ec28d7ca64f2fd47f47" + } + }, + "dee8708cdd7f4efa8e5cc9b6210de08c": { + "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 + } + }, + "def2bb08ee774a2c8bc8bf0d40b5a642": { + "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": "20px" + } + }, + "e09d7af25de444c09fe002d80c7c7679": { + "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 + } + }, + "e1349589fb2a436d883e00810c4a47c3": { + "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": "20px" + } + }, + "e3ebc817075b4bbeaade52266e47b963": { + "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_b5b8928b5b6c41aa934d70874e6b92bf", + "IPY_MODEL_25ebbe46f81a4db6b92dcb312eb8202d", + "IPY_MODEL_036254161e6146b4bc64140e37b83fbc" + ], + "layout": "IPY_MODEL_96517f6317f34de29d99df8f713e6698" + } + }, + "e4b9e2bc5c1d4f54bd7a2e8420d92672": { + "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_87e0a00af8334ca2bc2464723ea2e290", + "max": 116, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c4fa09605a124234ac947d9246430025", + "value": 116 + } + }, + "e4bb360e16164cf9ae4aa86528d52f71": { + "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 + } + }, + "e4da675acfe94396ad129935b4a45fc8": { + "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 + } + }, + "e62772dad1d84edfa694bfdf393c11e7": { + "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_36b435845b8a471b85bf502373778d61", + "IPY_MODEL_e4b9e2bc5c1d4f54bd7a2e8420d92672", + "IPY_MODEL_04df92563c1646b3b31c6a4ed015e639" + ], + "layout": "IPY_MODEL_a646ebdbccac40c5997ad50a3a635c15" + } + }, + "e64652a2b0ea4a41935f927d0951ed65": { + "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": "" + } + }, + "e70f310ae5e84423b62188a8309be533": { + "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": "" + } + }, + "e73632fe53e9480da0c822f9481871b8": { + "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": "" + } + }, + "e810d3cd2fb14789ad7f35399d440ade": { + "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_89bf7666ffe64a44bdb14188a2c10ca8", + "max": 350, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3076b8e410224008858a8359f1883f7a", + "value": 350 + } + }, + "ec1f65c213b74f51adb1d063a05e5c9e": { + "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": "" + } + }, + "ec7db29b0fa44f5fa0456101f9fe553e": { + "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 + } + }, + "ee3658b9a4714be8bb6c19203219e6f0": { + "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 + } + }, + "ee9eb764d409401f87a740210126691a": { + "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": "" + } + }, + "ef9e1d18f649419caede4a28346c6525": { + "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 + } + }, + "f35b1739b28e413aab0ad157fcd52b0d": { + "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_9a443eda41b0401881ab7b3724dbece1", + "placeholder": "โ€‹", + "style": "IPY_MODEL_45d6b1e230c54892865489614d0ae61a", + "value": "merges.txt:โ€‡" + } + }, + "f873d1c61f3b492f99928b5aa679898c": { + "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": "" + } + }, + "f8ec5b43276b4ee493ebb44ecd7c8c38": { + "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 + } + }, + "fdc1e46322b64aa6a0e08febed90e416": { + "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": "" + } + }, + "fefe86fb9c894838bc5ada7dc07e55ee": { + "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 + } + }, + "ffc41e3d49164a72b13b04d9b2997185": { + "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 + } + }, + "fff946350daf4c18ae2233efcd609a39": { + "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 + } + } + } + } }, - "language_info": { - "name": "python", - "version": "3.10.0" - }, - "colab": { - "provenance": [], - "gpuType": "T4" - }, - "accelerator": "GPU" - }, - "cells": [ - { - "cell_type": "markdown", - "id": "cell-title", - "metadata": {}, - "source": "# TinyPress โ€” Prompt Compression Engine\n\n**HuggingFace Build Small Hackathon ยท Track: Thousand Token Wood**\n\n| Layer | Detail |\n|-------|--------|\n| Compression | `Qwen/Qwen2.5-1.5B-Instruct` (default, switchable) |\n| Scoring | `sentence-transformers/all-MiniLM-L6-v2` (default, switchable) |\n| UI | Gradio 5 โ€” public share URL |\n| Storage | SQLite at `/content/tinypress.db` |\n\n**Features**\n- Compress text to a user-defined token budget\n- Live ๐Ÿ”ด / ๐ŸŸข compression readiness banner\n- Per-token colour highlight panel (toggle on/off)\n- Dynamic compression model switching (5 curated <32B models)\n- Dynamic scoring embedder switching (6 models, with per-model impact info)\n- ๐Ÿ‘ / ๐Ÿ‘Ž feedback on every compression result, with optional text comment\n- Compression run history persisted to SQLite\n- Column picker in History tab โ€” compact default view, expandable to all fields\n- Per-row delete in history\n- Side-by-side word-level diff viewer with feedback badge and token detail\n\n> **Recommended runtime:** GPU โ†’ Runtime โ†’ Change runtime type โ†’ T4 GPU\n\n---\n\n### About the author\n\nBuilt by **Sriharsha C R** โ€” AI Engineer, Cloud Native developer, and knowledge sharer.\nIf this was useful, feel free to connect โ€” always happy to chat about AI, LLMs, or anything in between.\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-sriharsha--cr-0a66c2?logo=linkedin&logoColor=white)](https://www.linkedin.com/in/sriharsha-cr)\n[![X / Twitter](https://img.shields.io/badge/X-@sriharsha__cr-000000?logo=x&logoColor=white)](https://x.com/sriharsha_cr)\n[![HuggingFace](https://img.shields.io/badge/HuggingFace-sriharsha--cr-ff9d00?logo=huggingface&logoColor=white)](https://huggingface.co/sriharsha-cr)\n[![GitHub](https://img.shields.io/badge/GitHub-SriharshaCR-181717?logo=github&logoColor=white)](https://github.com/SriharshaCR)" - }, - { - "cell_type": "markdown", - "id": "cell-s1-hdr", - "metadata": {}, - "source": [ - "## Step 1 โ€” Install dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-install", - "metadata": {}, - "outputs": [], - "source": [ - "!pip install -q \\\n", - " \"gradio==5.0\" \\\n", - " \"transformers>=4.40.0\" \\\n", - " \"sentence-transformers>=3.0.0\" \\\n", - " \"torch>=2.2.0\" \\\n", - " \"numpy>=1.26.0\" \\\n", - " \"pandas>=2.0.0\" \\\n", - " \"accelerate>=0.30.0\" \\\n", - " \"huggingface_hub==0.25.2\"" - ] - }, - { - "cell_type": "markdown", - "id": "cell-s2-hdr", - "metadata": {}, - "source": [ - "## Step 2 โ€” Runtime check" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-runtime", - "metadata": {}, - "outputs": [], - "source": [ - "import torch\n", - "\n", - "device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", - "dtype = torch.float16 if device == 'cuda' else torch.float32\n", - "\n", - "print(f'Device : {device}')\n", - "if device == 'cuda':\n", - " print(f'GPU : {torch.cuda.get_device_name(0)}')\n", - " print(f'VRAM : {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB')\n", - "print(f'dtype : {dtype}')" - ] - }, - { - "cell_type": "markdown", - "id": "cell-s3-hdr", - "metadata": {}, - "source": [ - "## Step 3 โ€” Configuration" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-config", - "metadata": {}, - "outputs": [], - "source": "import os\n\nLLM_MODEL = os.getenv('LLM_MODEL', 'Qwen/Qwen2.5-1.5B-Instruct')\nEMBEDDER_MODEL = os.getenv('EMBEDDER_MODEL', 'sentence-transformers/all-MiniLM-L6-v2')\nDB_PATH = os.getenv('DB_PATH', '/content/tinypress.db')\nSERVER_PORT = int(os.getenv('PORT', 7860))\n\nDEFAULT_TARGET_TOKENS = 500\nMAX_NEW_TOKENS = 1024\nAPP_TITLE = 'TinyPress'\n\n# Curated <32B open-weight causal LMs for local / Colab inference.\nAVAILABLE_MODELS = [\n 'Qwen/Qwen2.5-1.5B-Instruct',\n 'Qwen/Qwen2.5-0.5B-Instruct',\n 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n 'microsoft/Phi-3.5-mini-instruct',\n 'meta-llama/Llama-3.2-1B-Instruct',\n]\n\n# Curated sentence-transformer embedding models for quality scoring.\nAVAILABLE_EMBEDDER_MODELS = [\n 'sentence-transformers/all-MiniLM-L6-v2',\n 'sentence-transformers/all-mpnet-base-v2',\n 'BAAI/bge-small-en-v1.5',\n 'BAAI/bge-base-en-v1.5',\n 'mixedbread-ai/mxbai-embed-large-v1',\n 'Alibaba-NLP/gte-Qwen2-1.5B-instruct',\n]\n\nEMBEDDER_INFO = {\n 'sentence-transformers/all-MiniLM-L6-v2': (\n 'โšก **Fast ยท 22M params ยท Default** \\n'\n 'Great baseline. Scores are reliable for typical compression ratios. '\n 'Runs comfortably on CPU โ€” minimal overhead.'\n ),\n 'sentence-transformers/all-mpnet-base-v2': (\n 'โš–๏ธ **Balanced ยท 110M params** \\n'\n 'Noticeably sharper quality scores than MiniLM, especially on longer texts. '\n 'Small speed trade-off; fine on CPU.'\n ),\n 'BAAI/bge-small-en-v1.5': (\n 'โšก **Fast ยท 33M params** \\n'\n 'Strong quality-to-size ratio โ€” often matches MiniLM on accuracy while being '\n 'slightly more sensitive to meaning shifts. Good CPU option.'\n ),\n 'BAAI/bge-base-en-v1.5': (\n 'โš–๏ธ **Balanced ยท 109M params** \\n'\n 'Consistently strong on semantic similarity benchmarks. '\n 'Scores will be more discriminating โ€” small differences in compression quality show up more clearly.'\n ),\n 'mixedbread-ai/mxbai-embed-large-v1': (\n '๐Ÿ† **High quality ยท 335M params** \\n'\n 'Top-tier similarity scores. Quality readings will be the most accurate here, '\n 'but slower to load and run. GPU recommended.'\n ),\n 'Alibaba-NLP/gte-Qwen2-1.5B-instruct': (\n '๐Ÿ”ฌ **Best quality ยท 1.5B params** \\n'\n 'Strongest semantic understanding in this list. Scores will reflect subtle meaning loss '\n 'that smaller models miss. Requires significant RAM/VRAM โ€” GPU strongly recommended.'\n ),\n}\n\nprint(f'LLM : {LLM_MODEL}')\nprint(f'Embedder : {EMBEDDER_MODEL}')\nprint(f'DB : {DB_PATH}')" - }, - { - "cell_type": "markdown", - "id": "cell-s4-hdr", - "metadata": {}, - "source": [ - "## Step 4 โ€” Model loader" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-model-loader", - "metadata": {}, - "outputs": [], - "source": "from transformers import AutoTokenizer, AutoModelForCausalLM\nfrom sentence_transformers import SentenceTransformer\nimport gc\n\n_llm = None\n_tokenizer = None\n_embedder = None\n_current_model_id = None\n_current_embedder_id = None\n\n\ndef get_current_model_id():\n return _current_model_id\n\n\ndef get_current_tokenizer_id():\n # Tokenizer is always loaded from the same HF repo as the model.\n return _current_model_id\n\n\ndef get_current_embedder_id():\n return _current_embedder_id\n\n\ndef get_llm():\n global _llm, _tokenizer\n if _llm is None:\n _load_llm(LLM_MODEL)\n return _llm, _tokenizer\n\n\ndef switch_llm(model_id: str) -> str:\n global _current_model_id\n if _current_model_id == model_id:\n return f'Already using {model_id}'\n _unload_llm()\n _load_llm(model_id)\n return f'Loaded: {model_id}'\n\n\ndef _load_llm(model_id: str):\n \"\"\"Load model + its paired tokenizer. Both come from the same model_id.\"\"\"\n global _llm, _tokenizer, _current_model_id\n print(f'Loading LLM: {model_id} ...')\n _tokenizer = AutoTokenizer.from_pretrained(model_id)\n _llm = AutoModelForCausalLM.from_pretrained(\n model_id,\n torch_dtype=dtype,\n device_map='auto',\n )\n _llm.eval()\n _current_model_id = model_id\n print(f'LLM ready: {model_id}')\n\n\ndef _unload_llm():\n \"\"\"Free GPU/CPU memory before loading a different model.\"\"\"\n global _llm, _tokenizer, _current_model_id\n del _llm, _tokenizer\n _llm = None\n _tokenizer = None\n _current_model_id = None\n gc.collect()\n if torch.cuda.is_available():\n torch.cuda.empty_cache()\n\n\ndef get_embedder():\n global _embedder, _current_embedder_id\n if _embedder is None:\n _load_embedder(EMBEDDER_MODEL)\n return _embedder\n\n\ndef switch_embedder(model_id: str) -> str:\n global _current_embedder_id\n if _current_embedder_id == model_id:\n return f'Already using {model_id}'\n _unload_embedder()\n _load_embedder(model_id)\n return f'Loaded: {model_id}'\n\n\ndef _load_embedder(model_id: str):\n global _embedder, _current_embedder_id\n print(f'Loading embedder: {model_id} ...')\n _embedder = SentenceTransformer(model_id)\n _current_embedder_id = model_id\n print(f'Embedder ready: {model_id}')\n\n\ndef _unload_embedder():\n global _embedder, _current_embedder_id\n del _embedder\n _embedder = None\n _current_embedder_id = None\n gc.collect()\n if torch.cuda.is_available():\n torch.cuda.empty_cache()\n\n\nprint('Model loader defined.')" - }, - { - "cell_type": "markdown", - "id": "cell-s5-hdr", - "metadata": {}, - "source": [ - "## Step 5 โ€” Core pipeline" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-core", - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "\n", - "# โ”€โ”€ tokenizer utils โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", - "\n", - "def count_tokens(text: str) -> int:\n", - " _, tokenizer = get_llm()\n", - " return len(tokenizer.encode(text, add_special_tokens=False))\n", - "\n", - "\n", - "def get_token_strings(text: str) -> list:\n", - " \"\"\"Return the decoded surface string for every token in text.\"\"\"\n", - " _, tokenizer = get_llm()\n", - " ids = tokenizer.encode(text, add_special_tokens=False)\n", - " return [tokenizer.decode([i]) for i in ids]\n", - "\n", - "\n", - "# โ”€โ”€ compressor โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", - "\n", - "_PROMPT_TEMPLATE = (\n", - " 'You are a lossless compression assistant. '\n", - " 'Compress the following text to at most {target} tokens.\\n'\n", - " 'Preserve all key facts, decisions, and intent. '\n", - " 'Do not add commentary. Output only the compressed text.\\n\\n'\n", - " 'TEXT:\\n{text}\\n\\nCOMPRESSED:'\n", - ")\n", - "\n", - "\n", - "def _generate(prompt: str) -> str:\n", - " model, tokenizer = get_llm()\n", - " inputs = tokenizer(prompt, return_tensors='pt').to(model.device)\n", - " with torch.no_grad():\n", - " output_ids = model.generate(\n", - " **inputs,\n", - " max_new_tokens=MAX_NEW_TOKENS,\n", - " do_sample=False,\n", - " pad_token_id=tokenizer.eos_token_id,\n", - " )\n", - " new_tokens = output_ids[0][inputs['input_ids'].shape[1]:]\n", - " return tokenizer.decode(new_tokens, skip_special_tokens=True).strip()\n", - "\n", - "\n", - "def compress(text: str, target_tokens: int) -> tuple:\n", - " \"\"\"Returns (compressed_text, input_token_count, output_token_count).\"\"\"\n", - " input_tokens = count_tokens(text)\n", - " if input_tokens <= target_tokens:\n", - " return text, input_tokens, input_tokens\n", - "\n", - " prompt = _PROMPT_TEMPLATE.format(target=target_tokens, text=text)\n", - " compressed = _generate(prompt)\n", - "\n", - " # Hard-trim if model overshoots.\n", - " _, tokenizer = get_llm()\n", - " ids = tokenizer.encode(compressed, add_special_tokens=False)\n", - " if len(ids) > target_tokens:\n", - " compressed = tokenizer.decode(ids[:target_tokens], skip_special_tokens=True)\n", - "\n", - " output_tokens = count_tokens(compressed)\n", - " return compressed, input_tokens, output_tokens\n", - "\n", - "\n", - "# โ”€โ”€ scorer โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n", - "\n", - "def semantic_score(original: str, compressed: str) -> float:\n", - " embedder = get_embedder()\n", - " vecs = embedder.encode([original, compressed], convert_to_numpy=True)\n", - " cos = float(\n", - " np.dot(vecs[0], vecs[1]) / (np.linalg.norm(vecs[0]) * np.linalg.norm(vecs[1]))\n", - " )\n", - " return round(max(0.0, min(1.0, cos)), 4)\n", - "\n", - "\n", - "print('Core pipeline defined.')" - ] - }, - { - "cell_type": "markdown", - "id": "cell-s6-hdr", - "metadata": {}, - "source": [ - "## Step 6 โ€” Diff renderer" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-diff", - "metadata": {}, - "outputs": [], - "source": "import difflib\nimport html as _h\n\n\ndef _word_diff(original: str, compressed: str) -> tuple:\n \"\"\"\n Word-level SequenceMatcher diff.\n Returns (annotated_original_html, annotated_compressed_html).\n Colour key:\n original โ€” red strikethrough = dropped\n compressed โ€” amber = rewritten\n compressed โ€” green = inserted\n plain = unchanged\n \"\"\"\n orig_words = original.split()\n comp_words = compressed.split()\n matcher = difflib.SequenceMatcher(None, orig_words, comp_words, autojunk=False)\n\n orig_parts, comp_parts = [], []\n\n for tag, i1, i2, j1, j2 in matcher.get_opcodes():\n ow = _h.escape(' '.join(orig_words[i1:i2]))\n cw = _h.escape(' '.join(comp_words[j1:j2]))\n\n if tag == 'equal':\n orig_parts.append(ow)\n comp_parts.append(cw)\n\n elif tag == 'delete':\n orig_parts.append(\n f'{ow}'\n )\n\n elif tag == 'insert':\n comp_parts.append(\n f'{cw}'\n )\n\n elif tag == 'replace':\n orig_parts.append(\n f'{ow}'\n )\n comp_parts.append(\n f'{cw}'\n )\n\n return ' '.join(orig_parts), ' '.join(comp_parts)\n\n\ndef render_diff_html(record: dict) -> str:\n \"\"\"Build a self-contained side-by-side diff HTML block for a compression run.\"\"\"\n original = record.get('input_text', '')\n compressed = record.get('output_text', '')\n if not original or not compressed:\n return ''\n\n orig_html, comp_html = _word_diff(original, compressed)\n\n model = _h.escape(record.get('model', 'โ€”'))\n tokenizer = _h.escape(record.get('tokenizer', 'โ€”'))\n ts = _h.escape(record.get('timestamp', 'โ€”'))\n in_tok = record.get('input_tokens', 'โ€”')\n out_tok = record.get('output_tokens', 'โ€”')\n target_tok = record.get('target_tokens', 'โ€”')\n ratio = record.get('compression_ratio', 0)\n quality = record.get('quality_score', 0)\n duration = record.get('duration_ms', 'โ€”')\n run_id = record.get('id', 'โ€”')\n\n feedback_val = record.get('feedback')\n feedback_note = _h.escape(record.get('feedback_comment') or '')\n\n # Build optional feedback block\n if feedback_val is not None:\n badge_bg = '#f0fdf4' if feedback_val == 1 else '#fef2f2'\n badge_color = '#15803d' if feedback_val == 1 else '#b91c1c'\n badge_text = '๐Ÿ‘ Helpful' if feedback_val == 1 else '๐Ÿ‘Ž Not helpful'\n feedback_block = (\n f'
'\n f'{badge_text}'\n )\n if feedback_note:\n feedback_block += (\n f''\n f'\"{feedback_note}\"'\n )\n feedback_block += '
'\n else:\n feedback_block = ''\n\n return f\"\"\"\n
\n\n \n
\n Run #{run_id}\n {ts}\n {model}\n Quality {quality:.4f}\n Ratio {ratio:.4f}\n ⏱ {duration} ms\n
\n\n \n
\n {in_tok} in โ†’ {out_tok} out (target {target_tok})\n tokenizer: {tokenizer}\n
\n\n \n
\n
\n
\n ORIGINAL\n {in_tok} tokens\n
\n
{orig_html}
\n
\n
\n
\n COMPRESSED\n {out_tok} tokens\n
\n
{comp_html}
\n
\n
\n\n {feedback_block}\n\n \n
\n dropped\n rewritten\n inserted\n plain = unchanged\n
\n\n
\n\"\"\"\n\n\nprint('Diff renderer defined.')" - }, - { - "cell_type": "markdown", - "id": "cell-s7-hdr", - "metadata": {}, - "source": [ - "## Step 7 โ€” Database" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-db", - "metadata": {}, - "outputs": [], - "source": "import sqlite3\n\n_SCHEMA = \"\"\"\nCREATE TABLE IF NOT EXISTS compression_runs (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n timestamp TEXT NOT NULL,\n model TEXT NOT NULL,\n tokenizer TEXT NOT NULL,\n input_tokens INTEGER NOT NULL,\n output_tokens INTEGER NOT NULL,\n target_tokens INTEGER NOT NULL,\n compression_ratio REAL NOT NULL,\n quality_score REAL NOT NULL,\n duration_ms REAL NOT NULL,\n input_text TEXT NOT NULL,\n output_text TEXT NOT NULL,\n feedback INTEGER,\n feedback_comment TEXT\n);\n\"\"\"\n\n\ndef _connect():\n conn = sqlite3.connect(DB_PATH)\n conn.row_factory = sqlite3.Row\n return conn\n\n\ndef init_db():\n conn = _connect()\n conn.executescript(_SCHEMA)\n for col, typedef in [\n ('tokenizer', 'TEXT NOT NULL DEFAULT \"\"'),\n ('duration_ms', 'REAL NOT NULL DEFAULT 0'),\n ('feedback', 'INTEGER'),\n ('feedback_comment', 'TEXT'),\n ]:\n try:\n conn.execute(f'ALTER TABLE compression_runs ADD COLUMN {col} {typedef}')\n except sqlite3.OperationalError:\n pass\n conn.commit()\n conn.close()\n\n\ndef save_run(record: dict) -> int:\n conn = _connect()\n cursor = conn.execute(\n '''\n INSERT INTO compression_runs\n (timestamp, model, tokenizer, input_tokens, output_tokens, target_tokens,\n compression_ratio, quality_score, duration_ms, input_text, output_text)\n VALUES\n (:timestamp, :model, :tokenizer, :input_tokens, :output_tokens, :target_tokens,\n :compression_ratio, :quality_score, :duration_ms, :input_text, :output_text)\n ''',\n record,\n )\n run_id = cursor.lastrowid\n conn.commit()\n conn.close()\n return run_id\n\n\ndef update_feedback(run_id: int, value: int):\n conn = _connect()\n conn.execute('UPDATE compression_runs SET feedback = ? WHERE id = ?', (value, run_id))\n conn.commit()\n conn.close()\n\n\ndef update_feedback_comment(run_id: int, comment: str):\n conn = _connect()\n conn.execute('UPDATE compression_runs SET feedback_comment = ? WHERE id = ?', (comment, run_id))\n conn.commit()\n conn.close()\n\n\ndef delete_run(run_id: int):\n conn = _connect()\n conn.execute('DELETE FROM compression_runs WHERE id = ?', (run_id,))\n conn.commit()\n conn.close()\n\n\ndef get_run(run_id: int):\n conn = _connect()\n row = conn.execute('SELECT * FROM compression_runs WHERE id = ?', (run_id,)).fetchone()\n conn.close()\n return dict(row) if row else None\n\n\ndef get_runs(limit: int = 100) -> list:\n conn = _connect()\n rows = conn.execute(\n 'SELECT * FROM compression_runs ORDER BY id DESC LIMIT ?', (limit,)\n ).fetchall()\n conn.close()\n return [dict(r) for r in rows]\n\n\ninit_db()\nprint(f'Database ready at {DB_PATH}')" - }, - { - "cell_type": "markdown", - "id": "cell-s8-hdr", - "metadata": {}, - "source": [ - "## Step 8 โ€” Load models\n", - "\n", - "Downloads and caches weights. GPU warm-cache: ~30 s. First run: a few minutes." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-load-models", - "metadata": {}, - "outputs": [], - "source": [ - "get_llm()\n", - "get_embedder()\n", - "print('\\nAll models loaded and ready.')" - ] - }, - { - "cell_type": "markdown", - "id": "cell-s9-hdr", - "metadata": {}, - "source": [ - "## Step 9 โ€” Launch Gradio UI\n", - "\n", - "Prints a **public share URL** when ready. All features are live in the UI." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-gradio", - "metadata": {}, - "outputs": [], - "source": "import html as _h\nimport time\nfrom datetime import datetime, timezone\n\nimport gradio as gr\nimport pandas as pd\n\n\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n# COMPRESS TAB โ€” handlers\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n\n_PALETTE = [\n '#fde68a', '#bbf7d0', '#bfdbfe', '#fecaca', '#e9d5ff',\n '#fed7aa', '#99f6e4', '#e0e7ff', '#fce7f3', '#d1fae5',\n]\n_BTN_SHOW = '๐Ÿ” Show Token Highlights'\n_BTN_HIDE = '๐Ÿ™ˆ Hide Token Highlights'\n\n\ndef _render_token_html(text: str) -> str:\n if not text.strip():\n return ''\n tokens = get_token_strings(text)\n if not tokens:\n return ''\n spans = []\n for i, tok in enumerate(tokens):\n color = _PALETTE[i % len(_PALETTE)]\n display = _h.escape(tok).replace(' ', 'ยท')\n spans.append(\n f'{display}'\n )\n return (\n '
'\n f'
'\n f'{len(tokens)} tokens โ€” each chip = one token, hover for index
'\n '
'\n + ''.join(spans) + '
'\n )\n\n\ndef toggle_token_panel(is_visible: bool, text: str):\n new_visible = not is_visible\n html_content = _render_token_html(text) if new_visible else ''\n btn_label = _BTN_HIDE if new_visible else _BTN_SHOW\n return new_visible, html_content, gr.update(value=btn_label)\n\n\ndef update_token_panel(text: str, is_visible: bool) -> str:\n return _render_token_html(text) if is_visible else ''\n\n\n_STATUS_EMPTY = ''\n_STATUS_RED = (\n '
'\n '๐Ÿ”ด Compression not needed โ€” input ({input_tok} tokens) '\n 'is already within the {budget}-token budget.
'\n)\n_STATUS_GREEN = (\n '
'\n '๐ŸŸข Ready to compress โ€” {input_tok} tokens โ†’ {budget} token budget '\n '({delta} tokens to shed).
'\n)\n\n\ndef compression_status(text: str, target_tokens: int) -> str:\n if not text.strip():\n return _STATUS_EMPTY\n n = count_tokens(text)\n if n <= int(target_tokens):\n return _STATUS_RED.format(input_tok=n, budget=int(target_tokens))\n return _STATUS_GREEN.format(input_tok=n, budget=int(target_tokens), delta=n - int(target_tokens))\n\n\ndef run_compression(text: str, target_tokens: int):\n _hidden = gr.update(visible=False)\n if not text.strip():\n return ('', 0, 0, 0, 0.0, None,\n _hidden, _hidden, gr.update(value='', visible=False),\n gr.update(value='', visible=False), _hidden, gr.update(value='', visible=False))\n\n t0 = time.perf_counter()\n compressed, input_tokens, output_tokens = compress(text, int(target_tokens))\n duration_ms = round((time.perf_counter() - t0) * 1000, 1)\n\n ratio = round(output_tokens / input_tokens, 4) if input_tokens else 0.0\n quality = semantic_score(text, compressed)\n\n run_id = save_run({\n 'timestamp': datetime.now(timezone.utc).isoformat(),\n 'model': get_current_model_id() or LLM_MODEL,\n 'tokenizer': get_current_tokenizer_id() or LLM_MODEL,\n 'input_tokens': input_tokens,\n 'output_tokens': output_tokens,\n 'target_tokens': int(target_tokens),\n 'compression_ratio': ratio,\n 'quality_score': quality,\n 'duration_ms': duration_ms,\n 'input_text': text,\n 'output_text': compressed,\n })\n\n return (\n compressed, input_tokens, output_tokens, ratio, quality,\n run_id,\n gr.update(visible=True), gr.update(visible=True),\n gr.update(value='', visible=True),\n gr.update(value='', visible=False),\n gr.update(visible=False),\n gr.update(value='', visible=False),\n )\n\n\ndef load_model(model_id: str) -> str:\n if not model_id:\n return 'No model selected.'\n try:\n return switch_llm(model_id)\n except Exception as exc:\n return f'Error loading {model_id}: {exc}'\n\n\ndef load_embedder(model_id: str) -> str:\n if not model_id:\n return 'No model selected.'\n try:\n return switch_embedder(model_id)\n except Exception as exc:\n return f'Error loading {model_id}: {exc}'\n\n\ndef on_embedder_change(model_id: str) -> str:\n return EMBEDDER_INFO.get(model_id, '')\n\n\ndef submit_feedback(run_id, value: int):\n if run_id is None:\n return 'Run a compression first.', gr.update(visible=False), gr.update(visible=False), gr.update(value='', visible=False)\n update_feedback(run_id, value)\n msg = '๐Ÿ‘ Marked as helpful โ€” thanks!' if value == 1 else '๐Ÿ‘Ž Noted โ€” thanks for the feedback!'\n return msg, gr.update(visible=True), gr.update(visible=True), gr.update(value='', visible=False)\n\n\ndef save_comment(run_id, comment: str):\n if run_id is None:\n return gr.update(value='Run a compression first.', visible=True)\n if not comment.strip():\n return gr.update(value='Type a note first.', visible=True)\n update_feedback_comment(run_id, comment.strip())\n return gr.update(value='โœ“ Note saved.', visible=True)\n\n\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n# HISTORY TAB โ€” handlers\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n\n_DEFAULT_COLS = ['id', 'timestamp', 'model', 'compression_ratio', 'quality_score', 'feedback']\n_ALL_COLS = [\n 'id', 'timestamp', 'model', 'tokenizer',\n 'input_tokens', 'output_tokens', 'target_tokens',\n 'compression_ratio', 'quality_score', 'duration_ms',\n 'feedback', 'feedback_comment',\n]\n\n\ndef load_history(selected_cols=None):\n cols = selected_cols if selected_cols else _DEFAULT_COLS\n runs = get_runs(limit=100)\n if not runs:\n return pd.DataFrame(columns=cols), '', '', ''\n df = pd.DataFrame(runs)\n existing = [c for c in cols if c in df.columns]\n df = df[existing]\n avg_q = f\"{df['quality_score'].mean():.4f}\" if 'quality_score' in df.columns else 'โ€”'\n avg_r = f\"{df['compression_ratio'].mean():.4f}\" if 'compression_ratio' in df.columns else 'โ€”'\n return df, avg_q, avg_r, ''\n\n\ndef on_row_select(evt: gr.SelectData, df: pd.DataFrame):\n if df is None or df.empty:\n return None, '', 'No rows available.'\n row_idx = evt.index[0]\n run_id = int(df.iloc[row_idx]['id'])\n record = get_run(run_id)\n if not record:\n return None, '', f'Row {run_id} not found in database.'\n return run_id, render_diff_html(record), f'Row {run_id} selected โ€” click Delete to remove.'\n\n\ndef delete_selected(run_id, selected_cols):\n if run_id is None:\n df, avg_q, avg_r, _ = load_history(selected_cols)\n return df, avg_q, avg_r, None, '', 'No row selected.'\n delete_run(run_id)\n df, avg_q, avg_r, _ = load_history(selected_cols)\n return df, avg_q, avg_r, None, '', f'Row {run_id} deleted.'\n\n\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n# BUILD APP\n# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n\ndef build_app() -> gr.Blocks:\n with gr.Blocks(title=APP_TITLE) as app:\n\n # โ”€โ”€ Compress tab โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n with gr.Tab('Compress'):\n gr.Markdown('## TinyPress โ€” Prompt Compression Engine')\n gr.Markdown(\n 'Paste any long text. Set your token budget. Get a compressed version '\n 'that preserves intent โ€” scored for quality.'\n )\n\n with gr.Accordion('Model Settings', open=False):\n gr.Markdown('**Compression Model**')\n model_dropdown = gr.Dropdown(\n choices=AVAILABLE_MODELS, value=LLM_MODEL,\n label='Compression Model', allow_custom_value=True,\n )\n load_model_btn = gr.Button('Load Model', variant='secondary')\n model_status = gr.Textbox(label='Model Status', value=f'Active: {LLM_MODEL}', interactive=False)\n\n gr.Divider()\n\n gr.Markdown('**Scoring Embedder**')\n embedder_dropdown = gr.Dropdown(\n choices=AVAILABLE_EMBEDDER_MODELS, value=EMBEDDER_MODEL,\n label='Embedder Model', allow_custom_value=True,\n )\n embedder_info_panel = gr.Markdown(value=EMBEDDER_INFO.get(EMBEDDER_MODEL, ''))\n load_embedder_btn = gr.Button('Load Embedder', variant='secondary')\n embedder_status = gr.Textbox(label='Embedder Status', value=f'Active: {EMBEDDER_MODEL}', interactive=False)\n\n with gr.Row():\n with gr.Column():\n input_text = gr.Textbox(label='Input Text', lines=12, placeholder='Paste your text here...')\n token_toggle_btn = gr.Button(_BTN_SHOW, variant='secondary', size='sm')\n token_panel = gr.HTML(value='')\n tokens_visible = gr.State(value=False)\n target_slider = gr.Slider(minimum=100, maximum=1000, value=DEFAULT_TARGET_TOKENS, step=50, label='Target Token Budget')\n status_banner = gr.HTML(value=_STATUS_EMPTY)\n compress_btn = gr.Button('Compress', variant='primary')\n\n with gr.Column():\n output_text = gr.Textbox(label='Compressed Output', lines=12)\n with gr.Row():\n input_tok = gr.Number(label='Input Tokens', interactive=False)\n output_tok = gr.Number(label='Output Tokens', interactive=False)\n with gr.Row():\n ratio = gr.Number(label='Compression Ratio', interactive=False)\n quality = gr.Number(label='Quality Score (0โ€“1)', interactive=False)\n gr.Markdown('**Was this compression helpful?**')\n with gr.Row():\n thumbs_up_btn = gr.Button('๐Ÿ‘ Helpful', variant='secondary', visible=False, scale=1)\n thumbs_down_btn = gr.Button('๐Ÿ‘Ž Not helpful', variant='secondary', visible=False, scale=1)\n feedback_status = gr.Markdown('', visible=False)\n comment_box = gr.Textbox(\n label='Add a note (optional)',\n placeholder=\"e.g. 'lost key dates', 'too short', 'great summary'\",\n lines=2, visible=False,\n )\n save_comment_btn = gr.Button('Save note', variant='secondary', size='sm', visible=False)\n comment_saved = gr.Markdown('', visible=False)\n\n last_run_id = gr.State(value=None)\n\n token_toggle_btn.click(fn=toggle_token_panel, inputs=[tokens_visible, input_text], outputs=[tokens_visible, token_panel, token_toggle_btn])\n input_text.change(fn=update_token_panel, inputs=[input_text, tokens_visible], outputs=[token_panel])\n _sa = dict(inputs=[input_text, target_slider], outputs=[status_banner])\n input_text.change(fn=compression_status, **_sa)\n target_slider.change(fn=compression_status, **_sa)\n load_model_btn.click(fn=load_model, inputs=[model_dropdown], outputs=[model_status])\n embedder_dropdown.change(fn=on_embedder_change, inputs=[embedder_dropdown], outputs=[embedder_info_panel])\n load_embedder_btn.click(fn=load_embedder, inputs=[embedder_dropdown], outputs=[embedder_status])\n compress_btn.click(\n fn=run_compression,\n inputs=[input_text, target_slider],\n outputs=[output_text, input_tok, output_tok, ratio, quality,\n last_run_id, thumbs_up_btn, thumbs_down_btn, feedback_status,\n comment_box, save_comment_btn, comment_saved],\n )\n thumbs_up_btn.click(\n fn=lambda run_id: submit_feedback(run_id, 1),\n inputs=[last_run_id],\n outputs=[feedback_status, comment_box, save_comment_btn, comment_saved],\n )\n thumbs_down_btn.click(\n fn=lambda run_id: submit_feedback(run_id, -1),\n inputs=[last_run_id],\n outputs=[feedback_status, comment_box, save_comment_btn, comment_saved],\n )\n save_comment_btn.click(fn=save_comment, inputs=[last_run_id, comment_box], outputs=[comment_saved])\n\n # โ”€โ”€ History tab โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n with gr.Tab('History') as history_tab:\n gr.Markdown('## Compression Run History')\n with gr.Row():\n refresh_btn = gr.Button('Refresh', variant='secondary')\n delete_btn = gr.Button('Delete Selected Row', variant='stop')\n\n with gr.Accordion('Column visibility', open=False):\n col_picker = gr.CheckboxGroup(choices=_ALL_COLS, value=_DEFAULT_COLS, label=None)\n\n with gr.Row():\n avg_quality = gr.Textbox(label='Avg Quality Score', interactive=False)\n avg_ratio = gr.Textbox(label='Avg Compression Ratio', interactive=False)\n history_table = gr.DataFrame(label='Past Runs โ€” click a row to see its diff', interactive=False)\n delete_status = gr.Textbox(label='Status', value='Click a row to select it.', interactive=False)\n gr.Markdown('### Side-by-side Diff')\n diff_panel = gr.HTML(value='')\n selected_id = gr.State(value=None)\n\n _outputs = [history_table, avg_quality, avg_ratio, diff_panel]\n refresh_btn.click(fn=load_history, inputs=[col_picker], outputs=_outputs)\n history_tab.select(fn=load_history, inputs=[col_picker], outputs=_outputs)\n col_picker.change(fn=load_history, inputs=[col_picker], outputs=_outputs)\n history_table.select(fn=on_row_select, inputs=[history_table], outputs=[selected_id, diff_panel, delete_status])\n delete_btn.click(\n fn=delete_selected,\n inputs=[selected_id, col_picker],\n outputs=[history_table, avg_quality, avg_ratio, selected_id, diff_panel, delete_status],\n )\n\n return app\n\n\napp = build_app()\napp.launch(share=True, server_port=SERVER_PORT)" - }, - { - "cell_type": "markdown", - "id": "cell-s10-hdr", - "metadata": {}, - "source": [ - "## Step 10 โ€” Programmatic demo (no UI needed)\n", - "\n", - "Run this cell to compress a sample text directly and inspect all metrics inline." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cell-demo", - "metadata": {}, - "outputs": [], - "source": [ - "SAMPLE_TEXT = \"\"\"\n", - "The transformer architecture, introduced in the seminal paper Attention Is All You Need by Vaswani et al.\n", - "in 2017, fundamentally changed how we approach sequence modelling tasks in natural language processing.\n", - "Prior to transformers, recurrent neural networks (RNNs) and long short-term memory (LSTM) networks were\n", - "the dominant architectures for tasks such as machine translation, text summarisation, and question answering.\n", - "However, these models suffered from several limitations: they processed tokens sequentially, making\n", - "parallelisation difficult; they struggled to capture long-range dependencies due to vanishing gradients;\n", - "and training was slow even on modern hardware. The transformer addressed all of these issues through\n", - "its self-attention mechanism, which allows every token in a sequence to directly attend to every other\n", - "token in a single operation. Multi-head attention further extends this by running several attention\n", - "functions in parallel, capturing different types of relationships between tokens simultaneously.\n", - "Position encodings are added to token embeddings to give the model a sense of sequence order, since\n", - "unlike RNNs the architecture has no inherent notion of position. Feed-forward sub-layers, layer\n", - "normalisation, and residual connections complete each transformer block. The result is a model that\n", - "trains faster, scales better with data and compute, and generalises more effectively than its\n", - "predecessors, setting the stage for large language models like GPT, BERT, and the entire modern\n", - "LLM ecosystem.\n", - "\"\"\".strip()\n", - "\n", - "TARGET = 150 # token budget\n", - "\n", - "input_tok_count = count_tokens(SAMPLE_TEXT)\n", - "print(f'Input tokens : {input_tok_count}')\n", - "print(f'Target tokens: {TARGET}')\n", - "print(f'Status : {\"ready to compress\" if input_tok_count > TARGET else \"already within budget\"}')\n", - "print()\n", - "\n", - "t0 = time.perf_counter()\n", - "compressed, in_tok, out_tok = compress(SAMPLE_TEXT, TARGET)\n", - "elapsed = round((time.perf_counter() - t0) * 1000, 1)\n", - "\n", - "score = semantic_score(SAMPLE_TEXT, compressed)\n", - "ratio = round(out_tok / in_tok, 4)\n", - "\n", - "print('โ”€' * 60)\n", - "print(compressed)\n", - "print('โ”€' * 60)\n", - "print(f'Output tokens : {out_tok}')\n", - "print(f'Compression ratio: {ratio}')\n", - "print(f'Quality score : {score}')\n", - "print(f'Duration : {elapsed} ms')\n", - "print(f'Model : {get_current_model_id()}')\n", - "print(f'Tokenizer : {get_current_tokenizer_id()}')" - ] - } - ] -} \ No newline at end of file + "nbformat": 4, + "nbformat_minor": 5 +}