{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"
"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Ww36-N-bgcnA"
},
"source": [
"# Sesame AI - Google Collab CSM notebook\n",
"\n",
"Author: justmalhar\n",
"\n",
"http://x.com/justmalhar\n",
"\n",
"http://github.com/justmalhar\n",
"\n",
"HuggingFace Model - https://huggingface.co/sesame/csm-1b\n",
"\n",
"## Instructions\n",
"\n",
"Run each step below till you see the Gradio UI running\n",
"\n",
"\n",
"## Steps:\n",
"1. Setup Gradio\n",
"2. Clone the repo and install the requirments\n",
"3. Login with HuggingFace account to access the model\n",
"4. Run all steps till you see the Gradio UI"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "T6S72oH6hTd5",
"outputId": "cd15a8fb-2033-49a5-8243-96ca208a7385"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting torch\n",
" Downloading torch-2.6.0-cp312-cp312-win_amd64.whl.metadata (28 kB)\n",
"Collecting torchaudio\n",
" Downloading torchaudio-2.6.0-cp312-cp312-win_amd64.whl.metadata (6.7 kB)\n",
"Collecting transformers\n",
" Downloading transformers-4.50.0-py3-none-any.whl.metadata (39 kB)\n",
"Collecting huggingface_hub\n",
" Using cached huggingface_hub-0.29.3-py3-none-any.whl.metadata (13 kB)\n",
"Collecting gradio\n",
" Downloading gradio-5.22.0-py3-none-any.whl.metadata (16 kB)\n",
"Collecting filelock (from torch)\n",
" Using cached filelock-3.18.0-py3-none-any.whl.metadata (2.9 kB)\n",
"Requirement already satisfied: typing-extensions>=4.10.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (4.10.0)\n",
"Collecting networkx (from torch)\n",
" Using cached networkx-3.4.2-py3-none-any.whl.metadata (6.3 kB)\n",
"Requirement already satisfied: jinja2 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (3.1.3)\n",
"Collecting fsspec (from torch)\n",
" Using cached fsspec-2025.3.0-py3-none-any.whl.metadata (11 kB)\n",
"Requirement already satisfied: setuptools in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (69.2.0)\n",
"Collecting sympy==1.13.1 (from torch)\n",
" Downloading sympy-1.13.1-py3-none-any.whl.metadata (12 kB)\n",
"Collecting mpmath<1.4,>=1.1.0 (from sympy==1.13.1->torch)\n",
" Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)\n",
"Requirement already satisfied: numpy>=1.17 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (1.26.3)\n",
"Requirement already satisfied: packaging>=20.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (23.2)\n",
"Requirement already satisfied: pyyaml>=5.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (6.0.1)\n",
"Requirement already satisfied: regex!=2019.12.17 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (2023.12.25)\n",
"Requirement already satisfied: requests in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (2.31.0)\n",
"Collecting tokenizers<0.22,>=0.21 (from transformers)\n",
" Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl.metadata (6.9 kB)\n",
"Collecting safetensors>=0.4.3 (from transformers)\n",
" Using cached safetensors-0.5.3-cp38-abi3-win_amd64.whl.metadata (3.9 kB)\n",
"Requirement already satisfied: tqdm>=4.27 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (4.66.2)\n",
"Collecting aiofiles<24.0,>=22.0 (from gradio)\n",
" Downloading aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB)\n",
"Requirement already satisfied: anyio<5.0,>=3.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio) (4.2.0)\n",
"Collecting fastapi<1.0,>=0.115.2 (from gradio)\n",
" Downloading fastapi-0.115.11-py3-none-any.whl.metadata (27 kB)\n",
"Collecting ffmpy (from gradio)\n",
" Downloading ffmpy-0.5.0-py3-none-any.whl.metadata (3.0 kB)\n",
"Collecting gradio-client==1.8.0 (from gradio)\n",
" Downloading gradio_client-1.8.0-py3-none-any.whl.metadata (7.1 kB)\n",
"Collecting groovy~=0.1 (from gradio)\n",
" Downloading groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB)\n",
"Requirement already satisfied: httpx>=0.24.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio) (0.27.2)\n",
"Requirement already satisfied: markupsafe<4.0,>=2.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio) (2.1.3)\n",
"Collecting orjson~=3.0 (from gradio)\n",
" Downloading orjson-3.10.15-cp312-cp312-win_amd64.whl.metadata (42 kB)\n",
"Requirement already satisfied: pandas<3.0,>=1.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio) (2.1.4)\n",
"Requirement already satisfied: pillow<12.0,>=8.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio) (10.2.0)\n",
"Collecting pydantic>=2.0 (from gradio)\n",
" Downloading pydantic-2.10.6-py3-none-any.whl.metadata (30 kB)\n",
"Collecting 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",
" Downloading python_multipart-0.0.20-py3-none-any.whl.metadata (1.8 kB)\n",
"Collecting ruff>=0.9.3 (from gradio)\n",
" Downloading ruff-0.11.2-py3-none-win_amd64.whl.metadata (26 kB)\n",
"Collecting safehttpx<0.2.0,>=0.1.6 (from gradio)\n",
" Downloading safehttpx-0.1.6-py3-none-any.whl.metadata (4.2 kB)\n",
"Collecting semantic-version~=2.0 (from gradio)\n",
" Downloading 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.46.1-py3-none-any.whl.metadata (6.2 kB)\n",
"Collecting tomlkit<0.14.0,>=0.12.0 (from gradio)\n",
" Downloading tomlkit-0.13.2-py3-none-any.whl.metadata (2.7 kB)\n",
"Collecting typer<1.0,>=0.12 (from gradio)\n",
" Downloading typer-0.15.2-py3-none-any.whl.metadata (15 kB)\n",
"Collecting uvicorn>=0.14.0 (from gradio)\n",
" Downloading uvicorn-0.34.0-py3-none-any.whl.metadata (6.5 kB)\n",
"Requirement already satisfied: websockets<16.0,>=10.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from gradio-client==1.8.0->gradio) (12.0)\n",
"Requirement already satisfied: idna>=2.8 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from anyio<5.0,>=3.0->gradio) (3.6)\n",
"Requirement already satisfied: sniffio>=1.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
"Requirement already satisfied: certifi in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx>=0.24.1->gradio) (2024.2.2)\n",
"Requirement already satisfied: httpcore==1.* in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpx>=0.24.1->gradio) (1.0.5)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas<3.0,>=1.0->gradio) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)\n",
"Requirement already satisfied: tzdata>=2022.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from pandas<3.0,>=1.0->gradio) (2023.4)\n",
"Collecting annotated-types>=0.6.0 (from pydantic>=2.0->gradio)\n",
" Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)\n",
"Collecting pydantic-core==2.27.2 (from pydantic>=2.0->gradio)\n",
" Downloading pydantic_core-2.27.2-cp312-cp312-win_amd64.whl.metadata (6.7 kB)\n",
"Collecting typing-extensions>=4.10.0 (from torch)\n",
" Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)\n",
"Requirement already satisfied: colorama in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from tqdm>=4.27->transformers) (0.4.6)\n",
"Requirement already satisfied: click>=8.0.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\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",
" Downloading shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)\n",
"Requirement already satisfied: rich>=10.11.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from typer<1.0,>=0.12->gradio) (13.7.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->transformers) (3.3.2)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from requests->transformers) (2.2.1)\n",
"Requirement already satisfied: six>=1.5 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.16.0)\n",
"Requirement already satisfied: markdown-it-py>=2.2.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.17.2)\n",
"Requirement already satisfied: mdurl~=0.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
"Downloading torch-2.6.0-cp312-cp312-win_amd64.whl (204.1 MB)\n",
" ---------------------------------------- 0.0/204.1 MB ? eta -:--:--\n",
" ---------------------------------------- 0.3/204.1 MB ? eta -:--:--\n",
" ---------------------------------------- 0.8/204.1 MB 2.8 MB/s eta 0:01:13\n",
" ---------------------------------------- 1.3/204.1 MB 2.7 MB/s eta 0:01:16\n",
" ---------------------------------------- 2.1/204.1 MB 2.9 MB/s eta 0:01:11\n",
" --------------------------------------- 2.6/204.1 MB 2.8 MB/s eta 0:01:13\n",
" --------------------------------------- 3.4/204.1 MB 2.9 MB/s eta 0:01:09\n",
" --------------------------------------- 4.5/204.1 MB 3.2 MB/s eta 0:01:02\n",
" --------------------------------------- 5.0/204.1 MB 3.3 MB/s eta 0:01:01\n",
" - -------------------------------------- 5.8/204.1 MB 3.3 MB/s eta 0:01:00\n",
" - -------------------------------------- 6.6/204.1 MB 3.3 MB/s eta 0:01:01\n",
" - -------------------------------------- 7.6/204.1 MB 3.4 MB/s eta 0:00:58\n",
" - -------------------------------------- 8.4/204.1 MB 3.5 MB/s eta 0:00:57\n",
" - -------------------------------------- 9.4/204.1 MB 3.6 MB/s eta 0:00:55\n",
" -- ------------------------------------- 10.5/204.1 MB 3.7 MB/s eta 0:00:53\n",
" -- ------------------------------------- 11.5/204.1 MB 3.8 MB/s eta 0:00:51\n",
" -- ------------------------------------- 12.3/204.1 MB 3.9 MB/s eta 0:00:50\n",
" -- ------------------------------------- 13.1/204.1 MB 3.8 MB/s eta 0:00:51\n",
" -- ------------------------------------- 13.9/204.1 MB 3.8 MB/s eta 0:00:51\n",
" -- ------------------------------------- 14.4/204.1 MB 3.8 MB/s eta 0:00:51\n",
" --- ------------------------------------ 15.5/204.1 MB 3.8 MB/s eta 0:00:51\n",
" --- ------------------------------------ 16.3/204.1 MB 3.8 MB/s eta 0:00:50\n",
" --- ------------------------------------ 17.3/204.1 MB 3.8 MB/s eta 0:00:49\n",
" --- ------------------------------------ 18.4/204.1 MB 3.9 MB/s eta 0:00:48\n",
" --- ------------------------------------ 19.1/204.1 MB 3.9 MB/s eta 0:00:48\n",
" --- ------------------------------------ 19.9/204.1 MB 3.9 MB/s eta 0:00:48\n",
" --- ------------------------------------ 20.2/204.1 MB 3.9 MB/s eta 0:00:48\n",
" ---- ----------------------------------- 20.7/204.1 MB 3.8 MB/s eta 0:00:49\n",
" ---- ----------------------------------- 21.5/204.1 MB 3.7 MB/s eta 0:00:49\n",
" ---- ----------------------------------- 22.3/204.1 MB 3.7 MB/s eta 0:00:49\n",
" ---- ----------------------------------- 22.8/204.1 MB 3.7 MB/s eta 0:00:50\n",
" ---- ----------------------------------- 23.6/204.1 MB 3.7 MB/s eta 0:00:50\n",
" ---- ----------------------------------- 24.1/204.1 MB 3.6 MB/s eta 0:00:50\n",
" ---- ----------------------------------- 24.9/204.1 MB 3.7 MB/s eta 0:00:50\n",
" ----- ---------------------------------- 25.7/204.1 MB 3.7 MB/s eta 0:00:49\n",
" ----- ---------------------------------- 26.5/204.1 MB 3.6 MB/s eta 0:00:49\n",
" ----- ---------------------------------- 27.3/204.1 MB 3.6 MB/s eta 0:00:49\n",
" ----- ---------------------------------- 28.3/204.1 MB 3.7 MB/s eta 0:00:48\n",
" ----- ---------------------------------- 29.4/204.1 MB 3.7 MB/s eta 0:00:48\n",
" ----- ---------------------------------- 30.1/204.1 MB 3.7 MB/s eta 0:00:47\n",
" ----- ---------------------------------- 30.4/204.1 MB 3.7 MB/s eta 0:00:47\n",
" ------ --------------------------------- 31.2/204.1 MB 3.7 MB/s eta 0:00:48\n",
" ------ --------------------------------- 31.7/204.1 MB 3.7 MB/s eta 0:00:47\n",
" ------ --------------------------------- 32.5/204.1 MB 3.6 MB/s eta 0:00:48\n",
" ------ --------------------------------- 33.0/204.1 MB 3.6 MB/s eta 0:00:48\n",
" ------ --------------------------------- 33.8/204.1 MB 3.6 MB/s eta 0:00:48\n",
" ------ --------------------------------- 34.6/204.1 MB 3.6 MB/s eta 0:00:47\n",
" ------ --------------------------------- 35.4/204.1 MB 3.6 MB/s eta 0:00:47\n",
" ------- -------------------------------- 36.2/204.1 MB 3.6 MB/s eta 0:00:47\n",
" ------- -------------------------------- 37.2/204.1 MB 3.7 MB/s eta 0:00:46\n",
" ------- -------------------------------- 38.0/204.1 MB 3.7 MB/s eta 0:00:46\n",
" ------- -------------------------------- 38.5/204.1 MB 3.6 MB/s eta 0:00:46\n",
" ------- -------------------------------- 39.3/204.1 MB 3.6 MB/s eta 0:00:46\n",
" ------- -------------------------------- 40.1/204.1 MB 3.6 MB/s eta 0:00:45\n",
" -------- ------------------------------- 40.9/204.1 MB 3.7 MB/s eta 0:00:45\n",
" -------- ------------------------------- 41.7/204.1 MB 3.7 MB/s eta 0:00:45\n",
" -------- ------------------------------- 42.5/204.1 MB 3.6 MB/s eta 0:00:45\n",
" -------- ------------------------------- 43.5/204.1 MB 3.7 MB/s eta 0:00:44\n",
" -------- ------------------------------- 44.6/204.1 MB 3.7 MB/s eta 0:00:44\n",
" -------- ------------------------------- 45.4/204.1 MB 3.7 MB/s eta 0:00:44\n",
" --------- ------------------------------ 46.1/204.1 MB 3.7 MB/s eta 0:00:43\n",
" --------- ------------------------------ 46.9/204.1 MB 3.7 MB/s eta 0:00:43\n",
" --------- ------------------------------ 47.4/204.1 MB 3.7 MB/s eta 0:00:43\n",
" --------- ------------------------------ 48.2/204.1 MB 3.7 MB/s eta 0:00:43\n",
" --------- ------------------------------ 49.0/204.1 MB 3.7 MB/s eta 0:00:43\n",
" --------- ------------------------------ 49.5/204.1 MB 3.6 MB/s eta 0:00:43\n",
" --------- ------------------------------ 50.3/204.1 MB 3.6 MB/s eta 0:00:43\n",
" --------- ------------------------------ 50.9/204.1 MB 3.6 MB/s eta 0:00:43\n",
" ---------- ----------------------------- 51.6/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 52.2/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 53.0/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 53.5/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 54.0/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 54.5/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 55.3/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ---------- ----------------------------- 56.1/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ----------- ---------------------------- 56.9/204.1 MB 3.6 MB/s eta 0:00:42\n",
" ----------- ---------------------------- 57.7/204.1 MB 3.6 MB/s eta 0:00:41\n",
" ----------- ---------------------------- 58.5/204.1 MB 3.6 MB/s eta 0:00:41\n",
" ----------- ---------------------------- 59.2/204.1 MB 3.6 MB/s eta 0:00:41\n",
" ----------- ---------------------------- 60.0/204.1 MB 3.6 MB/s eta 0:00:41\n",
" ----------- ---------------------------- 60.8/204.1 MB 3.6 MB/s eta 0:00:40\n",
" ------------ --------------------------- 61.6/204.1 MB 3.6 MB/s eta 0:00:40\n",
" ------------ --------------------------- 62.4/204.1 MB 3.6 MB/s eta 0:00:40\n",
" ------------ --------------------------- 63.2/204.1 MB 3.6 MB/s eta 0:00:40\n",
" ------------ --------------------------- 64.0/204.1 MB 3.6 MB/s eta 0:00:40\n",
" ------------ --------------------------- 64.7/204.1 MB 3.6 MB/s eta 0:00:39\n",
" ------------ --------------------------- 65.3/204.1 MB 3.6 MB/s eta 0:00:39\n",
" ------------ --------------------------- 66.1/204.1 MB 3.6 MB/s eta 0:00:39\n",
" ------------- -------------------------- 66.6/204.1 MB 3.6 MB/s eta 0:00:39\n",
" ------------- -------------------------- 67.6/204.1 MB 3.6 MB/s eta 0:00:39\n",
" ------------- -------------------------- 68.7/204.1 MB 3.6 MB/s eta 0:00:38\n",
" ------------- -------------------------- 69.7/204.1 MB 3.6 MB/s eta 0:00:38\n",
" ------------- -------------------------- 70.8/204.1 MB 3.6 MB/s eta 0:00:37\n",
" -------------- ------------------------- 71.6/204.1 MB 3.6 MB/s eta 0:00:37\n",
" -------------- ------------------------- 72.4/204.1 MB 3.6 MB/s eta 0:00:37\n",
" -------------- ------------------------- 73.1/204.1 MB 3.6 MB/s eta 0:00:37\n",
" -------------- ------------------------- 73.9/204.1 MB 3.6 MB/s eta 0:00:36\n",
" -------------- ------------------------- 74.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
" -------------- ------------------------- 74.7/204.1 MB 3.6 MB/s eta 0:00:36\n",
" -------------- ------------------------- 75.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
" -------------- ------------------------- 76.0/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 76.5/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 77.3/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 77.9/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 78.6/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 79.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 79.7/204.1 MB 3.6 MB/s eta 0:00:36\n",
" --------------- ------------------------ 80.2/204.1 MB 3.6 MB/s eta 0:00:35\n",
" --------------- ------------------------ 81.0/204.1 MB 3.6 MB/s eta 0:00:35\n",
" ---------------- ----------------------- 81.8/204.1 MB 3.6 MB/s eta 0:00:35\n",
" ---------------- ----------------------- 82.6/204.1 MB 3.6 MB/s eta 0:00:35\n",
" ---------------- ----------------------- 83.4/204.1 MB 3.6 MB/s eta 0:00:34\n",
" ---------------- ----------------------- 84.1/204.1 MB 3.6 MB/s eta 0:00:34\n",
" ---------------- ----------------------- 84.9/204.1 MB 3.6 MB/s eta 0:00:34\n",
" ---------------- ----------------------- 86.0/204.1 MB 3.6 MB/s eta 0:00:34\n",
" ----------------- ---------------------- 86.8/204.1 MB 3.6 MB/s eta 0:00:33\n",
" ----------------- ---------------------- 88.1/204.1 MB 3.6 MB/s eta 0:00:33\n",
" ----------------- ---------------------- 88.9/204.1 MB 3.6 MB/s eta 0:00:33\n",
" ----------------- ---------------------- 89.7/204.1 MB 3.6 MB/s eta 0:00:32\n",
" ----------------- ---------------------- 90.2/204.1 MB 3.6 MB/s eta 0:00:32\n",
" ----------------- ---------------------- 90.7/204.1 MB 3.6 MB/s eta 0:00:32\n",
" ----------------- ---------------------- 91.8/204.1 MB 3.6 MB/s eta 0:00:32\n",
" ------------------ --------------------- 92.5/204.1 MB 3.6 MB/s eta 0:00:32\n",
" ------------------ --------------------- 93.8/204.1 MB 3.6 MB/s eta 0:00:31\n",
" ------------------ --------------------- 94.4/204.1 MB 3.6 MB/s eta 0:00:31\n",
" ------------------ --------------------- 95.2/204.1 MB 3.6 MB/s eta 0:00:31\n",
" ------------------ --------------------- 96.2/204.1 MB 3.6 MB/s eta 0:00:30\n",
" ------------------- -------------------- 97.0/204.1 MB 3.6 MB/s eta 0:00:30\n",
" ------------------- -------------------- 97.8/204.1 MB 3.6 MB/s eta 0:00:30\n",
" ------------------- -------------------- 98.8/204.1 MB 3.6 MB/s eta 0:00:30\n",
" ------------------- -------------------- 99.9/204.1 MB 3.6 MB/s eta 0:00:29\n",
" ------------------- -------------------- 100.4/204.1 MB 3.6 MB/s eta 0:00:29\n",
" ------------------- -------------------- 100.9/204.1 MB 3.6 MB/s eta 0:00:29\n",
" ------------------- -------------------- 101.4/204.1 MB 3.6 MB/s eta 0:00:29\n",
" -------------------- ------------------- 102.2/204.1 MB 3.6 MB/s eta 0:00:29\n",
" -------------------- ------------------- 103.0/204.1 MB 3.6 MB/s eta 0:00:29\n",
" -------------------- ------------------- 103.8/204.1 MB 3.6 MB/s eta 0:00:28\n",
" -------------------- ------------------- 104.3/204.1 MB 3.6 MB/s eta 0:00:28\n",
" -------------------- ------------------- 105.4/204.1 MB 3.6 MB/s eta 0:00:28\n",
" -------------------- ------------------- 106.4/204.1 MB 3.6 MB/s eta 0:00:28\n",
" --------------------- ------------------ 107.2/204.1 MB 3.6 MB/s eta 0:00:27\n",
" --------------------- ------------------ 107.7/204.1 MB 3.6 MB/s eta 0:00:27\n",
" --------------------- ------------------ 108.5/204.1 MB 3.6 MB/s eta 0:00:27\n",
" --------------------- ------------------ 109.1/204.1 MB 3.6 MB/s eta 0:00:27\n",
" --------------------- ------------------ 110.1/204.1 MB 3.6 MB/s eta 0:00:26\n",
" --------------------- ------------------ 111.1/204.1 MB 3.6 MB/s eta 0:00:26\n",
" --------------------- ------------------ 111.9/204.1 MB 3.6 MB/s eta 0:00:26\n",
" ---------------------- ----------------- 113.0/204.1 MB 3.7 MB/s eta 0:00:25\n",
" ---------------------- ----------------- 113.8/204.1 MB 3.6 MB/s eta 0:00:25\n",
" ---------------------- ----------------- 114.6/204.1 MB 3.6 MB/s eta 0:00:25\n",
" ---------------------- ----------------- 115.3/204.1 MB 3.7 MB/s eta 0:00:25\n",
" ---------------------- ----------------- 116.1/204.1 MB 3.7 MB/s eta 0:00:25\n",
" ---------------------- ----------------- 116.9/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 117.7/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 118.2/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 118.8/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 119.3/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 119.5/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 120.1/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 120.6/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 120.6/204.1 MB 3.6 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 120.8/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 121.1/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 121.6/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ----------------------- ---------------- 122.2/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ------------------------ --------------- 122.9/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ------------------------ --------------- 123.7/204.1 MB 3.5 MB/s eta 0:00:24\n",
" ------------------------ --------------- 124.5/204.1 MB 3.5 MB/s eta 0:00:23\n",
" ------------------------ --------------- 125.3/204.1 MB 3.5 MB/s eta 0:00:23\n",
" ------------------------ --------------- 125.8/204.1 MB 3.5 MB/s eta 0:00:23\n",
" ------------------------ --------------- 126.6/204.1 MB 3.5 MB/s eta 0:00:23\n",
" ------------------------ --------------- 127.4/204.1 MB 3.5 MB/s eta 0:00:23\n",
" ------------------------- -------------- 128.2/204.1 MB 3.5 MB/s eta 0:00:22\n",
" ------------------------- -------------- 129.0/204.1 MB 3.5 MB/s eta 0:00:22\n",
" ------------------------- -------------- 129.5/204.1 MB 3.5 MB/s eta 0:00:22\n",
" ------------------------- -------------- 130.0/204.1 MB 3.5 MB/s eta 0:00:22\n",
" ------------------------- -------------- 130.8/204.1 MB 3.5 MB/s eta 0:00:22\n",
" ------------------------- -------------- 131.6/204.1 MB 3.5 MB/s eta 0:00:21\n",
" ------------------------- -------------- 132.6/204.1 MB 3.5 MB/s eta 0:00:21\n",
" -------------------------- ------------- 133.4/204.1 MB 3.5 MB/s eta 0:00:21\n",
" -------------------------- ------------- 134.5/204.1 MB 3.5 MB/s eta 0:00:21\n",
" -------------------------- ------------- 135.3/204.1 MB 3.5 MB/s eta 0:00:20\n",
" -------------------------- ------------- 136.3/204.1 MB 3.5 MB/s eta 0:00:20\n",
" -------------------------- ------------- 137.1/204.1 MB 3.5 MB/s eta 0:00:20\n",
" --------------------------- ------------ 137.9/204.1 MB 3.5 MB/s eta 0:00:19\n",
" --------------------------- ------------ 138.7/204.1 MB 3.5 MB/s eta 0:00:19\n",
" --------------------------- ------------ 139.7/204.1 MB 3.5 MB/s eta 0:00:19\n",
" --------------------------- ------------ 140.5/204.1 MB 3.5 MB/s eta 0:00:19\n",
" --------------------------- ------------ 141.3/204.1 MB 3.5 MB/s eta 0:00:18\n",
" --------------------------- ------------ 142.1/204.1 MB 3.5 MB/s eta 0:00:18\n",
" --------------------------- ------------ 142.9/204.1 MB 3.5 MB/s eta 0:00:18\n",
" ---------------------------- ----------- 143.1/204.1 MB 3.5 MB/s eta 0:00:18\n",
" ---------------------------- ----------- 144.2/204.1 MB 3.5 MB/s eta 0:00:18\n",
" ---------------------------- ----------- 144.7/204.1 MB 3.5 MB/s eta 0:00:17\n",
" ---------------------------- ----------- 145.8/204.1 MB 3.5 MB/s eta 0:00:17\n",
" ---------------------------- ----------- 146.8/204.1 MB 3.5 MB/s eta 0:00:17\n",
" ---------------------------- ----------- 147.6/204.1 MB 3.5 MB/s eta 0:00:17\n",
" ----------------------------- ---------- 148.6/204.1 MB 3.5 MB/s eta 0:00:16\n",
" ----------------------------- ---------- 149.7/204.1 MB 3.5 MB/s eta 0:00:16\n",
" ----------------------------- ---------- 150.5/204.1 MB 3.5 MB/s eta 0:00:16\n",
" ----------------------------- ---------- 151.5/204.1 MB 3.5 MB/s eta 0:00:15\n",
" ----------------------------- ---------- 152.3/204.1 MB 3.5 MB/s eta 0:00:15\n",
" ------------------------------ --------- 153.4/204.1 MB 3.5 MB/s eta 0:00:15\n",
" ------------------------------ --------- 154.4/204.1 MB 3.6 MB/s eta 0:00:14\n",
" ------------------------------ --------- 155.2/204.1 MB 3.6 MB/s eta 0:00:14\n",
" ------------------------------ --------- 156.0/204.1 MB 3.6 MB/s eta 0:00:14\n",
" ------------------------------ --------- 157.0/204.1 MB 3.6 MB/s eta 0:00:14\n",
" ------------------------------ --------- 157.8/204.1 MB 3.6 MB/s eta 0:00:13\n",
" ------------------------------- -------- 158.9/204.1 MB 3.6 MB/s eta 0:00:13\n",
" ------------------------------- -------- 159.6/204.1 MB 3.6 MB/s eta 0:00:13\n",
" ------------------------------- -------- 160.7/204.1 MB 3.6 MB/s eta 0:00:13\n",
" ------------------------------- -------- 161.7/204.1 MB 3.6 MB/s eta 0:00:12\n",
" ------------------------------- -------- 162.5/204.1 MB 3.6 MB/s eta 0:00:12\n",
" -------------------------------- ------- 163.3/204.1 MB 3.6 MB/s eta 0:00:12\n",
" -------------------------------- ------- 164.4/204.1 MB 3.7 MB/s eta 0:00:11\n",
" -------------------------------- ------- 165.4/204.1 MB 3.7 MB/s eta 0:00:11\n",
" -------------------------------- ------- 166.2/204.1 MB 3.7 MB/s eta 0:00:11\n",
" -------------------------------- ------- 167.0/204.1 MB 3.7 MB/s eta 0:00:11\n",
" -------------------------------- ------- 167.8/204.1 MB 3.7 MB/s eta 0:00:10\n",
" --------------------------------- ------ 168.6/204.1 MB 3.7 MB/s eta 0:00:10\n",
" --------------------------------- ------ 169.3/204.1 MB 3.7 MB/s eta 0:00:10\n",
" --------------------------------- ------ 170.1/204.1 MB 3.7 MB/s eta 0:00:10\n",
" --------------------------------- ------ 170.9/204.1 MB 3.7 MB/s eta 0:00:10\n",
" --------------------------------- ------ 171.4/204.1 MB 3.7 MB/s eta 0:00:09\n",
" --------------------------------- ------ 172.2/204.1 MB 3.7 MB/s eta 0:00:09\n",
" --------------------------------- ------ 172.8/204.1 MB 3.6 MB/s eta 0:00:09\n",
" --------------------------------- ------ 173.3/204.1 MB 3.6 MB/s eta 0:00:09\n",
" ---------------------------------- ----- 174.1/204.1 MB 3.6 MB/s eta 0:00:09\n",
" ---------------------------------- ----- 174.3/204.1 MB 3.6 MB/s eta 0:00:09\n",
" ---------------------------------- ----- 174.9/204.1 MB 3.6 MB/s eta 0:00:09\n",
" ---------------------------------- ----- 175.6/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ---------------------------------- ----- 175.9/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ---------------------------------- ----- 176.7/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ---------------------------------- ----- 177.2/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ---------------------------------- ----- 178.3/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ----------------------------------- ---- 178.8/204.1 MB 3.6 MB/s eta 0:00:08\n",
" ----------------------------------- ---- 179.6/204.1 MB 3.6 MB/s eta 0:00:07\n",
" ----------------------------------- ---- 180.4/204.1 MB 3.6 MB/s eta 0:00:07\n",
" ----------------------------------- ---- 181.1/204.1 MB 3.6 MB/s eta 0:00:07\n",
" ----------------------------------- ---- 181.9/204.1 MB 3.6 MB/s eta 0:00:07\n",
" ----------------------------------- ---- 182.7/204.1 MB 3.6 MB/s eta 0:00:06\n",
" ----------------------------------- ---- 183.5/204.1 MB 3.6 MB/s eta 0:00:06\n",
" ------------------------------------ --- 184.3/204.1 MB 3.6 MB/s eta 0:00:06\n",
" ------------------------------------ --- 184.8/204.1 MB 3.6 MB/s eta 0:00:06\n",
" ------------------------------------ --- 185.9/204.1 MB 3.6 MB/s eta 0:00:06\n",
" ------------------------------------ --- 186.6/204.1 MB 3.6 MB/s eta 0:00:05\n",
" ------------------------------------ --- 187.4/204.1 MB 3.6 MB/s eta 0:00:05\n",
" ------------------------------------ --- 188.2/204.1 MB 3.6 MB/s eta 0:00:05\n",
" ------------------------------------ --- 188.7/204.1 MB 3.6 MB/s eta 0:00:05\n",
" ------------------------------------- -- 189.5/204.1 MB 3.6 MB/s eta 0:00:05\n",
" ------------------------------------- -- 190.3/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 191.1/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 191.6/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 192.2/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 192.4/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 192.9/204.1 MB 3.6 MB/s eta 0:00:04\n",
" ------------------------------------- -- 193.7/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 194.2/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 195.0/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 195.6/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 196.1/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 196.6/204.1 MB 3.6 MB/s eta 0:00:03\n",
" -------------------------------------- - 197.4/204.1 MB 3.6 MB/s eta 0:00:02\n",
" -------------------------------------- - 198.2/204.1 MB 3.5 MB/s eta 0:00:02\n",
" -------------------------------------- - 199.0/204.1 MB 3.5 MB/s eta 0:00:02\n",
" --------------------------------------- 199.8/204.1 MB 3.5 MB/s eta 0:00:02\n",
" --------------------------------------- 200.8/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 201.6/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 202.4/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 203.2/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
" --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
" ---------------------------------------- 204.1/204.1 MB 3.5 MB/s eta 0:00:00\n",
"Downloading sympy-1.13.1-py3-none-any.whl (6.2 MB)\n",
" ---------------------------------------- 0.0/6.2 MB ? eta -:--:--\n",
" ------ --------------------------------- 1.0/6.2 MB 5.6 MB/s eta 0:00:01\n",
" ------------- -------------------------- 2.1/6.2 MB 5.1 MB/s eta 0:00:01\n",
" -------------------- ------------------- 3.1/6.2 MB 4.9 MB/s eta 0:00:01\n",
" ----------------------- ---------------- 3.7/6.2 MB 4.5 MB/s eta 0:00:01\n",
" ------------------------------ --------- 4.7/6.2 MB 4.5 MB/s eta 0:00:01\n",
" ----------------------------------- ---- 5.5/6.2 MB 4.5 MB/s eta 0:00:01\n",
" -------------------------------------- - 6.0/6.2 MB 4.1 MB/s eta 0:00:01\n",
" ---------------------------------------- 6.2/6.2 MB 4.0 MB/s eta 0:00:00\n",
"Downloading torchaudio-2.6.0-cp312-cp312-win_amd64.whl (2.4 MB)\n",
" ---------------------------------------- 0.0/2.4 MB ? eta -:--:--\n",
" ------------ --------------------------- 0.8/2.4 MB 4.2 MB/s eta 0:00:01\n",
" ----------------------------- ---------- 1.8/2.4 MB 4.6 MB/s eta 0:00:01\n",
" ---------------------------------------- 2.4/2.4 MB 4.5 MB/s eta 0:00:00\n",
"Downloading transformers-4.50.0-py3-none-any.whl (10.2 MB)\n",
" ---------------------------------------- 0.0/10.2 MB ? eta -:--:--\n",
" --- ------------------------------------ 0.8/10.2 MB 4.2 MB/s eta 0:00:03\n",
" ------- -------------------------------- 1.8/10.2 MB 4.4 MB/s eta 0:00:02\n",
" --------- ------------------------------ 2.4/10.2 MB 4.1 MB/s eta 0:00:02\n",
" ------------ --------------------------- 3.1/10.2 MB 3.7 MB/s eta 0:00:02\n",
" --------------- ------------------------ 3.9/10.2 MB 3.7 MB/s eta 0:00:02\n",
" ------------------ --------------------- 4.7/10.2 MB 3.8 MB/s eta 0:00:02\n",
" ---------------------- ----------------- 5.8/10.2 MB 3.9 MB/s eta 0:00:02\n",
" -------------------------- ------------- 6.8/10.2 MB 4.0 MB/s eta 0:00:01\n",
" ---------------------------- ----------- 7.3/10.2 MB 4.0 MB/s eta 0:00:01\n",
" ------------------------------ --------- 7.9/10.2 MB 3.7 MB/s eta 0:00:01\n",
" --------------------------------- ------ 8.7/10.2 MB 3.8 MB/s eta 0:00:01\n",
" -------------------------------------- - 9.7/10.2 MB 3.8 MB/s eta 0:00:01\n",
" ---------------------------------------- 10.2/10.2 MB 3.8 MB/s eta 0:00:00\n",
"Using cached huggingface_hub-0.29.3-py3-none-any.whl (468 kB)\n",
"Downloading gradio-5.22.0-py3-none-any.whl (46.2 MB)\n",
" ---------------------------------------- 0.0/46.2 MB ? eta -:--:--\n",
" --------------------------------------- 0.8/46.2 MB 4.2 MB/s eta 0:00:11\n",
" - -------------------------------------- 1.6/46.2 MB 4.4 MB/s eta 0:00:11\n",
" -- ------------------------------------- 2.4/46.2 MB 4.3 MB/s eta 0:00:11\n",
" -- ------------------------------------- 3.4/46.2 MB 4.2 MB/s eta 0:00:11\n",
" --- ------------------------------------ 3.9/46.2 MB 4.1 MB/s eta 0:00:11\n",
" ---- ----------------------------------- 4.7/46.2 MB 3.9 MB/s eta 0:00:11\n",
" ---- ----------------------------------- 5.5/46.2 MB 3.9 MB/s eta 0:00:11\n",
" ----- ---------------------------------- 6.6/46.2 MB 4.0 MB/s eta 0:00:10\n",
" ------ --------------------------------- 7.6/46.2 MB 4.2 MB/s eta 0:00:10\n",
" ------- -------------------------------- 8.7/46.2 MB 4.2 MB/s eta 0:00:09\n",
" -------- ------------------------------- 9.7/46.2 MB 4.3 MB/s eta 0:00:09\n",
" --------- ------------------------------ 10.7/46.2 MB 4.3 MB/s eta 0:00:09\n",
" --------- ------------------------------ 11.5/46.2 MB 4.3 MB/s eta 0:00:08\n",
" ---------- ----------------------------- 12.6/46.2 MB 4.3 MB/s eta 0:00:08\n",
" ----------- ---------------------------- 13.4/46.2 MB 4.3 MB/s eta 0:00:08\n",
" ------------ --------------------------- 14.7/46.2 MB 4.4 MB/s eta 0:00:08\n",
" ------------- -------------------------- 15.7/46.2 MB 4.4 MB/s eta 0:00:07\n",
" -------------- ------------------------- 16.8/46.2 MB 4.4 MB/s eta 0:00:07\n",
" --------------- ------------------------ 17.6/46.2 MB 4.4 MB/s eta 0:00:07\n",
" --------------- ------------------------ 18.4/46.2 MB 4.4 MB/s eta 0:00:07\n",
" ---------------- ----------------------- 19.4/46.2 MB 4.4 MB/s eta 0:00:07\n",
" ----------------- ---------------------- 20.2/46.2 MB 4.4 MB/s eta 0:00:06\n",
" ------------------ --------------------- 21.2/46.2 MB 4.4 MB/s eta 0:00:06\n",
" ------------------- -------------------- 22.3/46.2 MB 4.4 MB/s eta 0:00:06\n",
" ------------------- -------------------- 23.1/46.2 MB 4.4 MB/s eta 0:00:06\n",
" -------------------- ------------------- 24.1/46.2 MB 4.4 MB/s eta 0:00:06\n",
" --------------------- ------------------ 24.9/46.2 MB 4.4 MB/s eta 0:00:05\n",
" ---------------------- ----------------- 25.7/46.2 MB 4.4 MB/s eta 0:00:05\n",
" ----------------------- ---------------- 26.7/46.2 MB 4.4 MB/s eta 0:00:05\n",
" ----------------------- ---------------- 27.5/46.2 MB 4.4 MB/s eta 0:00:05\n",
" ------------------------ --------------- 28.8/46.2 MB 4.4 MB/s eta 0:00:04\n",
" ------------------------- -------------- 29.9/46.2 MB 4.5 MB/s eta 0:00:04\n",
" -------------------------- ------------- 30.9/46.2 MB 4.5 MB/s eta 0:00:04\n",
" --------------------------- ------------ 32.2/46.2 MB 4.5 MB/s eta 0:00:04\n",
" ---------------------------- ----------- 33.3/46.2 MB 4.5 MB/s eta 0:00:03\n",
" ----------------------------- ---------- 34.1/46.2 MB 4.5 MB/s eta 0:00:03\n",
" ------------------------------ --------- 35.1/46.2 MB 4.5 MB/s eta 0:00:03\n",
" ------------------------------- -------- 35.9/46.2 MB 4.5 MB/s eta 0:00:03\n",
" -------------------------------- ------- 37.0/46.2 MB 4.5 MB/s eta 0:00:03\n",
" -------------------------------- ------- 37.7/46.2 MB 4.5 MB/s eta 0:00:02\n",
" --------------------------------- ------ 38.8/46.2 MB 4.5 MB/s eta 0:00:02\n",
" ---------------------------------- ----- 39.3/46.2 MB 4.5 MB/s eta 0:00:02\n",
" ---------------------------------- ----- 40.1/46.2 MB 4.5 MB/s eta 0:00:02\n",
" ----------------------------------- ---- 40.9/46.2 MB 4.4 MB/s eta 0:00:02\n",
" ------------------------------------ --- 41.9/46.2 MB 4.4 MB/s eta 0:00:01\n",
" ------------------------------------- -- 42.7/46.2 MB 4.4 MB/s eta 0:00:01\n",
" ------------------------------------- -- 43.8/46.2 MB 4.4 MB/s eta 0:00:01\n",
" -------------------------------------- - 44.8/46.2 MB 4.4 MB/s eta 0:00:01\n",
" --------------------------------------- 45.6/46.2 MB 4.4 MB/s eta 0:00:01\n",
" --------------------------------------- 46.1/46.2 MB 4.4 MB/s eta 0:00:01\n",
" ---------------------------------------- 46.2/46.2 MB 4.4 MB/s eta 0:00:00\n",
"Downloading gradio_client-1.8.0-py3-none-any.whl (322 kB)\n",
"Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
"Downloading fastapi-0.115.11-py3-none-any.whl (94 kB)\n",
"Downloading fsspec-2025.3.0-py3-none-any.whl (193 kB)\n",
"Downloading groovy-0.1.2-py3-none-any.whl (14 kB)\n",
"Downloading orjson-3.10.15-cp312-cp312-win_amd64.whl (133 kB)\n",
"Downloading pydantic-2.10.6-py3-none-any.whl (431 kB)\n",
"Downloading pydantic_core-2.27.2-cp312-cp312-win_amd64.whl (2.0 MB)\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" --------------------- ------------------ 1.0/2.0 MB 6.3 MB/s eta 0:00:01\n",
" ---------------------------------------- 2.0/2.0 MB 4.6 MB/s eta 0:00:00\n",
"Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)\n",
"Downloading ruff-0.11.2-py3-none-win_amd64.whl (11.4 MB)\n",
" ---------------------------------------- 0.0/11.4 MB ? eta -:--:--\n",
" --- ------------------------------------ 1.0/11.4 MB 5.6 MB/s eta 0:00:02\n",
" ------ --------------------------------- 1.8/11.4 MB 4.8 MB/s eta 0:00:02\n",
" ---------- ----------------------------- 2.9/11.4 MB 4.5 MB/s eta 0:00:02\n",
" ------------- -------------------------- 3.9/11.4 MB 4.6 MB/s eta 0:00:02\n",
" ----------------- ---------------------- 5.0/11.4 MB 4.7 MB/s eta 0:00:02\n",
" --------------------- ------------------ 6.0/11.4 MB 4.8 MB/s eta 0:00:02\n",
" ----------------------- ---------------- 6.8/11.4 MB 4.7 MB/s eta 0:00:01\n",
" --------------------------- ------------ 7.9/11.4 MB 4.7 MB/s eta 0:00:01\n",
" ------------------------------ --------- 8.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
" ---------------------------------- ----- 9.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
" ------------------------------------- -- 10.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
" ---------------------------------------- 11.4/11.4 MB 4.6 MB/s eta 0:00:00\n",
"Downloading safehttpx-0.1.6-py3-none-any.whl (8.7 kB)\n",
"Using cached safetensors-0.5.3-cp38-abi3-win_amd64.whl (308 kB)\n",
"Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
"Downloading starlette-0.46.1-py3-none-any.whl (71 kB)\n",
"Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl (2.4 MB)\n",
" ---------------------------------------- 0.0/2.4 MB ? eta -:--:--\n",
" -------- ------------------------------- 0.5/2.4 MB 3.4 MB/s eta 0:00:01\n",
" --------------------- ------------------ 1.3/2.4 MB 3.5 MB/s eta 0:00:01\n",
" ---------------------------------- ----- 2.1/2.4 MB 3.4 MB/s eta 0:00:01\n",
" ---------------------------------------- 2.4/2.4 MB 3.3 MB/s eta 0:00:00\n",
"Downloading tomlkit-0.13.2-py3-none-any.whl (37 kB)\n",
"Downloading typer-0.15.2-py3-none-any.whl (45 kB)\n",
"Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)\n",
"Downloading uvicorn-0.34.0-py3-none-any.whl (62 kB)\n",
"Downloading ffmpy-0.5.0-py3-none-any.whl (6.0 kB)\n",
"Using cached filelock-3.18.0-py3-none-any.whl (16 kB)\n",
"Using cached networkx-3.4.2-py3-none-any.whl (1.7 MB)\n",
"Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
"Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)\n",
"Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)\n",
"Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n",
"Installing collected packages: pydub, mpmath, typing-extensions, tomlkit, sympy, shellingham, semantic-version, safetensors, ruff, python-multipart, orjson, networkx, groovy, fsspec, filelock, ffmpy, annotated-types, aiofiles, uvicorn, torch, starlette, pydantic-core, huggingface_hub, typer, torchaudio, tokenizers, safehttpx, pydantic, gradio-client, transformers, fastapi, gradio\n",
" Attempting uninstall: typing-extensions\n",
" Found existing installation: typing_extensions 4.10.0\n",
" Uninstalling typing_extensions-4.10.0:\n",
" Successfully uninstalled typing_extensions-4.10.0\n",
"Successfully installed aiofiles-23.2.1 annotated-types-0.7.0 fastapi-0.115.11 ffmpy-0.5.0 filelock-3.18.0 fsspec-2025.3.0 gradio-5.22.0 gradio-client-1.8.0 groovy-0.1.2 huggingface_hub-0.29.3 mpmath-1.3.0 networkx-3.4.2 orjson-3.10.15 pydantic-2.10.6 pydantic-core-2.27.2 pydub-0.25.1 python-multipart-0.0.20 ruff-0.11.2 safehttpx-0.1.6 safetensors-0.5.3 semantic-version-2.10.0 shellingham-1.5.4 starlette-0.46.1 sympy-1.13.1 tokenizers-0.21.1 tomlkit-0.13.2 torch-2.6.0 torchaudio-2.6.0 transformers-4.50.0 typer-0.15.2 typing-extensions-4.12.2 uvicorn-0.34.0\n"
]
}
],
"source": [
"# Reinstall required dependencies\n",
"!pip install torch torchaudio transformers huggingface_hub gradio"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ssphqLJugbrI"
},
"source": []
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "ObK_fhW7iCAn",
"outputId": "a483389f-82f3-4d07-e1b5-6cc4c73bae21"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"c:\\Users\\PALLAVI\\csm-google-collab\\csm-google-collab\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Cloning into 'csm-google-collab'...\n",
"c:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\IPython\\core\\magics\\osm.py:417: UserWarning: using dhist requires you to install the `pickleshare` library.\n",
" self.shell.db['dhist'] = compress_dhist(dhist)[-100:]\n"
]
}
],
"source": [
"# Clone the Sesame CSM repository\n",
"!git clone https://github.com/Justmalhar/csm-google-collab.git\n",
"%cd csm-google-collab"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "cr1XnB10Zf4z",
"outputId": "d5d175fe-6c10-4b6d-9ffb-d40b29adcd04"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/content/csm/requirements.txt'\n"
]
}
],
"source": [
"# Install dependencies from requirements.txt\n",
"!pip install -r /content/csm/requirements.txt"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"id": "YV8hf1Y7iEl0"
},
"outputs": [],
"source": [
"#Add the repository to Python's path\n",
"import sys\n",
"sys.path.append(\"/content/csm\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true,
"id": "8AvFx6f4iMSW"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"c:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\huggingface_hub\\utils\\_deprecation.py:38: FutureWarning: Deprecated positional argument(s) used in 'notebook_login': pass new_session='' as keyword args. From version 1.0 passing these as positional arguments will result in an error,\n",
" warnings.warn(\n"
]
}
],
"source": [
"# Authenticate with Hugging Face\n",
"from huggingface_hub import notebook_login\n",
"notebook_login(\"\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 356
},
"collapsed": true,
"id": "3CsTqgqZiUls",
"outputId": "8966902a-5d4d-4ba4-f8f7-12e6830cf676"
},
"outputs": [
{
"ename": "OSError",
"evalue": "sesame/csm-1b does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack.",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[8], line 9\u001b[0m\n\u001b[0;32m 6\u001b[0m config \u001b[38;5;241m=\u001b[39m AutoConfig\u001b[38;5;241m.\u001b[39mfrom_pretrained(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msesame/csm-1b\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 8\u001b[0m \u001b[38;5;66;03m# Load the model with the configuration\u001b[39;00m\n\u001b[1;32m----> 9\u001b[0m model \u001b[38;5;241m=\u001b[39m \u001b[43mAutoModel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfrom_pretrained\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43msesame/csm-1b\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 10\u001b[0m model\u001b[38;5;241m.\u001b[39mto(device\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcuda\u001b[39m\u001b[38;5;124m\"\u001b[39m, dtype\u001b[38;5;241m=\u001b[39mtorch\u001b[38;5;241m.\u001b[39mbfloat16)\n\u001b[0;32m 11\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mModel loaded successfully! đ\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
"File \u001b[1;32mc:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\models\\auto\\auto_factory.py:573\u001b[0m, in \u001b[0;36m_BaseAutoModelClass.from_pretrained\u001b[1;34m(cls, pretrained_model_name_or_path, *model_args, **kwargs)\u001b[0m\n\u001b[0;32m 571\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(config) \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_model_mapping\u001b[38;5;241m.\u001b[39mkeys():\n\u001b[0;32m 572\u001b[0m model_class \u001b[38;5;241m=\u001b[39m _get_model_class(config, \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_model_mapping)\n\u001b[1;32m--> 573\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmodel_class\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfrom_pretrained\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 574\u001b[0m \u001b[43m \u001b[49m\u001b[43mpretrained_model_name_or_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mmodel_args\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mhub_kwargs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\n\u001b[0;32m 575\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 576\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[0;32m 577\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUnrecognized configuration class \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mconfig\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__class__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m for this kind of AutoModel: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 578\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mModel type should be one of \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(c\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mfor\u001b[39;00m\u001b[38;5;250m \u001b[39mc\u001b[38;5;250m \u001b[39m\u001b[38;5;129;01min\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_model_mapping\u001b[38;5;241m.\u001b[39mkeys())\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 579\u001b[0m )\n",
"File \u001b[1;32mc:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\modeling_utils.py:272\u001b[0m, in \u001b[0;36mrestore_default_torch_dtype.._wrapper\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m 270\u001b[0m old_dtype \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mget_default_dtype()\n\u001b[0;32m 271\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 272\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 273\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m 274\u001b[0m torch\u001b[38;5;241m.\u001b[39mset_default_dtype(old_dtype)\n",
"File \u001b[1;32mc:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\modeling_utils.py:4317\u001b[0m, in \u001b[0;36mPreTrainedModel.from_pretrained\u001b[1;34m(cls, pretrained_model_name_or_path, config, cache_dir, ignore_mismatched_sizes, force_download, local_files_only, token, revision, use_safetensors, weights_only, *model_args, **kwargs)\u001b[0m\n\u001b[0;32m 4312\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m gguf_file \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m hf_quantizer \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 4313\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[0;32m 4314\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mYou cannot combine Quantization and loading a model from a GGUF file, try again by making sure you did not passed a `quantization_config` or that you did not load a quantized model from the Hub.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 4315\u001b[0m )\n\u001b[1;32m-> 4317\u001b[0m checkpoint_files, sharded_metadata \u001b[38;5;241m=\u001b[39m \u001b[43m_get_resolved_checkpoint_files\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 4318\u001b[0m \u001b[43m \u001b[49m\u001b[43mpretrained_model_name_or_path\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpretrained_model_name_or_path\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4319\u001b[0m \u001b[43m \u001b[49m\u001b[43msubfolder\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msubfolder\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4320\u001b[0m \u001b[43m \u001b[49m\u001b[43mvariant\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mvariant\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4321\u001b[0m \u001b[43m \u001b[49m\u001b[43mgguf_file\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mgguf_file\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4322\u001b[0m \u001b[43m \u001b[49m\u001b[43mfrom_tf\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfrom_tf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4323\u001b[0m \u001b[43m \u001b[49m\u001b[43mfrom_flax\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfrom_flax\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4324\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_safetensors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_safetensors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4325\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache_dir\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4326\u001b[0m \u001b[43m \u001b[49m\u001b[43mforce_download\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mforce_download\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4327\u001b[0m \u001b[43m \u001b[49m\u001b[43mproxies\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mproxies\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4328\u001b[0m \u001b[43m \u001b[49m\u001b[43mlocal_files_only\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlocal_files_only\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4329\u001b[0m \u001b[43m \u001b[49m\u001b[43mtoken\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4330\u001b[0m \u001b[43m \u001b[49m\u001b[43muser_agent\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muser_agent\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4331\u001b[0m \u001b[43m \u001b[49m\u001b[43mrevision\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mrevision\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4332\u001b[0m \u001b[43m \u001b[49m\u001b[43mcommit_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcommit_hash\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 4333\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 4335\u001b[0m is_sharded \u001b[38;5;241m=\u001b[39m sharded_metadata \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 4336\u001b[0m is_quantized \u001b[38;5;241m=\u001b[39m hf_quantizer \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n",
"File \u001b[1;32mc:\\Users\\PALLAVI\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\modeling_utils.py:1130\u001b[0m, in \u001b[0;36m_get_resolved_checkpoint_files\u001b[1;34m(pretrained_model_name_or_path, subfolder, variant, gguf_file, from_tf, from_flax, use_safetensors, cache_dir, force_download, proxies, local_files_only, token, user_agent, revision, commit_hash)\u001b[0m\n\u001b[0;32m 1124\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mEnvironmentError\u001b[39;00m(\n\u001b[0;32m 1125\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mpretrained_model_name_or_path\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not appear to have a file named\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1126\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m_add_variant(WEIGHTS_NAME,\u001b[38;5;250m \u001b[39mvariant)\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m but there is a file without the variant\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1127\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mvariant\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m. Use `variant=None` to load this model from those weights.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1128\u001b[0m )\n\u001b[0;32m 1129\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m-> 1130\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mEnvironmentError\u001b[39;00m(\n\u001b[0;32m 1131\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mpretrained_model_name_or_path\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not appear to have a file named\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1132\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m_add_variant(WEIGHTS_NAME,\u001b[38;5;250m \u001b[39mvariant)\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m_add_variant(SAFE_WEIGHTS_NAME,\u001b[38;5;250m \u001b[39mvariant)\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m,\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1133\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mTF2_WEIGHTS_NAME\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mTF_WEIGHTS_NAME\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m or \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mFLAX_WEIGHTS_NAME\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 1134\u001b[0m )\n\u001b[0;32m 1136\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mEnvironmentError\u001b[39;00m:\n\u001b[0;32m 1137\u001b[0m \u001b[38;5;66;03m# Raise any environment error raise by `cached_file`. It will have a helpful error message adapted\u001b[39;00m\n\u001b[0;32m 1138\u001b[0m \u001b[38;5;66;03m# to the original exception.\u001b[39;00m\n\u001b[0;32m 1139\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m\n",
"\u001b[1;31mOSError\u001b[0m: sesame/csm-1b does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack."
]
}
],
"source": [
"# Load the Model\n",
"from transformers import AutoModel, AutoConfig\n",
"import torch\n",
"\n",
"# Load the configuration\n",
"config = AutoConfig.from_pretrained(\"sesame/csm-1b\")\n",
"\n",
"# Load the model with the configuration\n",
"model = AutoModel.from_pretrained(\"sesame/csm-1b\", config=config)\n",
"model.to(device=\"cuda\", dtype=torch.bfloat16)\n",
"print(\"Model loaded successfully!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "mdpfkA6qiZaZ"
},
"outputs": [],
"source": [
"# Define the generate_audio function (replace with your actual implementation)\n",
"def generate_audio(text, speaker_id):\n",
" \"\"\"\n",
" Placeholder function for generating audio from text.\n",
" Replace this with your actual implementation.\n",
" \"\"\"\n",
" # Simulate audio generation\n",
" print(f\"Generating audio for text: {text} with speaker ID: {speaker_id}\")\n",
" # Return a placeholder audio file path\n",
" return \"/content/dummy_audio.wav\"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Whv2TT-CdFBq"
},
"outputs": [],
"source": [
"# Define the Gradio interface using Blocks API\n",
"import gradio as gr\n",
"\n",
"with gr.Blocks(title=\"Sesame CSM-1B Text-to-Speech\") as demo:\n",
" gr.Markdown(\"# đī¸ Sesame CSM-1B Text-to-Speech\")\n",
" gr.Markdown(\"Generate high-quality audio from text using the Sesame CSM-1B model.\")\n",
"\n",
" with gr.Row():\n",
" with gr.Column():\n",
" # Text input\n",
" text_input = gr.Textbox(label=\"Enter Text\", placeholder=\"Type your text here...\", lines=5)\n",
"\n",
" # Speaker selection\n",
" speaker_dropdown = gr.Dropdown(\n",
" choices=[\"Speaker 0\", \"Speaker 1\", \"Speaker 2\", \"Speaker 3\"], # Add more options if needed\n",
" label=\"Select Speaker\",\n",
" value=\"Speaker 0\"\n",
" )\n",
"\n",
" # File upload for text\n",
" file_upload = gr.File(label=\"Or Upload a Text File\", file_types=[\".txt\"])\n",
"\n",
" # Generate and Cancel buttons\n",
" with gr.Row():\n",
" generate_button = gr.Button(\"Generate Audio đĩ\")\n",
" cancel_button = gr.Button(\"Cancel â\")\n",
"\n",
" with gr.Column():\n",
" # Audio output\n",
" audio_output = gr.Audio(label=\"Generated Audio\", interactive=False)\n",
"\n",
" # Playback controls\n",
" with gr.Row():\n",
" play_button = gr.Button(\"âļī¸ Play\")\n",
" pause_button = gr.Button(\"â¸ī¸ Pause\")\n",
" stop_button = gr.Button(\"âšī¸ Stop\")\n",
"\n",
" # Volume control\n",
" volume_slider = gr.Slider(minimum=0, maximum=100, value=50, label=\"Volume\")\n",
"\n",
" # Define interactions\n",
" def process_input(text, file, speaker, cancel_flag):\n",
" if cancel_flag:\n",
" return \"Process canceled by user.\"\n",
"\n",
" if file is not None:\n",
" # Read text from the uploaded file\n",
" with open(file.name, \"r\") as f:\n",
" text = f.read()\n",
"\n",
" # Get speaker ID from the dropdown\n",
" speaker_id = int(speaker.split()[-1])\n",
"\n",
" # Generate audio\n",
" audio_file = generate_audio(text, speaker_id)\n",
" return audio_file\n",
"\n",
" # Link inputs and outputs\n",
" generate_button.click(\n",
" fn=process_input,\n",
" inputs=[text_input, file_upload, speaker_dropdown, cancel_button],\n",
" outputs=audio_output\n",
" )\n",
"\n",
" # Cancel button logic\n",
" cancel_button.click(\n",
" fn=lambda: \"Process canceled by user.\",\n",
" inputs=None,\n",
" outputs=audio_output\n",
" )\n",
"\n",
" # Playback controls (placeholders, as Gradio Audio already has built-in controls)\n",
" play_button.click(fn=lambda: None)\n",
" pause_button.click(fn=lambda: None)\n",
" stop_button.click(fn=lambda: None)\n",
"\n",
"# Launch the Gradio app\n",
"demo.launch(share=True) # Set `share=True` to get a public link"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"include_colab_link": true,
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}