{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "f8f72ea7-273c-49da-8af7-09e9fa934b83", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting gradio\n", " Downloading gradio-5.47.0-py3-none-any.whl.metadata (16 kB)\n", "Collecting aiofiles<25.0,>=22.0 (from gradio)\n", " Using cached aiofiles-24.1.0-py3-none-any.whl.metadata (10 kB)\n", "Requirement already satisfied: anyio<5.0,>=3.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (4.2.0)\n", "Requirement already satisfied: brotli>=1.1.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (1.1.0)\n", "Collecting fastapi<1.0,>=0.115.2 (from gradio)\n", " Downloading fastapi-0.117.1-py3-none-any.whl.metadata (28 kB)\n", "Collecting ffmpy (from gradio)\n", " Using cached ffmpy-0.6.1-py3-none-any.whl.metadata (2.9 kB)\n", "Collecting gradio-client==1.13.2 (from gradio)\n", " Downloading gradio_client-1.13.2-py3-none-any.whl.metadata (7.1 kB)\n", "Collecting groovy~=0.1 (from gradio)\n", " Using cached groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB)\n", "Collecting httpx<1.0,>=0.24.1 (from gradio)\n", " Using cached httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB)\n", "Collecting huggingface-hub<1.0,>=0.33.5 (from gradio)\n", " Downloading huggingface_hub-0.35.1-py3-none-any.whl.metadata (14 kB)\n", "Requirement already satisfied: jinja2<4.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (3.1.3)\n", "Requirement already satisfied: markupsafe<4.0,>=2.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (2.1.3)\n", "Requirement already satisfied: numpy<3.0,>=1.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (1.26.3)\n", "Collecting orjson~=3.0 (from gradio)\n", " Using cached orjson-3.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (41 kB)\n", "Requirement already satisfied: packaging in /opt/conda/lib/python3.11/site-packages (from gradio) (23.2)\n", "Requirement already satisfied: pandas<3.0,>=1.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (2.1.4)\n", "Requirement already satisfied: pillow<12.0,>=8.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (10.2.0)\n", "Collecting pydantic<2.12,>=2.0 (from gradio)\n", " Downloading pydantic-2.11.9-py3-none-any.whl.metadata (68 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m68.4/68.4 kB\u001b[0m \u001b[31m2.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hCollecting pydub (from gradio)\n", " Using cached pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n", "Collecting python-multipart>=0.0.18 (from gradio)\n", " Using cached python_multipart-0.0.20-py3-none-any.whl.metadata (1.8 kB)\n", "Requirement already satisfied: pyyaml<7.0,>=5.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (6.0.1)\n", "Collecting ruff>=0.9.3 (from gradio)\n", " Downloading ruff-0.13.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (25 kB)\n", "Collecting safehttpx<0.2.0,>=0.1.6 (from gradio)\n", " Using cached safehttpx-0.1.6-py3-none-any.whl.metadata (4.2 kB)\n", "Collecting semantic-version~=2.0 (from gradio)\n", " Using cached semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n", "Collecting starlette<1.0,>=0.40.0 (from gradio)\n", " Downloading starlette-0.48.0-py3-none-any.whl.metadata (6.3 kB)\n", "Collecting tomlkit<0.14.0,>=0.12.0 (from gradio)\n", " Using cached tomlkit-0.13.3-py3-none-any.whl.metadata (2.8 kB)\n", "Collecting typer<1.0,>=0.12 (from gradio)\n", " Downloading typer-0.19.2-py3-none-any.whl.metadata (16 kB)\n", "Requirement already satisfied: typing-extensions~=4.0 in /opt/conda/lib/python3.11/site-packages (from gradio) (4.9.0)\n", "Collecting uvicorn>=0.14.0 (from gradio)\n", " Downloading uvicorn-0.37.0-py3-none-any.whl.metadata (6.6 kB)\n", "Requirement already satisfied: fsspec in /opt/conda/lib/python3.11/site-packages (from gradio-client==1.13.2->gradio) (2023.12.2)\n", "Collecting websockets<16.0,>=13.0 (from gradio-client==1.13.2->gradio)\n", " Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)\n", "Requirement already satisfied: idna>=2.8 in /opt/conda/lib/python3.11/site-packages (from anyio<5.0,>=3.0->gradio) (3.6)\n", "Requirement already satisfied: sniffio>=1.1 in /opt/conda/lib/python3.11/site-packages (from anyio<5.0,>=3.0->gradio) (1.3.0)\n", "Requirement already satisfied: certifi in /opt/conda/lib/python3.11/site-packages (from httpx<1.0,>=0.24.1->gradio) (2024.2.2)\n", "Collecting httpcore==1.* (from httpx<1.0,>=0.24.1->gradio)\n", " Using cached httpcore-1.0.9-py3-none-any.whl.metadata (21 kB)\n", "Collecting h11>=0.16 (from httpcore==1.*->httpx<1.0,>=0.24.1->gradio)\n", " Using cached h11-0.16.0-py3-none-any.whl.metadata (8.3 kB)\n", "Collecting filelock (from huggingface-hub<1.0,>=0.33.5->gradio)\n", " Using cached filelock-3.19.1-py3-none-any.whl.metadata (2.1 kB)\n", "Requirement already satisfied: requests in /opt/conda/lib/python3.11/site-packages (from huggingface-hub<1.0,>=0.33.5->gradio) (2.31.0)\n", "Requirement already satisfied: tqdm>=4.42.1 in /opt/conda/lib/python3.11/site-packages (from huggingface-hub<1.0,>=0.33.5->gradio) (4.66.1)\n", "Collecting hf-xet<2.0.0,>=1.1.3 (from huggingface-hub<1.0,>=0.33.5->gradio)\n", " Downloading hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.7 kB)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)\n", "Requirement already satisfied: tzdata>=2022.1 in /opt/conda/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2023.4)\n", "Collecting annotated-types>=0.6.0 (from pydantic<2.12,>=2.0->gradio)\n", " Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)\n", "Collecting pydantic-core==2.33.2 (from pydantic<2.12,>=2.0->gradio)\n", " Using cached pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)\n", "Collecting typing-extensions~=4.0 (from gradio)\n", " Using cached typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)\n", "Collecting typing-inspection>=0.4.0 (from pydantic<2.12,>=2.0->gradio)\n", " Using cached typing_inspection-0.4.1-py3-none-any.whl.metadata (2.6 kB)\n", "Requirement already satisfied: click>=8.0.0 in /opt/conda/lib/python3.11/site-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n", "Collecting shellingham>=1.3.0 (from typer<1.0,>=0.12->gradio)\n", " Using cached shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)\n", "Collecting rich>=10.11.0 (from typer<1.0,>=0.12->gradio)\n", " Using cached rich-14.1.0-py3-none-any.whl.metadata (18 kB)\n", "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.16.0)\n", "Collecting markdown-it-py>=2.2.0 (from rich>=10.11.0->typer<1.0,>=0.12->gradio)\n", " Using cached markdown_it_py-4.0.0-py3-none-any.whl.metadata (7.3 kB)\n", "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /opt/conda/lib/python3.11/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.17.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.11/site-packages (from requests->huggingface-hub<1.0,>=0.33.5->gradio) (3.3.2)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.11/site-packages (from requests->huggingface-hub<1.0,>=0.33.5->gradio) (2.1.0)\n", "Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio)\n", " Using cached mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)\n", "Downloading gradio-5.47.0-py3-none-any.whl (60.4 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.4/60.4 MB\u001b[0m \u001b[31m51.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n", "\u001b[?25hDownloading gradio_client-1.13.2-py3-none-any.whl (325 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m325.3/325.3 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n", "\u001b[?25hUsing cached aiofiles-24.1.0-py3-none-any.whl (15 kB)\n", "Downloading fastapi-0.117.1-py3-none-any.whl (95 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m96.0/96.0 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached groovy-0.1.2-py3-none-any.whl (14 kB)\n", "Using cached httpx-0.28.1-py3-none-any.whl (73 kB)\n", "Using cached httpcore-1.0.9-py3-none-any.whl (78 kB)\n", "Downloading huggingface_hub-0.35.1-py3-none-any.whl (563 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m563.3/563.3 kB\u001b[0m \u001b[31m17.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached orjson-3.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (132 kB)\n", "Downloading pydantic-2.11.9-py3-none-any.whl (444 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m444.9/444.9 kB\u001b[0m \u001b[31m16.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)\n", "Using cached python_multipart-0.0.20-py3-none-any.whl (24 kB)\n", "Downloading ruff-0.13.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.2 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.2/13.2 MB\u001b[0m \u001b[31m72.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m0:01\u001b[0m\n", "\u001b[?25hUsing cached safehttpx-0.1.6-py3-none-any.whl (8.7 kB)\n", "Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n", "Downloading starlette-0.48.0-py3-none-any.whl (73 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m73.7/73.7 kB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached tomlkit-0.13.3-py3-none-any.whl (38 kB)\n", "Downloading typer-0.19.2-py3-none-any.whl (46 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.7/46.7 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached typing_extensions-4.15.0-py3-none-any.whl (44 kB)\n", "Downloading uvicorn-0.37.0-py3-none-any.whl (67 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m68.0/68.0 kB\u001b[0m \u001b[31m2.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached ffmpy-0.6.1-py3-none-any.whl (5.5 kB)\n", "Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", "Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)\n", "Using cached h11-0.16.0-py3-none-any.whl (37 kB)\n", "Downloading hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.2/3.2 MB\u001b[0m \u001b[31m61.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n", "\u001b[?25hUsing cached rich-14.1.0-py3-none-any.whl (243 kB)\n", "Using cached shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n", "Using cached typing_inspection-0.4.1-py3-none-any.whl (14 kB)\n", "Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (182 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m182.3/182.3 kB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hUsing cached filelock-3.19.1-py3-none-any.whl (15 kB)\n", "Using cached markdown_it_py-4.0.0-py3-none-any.whl (87 kB)\n", "Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n", "Installing collected packages: pydub, websockets, typing-extensions, tomlkit, shellingham, semantic-version, ruff, python-multipart, orjson, mdurl, hf-xet, h11, groovy, filelock, ffmpy, annotated-types, aiofiles, uvicorn, typing-inspection, starlette, pydantic-core, markdown-it-py, huggingface-hub, httpcore, rich, pydantic, httpx, typer, safehttpx, gradio-client, fastapi, gradio\n", " Attempting uninstall: websockets\n", " Found existing installation: websockets 12.0\n", " Uninstalling websockets-12.0:\n", " Successfully uninstalled websockets-12.0\n", " Attempting uninstall: typing-extensions\n", " Found existing installation: typing_extensions 4.9.0\n", " Uninstalling typing_extensions-4.9.0:\n", " Successfully uninstalled typing_extensions-4.9.0\n", "Successfully installed aiofiles-24.1.0 annotated-types-0.7.0 fastapi-0.117.1 ffmpy-0.6.1 filelock-3.19.1 gradio-5.47.0 gradio-client-1.13.2 groovy-0.1.2 h11-0.16.0 hf-xet-1.1.10 httpcore-1.0.9 httpx-0.28.1 huggingface-hub-0.35.1 markdown-it-py-4.0.0 mdurl-0.1.2 orjson-3.11.3 pydantic-2.11.9 pydantic-core-2.33.2 pydub-0.25.1 python-multipart-0.0.20 rich-14.1.0 ruff-0.13.1 safehttpx-0.1.6 semantic-version-2.10.0 shellingham-1.5.4 starlette-0.48.0 tomlkit-0.13.3 typer-0.19.2 typing-extensions-4.15.0 typing-inspection-0.4.1 uvicorn-0.37.0 websockets-15.0.1\n" ] } ], "source": [ "# To install gradio into the notebook environment\n", "!pip install gradio" ] }, { "cell_type": "code", "execution_count": 4, "id": "e15773a1-3e7f-4d09-b777-124247954e35", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "📂 Success: Loaded 0 lighthouses from lighthouses.json.\n", "* Running on local URL: http://127.0.0.1:7861\n", "* Running on public URL: https://f80ff2f7140868d8d0.gradio.live\n", "\n", "This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "