pallavi1428 commited on
Commit
2476aa6
·
1 Parent(s): 6dd97e3

Added Gradio app files correctly

Browse files
Files changed (4) hide show
  1. LICENSE +21 -0
  2. README.md +98 -9
  3. Sesame_AI_CSM_Notebook.ipynb +854 -0
  4. csm-google-collab +1 -0
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Malhar Ujawane
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -1,12 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: Sesame Aicsm
3
- emoji: 🏢
4
- colorFrom: indigo
5
- colorTo: yellow
6
- sdk: gradio
7
- sdk_version: 5.22.0
8
- app_file: app.py
9
- pinned: false
 
 
 
 
 
 
 
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🧠 Sesame CSM-1B Google Colab Notebook
2
+
3
+ [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Justmalhar/csm-google-collab/blob/main/Sesame_AI_CSM_Notebook.ipynb)
4
+
5
+ > **Text-to-Speech Demo using Sesame's CSM-1B Model, Gradio UI, and HuggingFace Hub**
6
+
7
+ ---
8
+
9
+ ## 📌 Overview
10
+
11
+ This notebook demonstrates how to set up and run **Sesame's CSM-1B** Text-to-Speech model on **Google Colab** using Gradio for a browser-based UI.
12
+
13
+ - 🔊 Input: Text
14
+ - 🎙️ Output: Realistic speech audio via pretrained TTS model
15
+ - 🤖 Model: [`sesame/csm-1b`](https://www.google.com/search?q=site%3Ahuggingface.co+sesame%2Fcsm-1b)
16
+
17
+ ---
18
+
19
+ ## 🚀 Quick Start
20
+
21
+ ### 🔗 Run in Google Colab
22
+ Click the badge above to launch the notebook directly in Google Colab.
23
+
24
+ ### 🧩 Steps to Execute
25
+
26
+ 1. **Install Gradio and dependencies**
27
+ 2. **Clone the CSM repo** and install additional Python libraries via `requirements.txt`
28
+ 3. **Authenticate** with HuggingFace using `notebook_login()`
29
+ 4. **Load the model** using the helper from `generator.py`
30
+ 5. **Launch Gradio** with either:
31
+ - ✅ Simple `gr.Interface`
32
+ - 💡 Full-featured `gr.Blocks` app
33
+
34
  ---
35
+
36
+ ## 🛠️ Requirements
37
+
38
+ > All dependencies are pre-installed in the notebook via `pip install`
39
+
40
+ Main libraries:
41
+
42
+ - `gradio`
43
+ - `torch`, `torchaudio`
44
+ - `transformers`
45
+ - `huggingface_hub`
46
+ - `moshi`
47
+ - `torchtune`
48
+ - `torchao`
49
+ - `silentcipher` (from GitHub)
50
+
51
  ---
52
 
53
+ ## 🧪 Model Source
54
+
55
+ - **Model**: [sesame/csm-1b](https://www.google.com/search?q=site%3Ahuggingface.co+sesame%2Fcsm-1b)
56
+ - **Repository**: https://github.com/SesameAILabs/csm
57
+ - **Audio Generation**: `generator.generate()` from cloned repo
58
+
59
+ ---
60
+
61
+ ## 🖼️ UI Modes
62
+
63
+ ### Simple Interface
64
+
65
+ ```python
66
+ gr.Interface(
67
+ fn=gradio_interface,
68
+ inputs=[gr.Textbox(...), gr.Slider(...)],
69
+ outputs=gr.Audio(...),
70
+ title="Sesame CSM-1B Text-to-Speech"
71
+ ).launch(share=True)
72
+ ```
73
+
74
+ ### Advanced Blocks UI
75
+
76
+ - 🔤 Text Input + File Upload
77
+ - 🎚️ Speaker Selector
78
+ - 🎛️ Audio Controls (play, pause, stop)
79
+ - 🔉 Volume Slider
80
+ - 🔁 Event Binding via `.click()`
81
+
82
+ ---
83
+
84
+ ## 🧑‍💻 Author
85
+
86
+ - 👤 Malhar Ujawane
87
+ - 🐦 [Twitter](https://x.com/justmalhar)
88
+ - 💻 [GitHub](https://github.com/justmalhar)
89
+
90
+ ---
91
+
92
+ ## ⚠️ Notes
93
+
94
+ - Ensure your HuggingFace account has access to the model before logging in.
95
+ - If you encounter `Model.__init__() missing required argument: 'config'`, verify model loading code inside `generator.py`.
96
+
97
+ ---
98
+
99
+ ## 🧬 License
100
+
101
+ MIT License (for the notebook). Model license terms apply as per [HuggingFace model card](https://huggingface.co/sesame/csm-1b).
Sesame_AI_CSM_Notebook.ipynb ADDED
@@ -0,0 +1,854 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {
6
+ "colab_type": "text",
7
+ "id": "view-in-github"
8
+ },
9
+ "source": [
10
+ "<a href=\"https://colab.research.google.com/github/Justmalhar/csm-google-collab/blob/main/Sesame_AI_CSM_Notebook.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "markdown",
15
+ "metadata": {
16
+ "id": "Ww36-N-bgcnA"
17
+ },
18
+ "source": [
19
+ "# Sesame AI - Google Collab CSM notebook\n",
20
+ "\n",
21
+ "Author: justmalhar\n",
22
+ "\n",
23
+ "http://x.com/justmalhar\n",
24
+ "\n",
25
+ "http://github.com/justmalhar\n",
26
+ "\n",
27
+ "HuggingFace Model - https://huggingface.co/sesame/csm-1b\n",
28
+ "\n",
29
+ "## Instructions\n",
30
+ "\n",
31
+ "Run each step below till you see the Gradio UI running\n",
32
+ "\n",
33
+ "\n",
34
+ "## Steps:\n",
35
+ "1. Setup Gradio\n",
36
+ "2. Clone the repo and install the requirments\n",
37
+ "3. Login with HuggingFace account to access the model\n",
38
+ "4. Run all steps till you see the Gradio UI"
39
+ ]
40
+ },
41
+ {
42
+ "cell_type": "code",
43
+ "execution_count": 1,
44
+ "metadata": {
45
+ "colab": {
46
+ "base_uri": "https://localhost:8080/"
47
+ },
48
+ "id": "T6S72oH6hTd5",
49
+ "outputId": "cd15a8fb-2033-49a5-8243-96ca208a7385"
50
+ },
51
+ "outputs": [
52
+ {
53
+ "name": "stdout",
54
+ "output_type": "stream",
55
+ "text": [
56
+ "Collecting torch\n",
57
+ " Downloading torch-2.6.0-cp312-cp312-win_amd64.whl.metadata (28 kB)\n",
58
+ "Collecting torchaudio\n",
59
+ " Downloading torchaudio-2.6.0-cp312-cp312-win_amd64.whl.metadata (6.7 kB)\n",
60
+ "Collecting transformers\n",
61
+ " Downloading transformers-4.50.0-py3-none-any.whl.metadata (39 kB)\n",
62
+ "Collecting huggingface_hub\n",
63
+ " Using cached huggingface_hub-0.29.3-py3-none-any.whl.metadata (13 kB)\n",
64
+ "Collecting gradio\n",
65
+ " Downloading gradio-5.22.0-py3-none-any.whl.metadata (16 kB)\n",
66
+ "Collecting filelock (from torch)\n",
67
+ " Using cached filelock-3.18.0-py3-none-any.whl.metadata (2.9 kB)\n",
68
+ "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",
69
+ "Collecting networkx (from torch)\n",
70
+ " Using cached networkx-3.4.2-py3-none-any.whl.metadata (6.3 kB)\n",
71
+ "Requirement already satisfied: jinja2 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (3.1.3)\n",
72
+ "Collecting fsspec (from torch)\n",
73
+ " Using cached fsspec-2025.3.0-py3-none-any.whl.metadata (11 kB)\n",
74
+ "Requirement already satisfied: setuptools in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from torch) (69.2.0)\n",
75
+ "Collecting sympy==1.13.1 (from torch)\n",
76
+ " Downloading sympy-1.13.1-py3-none-any.whl.metadata (12 kB)\n",
77
+ "Collecting mpmath<1.4,>=1.1.0 (from sympy==1.13.1->torch)\n",
78
+ " Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)\n",
79
+ "Requirement already satisfied: numpy>=1.17 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (1.26.3)\n",
80
+ "Requirement already satisfied: packaging>=20.0 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (23.2)\n",
81
+ "Requirement already satisfied: pyyaml>=5.1 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (6.0.1)\n",
82
+ "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",
83
+ "Requirement already satisfied: requests in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (2.31.0)\n",
84
+ "Collecting tokenizers<0.22,>=0.21 (from transformers)\n",
85
+ " Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl.metadata (6.9 kB)\n",
86
+ "Collecting safetensors>=0.4.3 (from transformers)\n",
87
+ " Using cached safetensors-0.5.3-cp38-abi3-win_amd64.whl.metadata (3.9 kB)\n",
88
+ "Requirement already satisfied: tqdm>=4.27 in c:\\users\\pallavi\\appdata\\local\\programs\\python\\python312\\lib\\site-packages (from transformers) (4.66.2)\n",
89
+ "Collecting aiofiles<24.0,>=22.0 (from gradio)\n",
90
+ " Downloading aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB)\n",
91
+ "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",
92
+ "Collecting fastapi<1.0,>=0.115.2 (from gradio)\n",
93
+ " Downloading fastapi-0.115.11-py3-none-any.whl.metadata (27 kB)\n",
94
+ "Collecting ffmpy (from gradio)\n",
95
+ " Downloading ffmpy-0.5.0-py3-none-any.whl.metadata (3.0 kB)\n",
96
+ "Collecting gradio-client==1.8.0 (from gradio)\n",
97
+ " Downloading gradio_client-1.8.0-py3-none-any.whl.metadata (7.1 kB)\n",
98
+ "Collecting groovy~=0.1 (from gradio)\n",
99
+ " Downloading groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB)\n",
100
+ "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",
101
+ "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",
102
+ "Collecting orjson~=3.0 (from gradio)\n",
103
+ " Downloading orjson-3.10.15-cp312-cp312-win_amd64.whl.metadata (42 kB)\n",
104
+ "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",
105
+ "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",
106
+ "Collecting pydantic>=2.0 (from gradio)\n",
107
+ " Downloading pydantic-2.10.6-py3-none-any.whl.metadata (30 kB)\n",
108
+ "Collecting pydub (from gradio)\n",
109
+ " Using cached pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n",
110
+ "Collecting python-multipart>=0.0.18 (from gradio)\n",
111
+ " Downloading python_multipart-0.0.20-py3-none-any.whl.metadata (1.8 kB)\n",
112
+ "Collecting ruff>=0.9.3 (from gradio)\n",
113
+ " Downloading ruff-0.11.2-py3-none-win_amd64.whl.metadata (26 kB)\n",
114
+ "Collecting safehttpx<0.2.0,>=0.1.6 (from gradio)\n",
115
+ " Downloading safehttpx-0.1.6-py3-none-any.whl.metadata (4.2 kB)\n",
116
+ "Collecting semantic-version~=2.0 (from gradio)\n",
117
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n",
118
+ "Collecting starlette<1.0,>=0.40.0 (from gradio)\n",
119
+ " Downloading starlette-0.46.1-py3-none-any.whl.metadata (6.2 kB)\n",
120
+ "Collecting tomlkit<0.14.0,>=0.12.0 (from gradio)\n",
121
+ " Downloading tomlkit-0.13.2-py3-none-any.whl.metadata (2.7 kB)\n",
122
+ "Collecting typer<1.0,>=0.12 (from gradio)\n",
123
+ " Downloading typer-0.15.2-py3-none-any.whl.metadata (15 kB)\n",
124
+ "Collecting uvicorn>=0.14.0 (from gradio)\n",
125
+ " Downloading uvicorn-0.34.0-py3-none-any.whl.metadata (6.5 kB)\n",
126
+ "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",
127
+ "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",
128
+ "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",
129
+ "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",
130
+ "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",
131
+ "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",
132
+ "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",
133
+ "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",
134
+ "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",
135
+ "Collecting annotated-types>=0.6.0 (from pydantic>=2.0->gradio)\n",
136
+ " Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)\n",
137
+ "Collecting pydantic-core==2.27.2 (from pydantic>=2.0->gradio)\n",
138
+ " Downloading pydantic_core-2.27.2-cp312-cp312-win_amd64.whl.metadata (6.7 kB)\n",
139
+ "Collecting typing-extensions>=4.10.0 (from torch)\n",
140
+ " Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)\n",
141
+ "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",
142
+ "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",
143
+ "Collecting shellingham>=1.3.0 (from typer<1.0,>=0.12->gradio)\n",
144
+ " Downloading shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)\n",
145
+ "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",
146
+ "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",
147
+ "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",
148
+ "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",
149
+ "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",
150
+ "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",
151
+ "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",
152
+ "Downloading torch-2.6.0-cp312-cp312-win_amd64.whl (204.1 MB)\n",
153
+ " ---------------------------------------- 0.0/204.1 MB ? eta -:--:--\n",
154
+ " ---------------------------------------- 0.3/204.1 MB ? eta -:--:--\n",
155
+ " ---------------------------------------- 0.8/204.1 MB 2.8 MB/s eta 0:01:13\n",
156
+ " ---------------------------------------- 1.3/204.1 MB 2.7 MB/s eta 0:01:16\n",
157
+ " ---------------------------------------- 2.1/204.1 MB 2.9 MB/s eta 0:01:11\n",
158
+ " --------------------------------------- 2.6/204.1 MB 2.8 MB/s eta 0:01:13\n",
159
+ " --------------------------------------- 3.4/204.1 MB 2.9 MB/s eta 0:01:09\n",
160
+ " --------------------------------------- 4.5/204.1 MB 3.2 MB/s eta 0:01:02\n",
161
+ " --------------------------------------- 5.0/204.1 MB 3.3 MB/s eta 0:01:01\n",
162
+ " - -------------------------------------- 5.8/204.1 MB 3.3 MB/s eta 0:01:00\n",
163
+ " - -------------------------------------- 6.6/204.1 MB 3.3 MB/s eta 0:01:01\n",
164
+ " - -------------------------------------- 7.6/204.1 MB 3.4 MB/s eta 0:00:58\n",
165
+ " - -------------------------------------- 8.4/204.1 MB 3.5 MB/s eta 0:00:57\n",
166
+ " - -------------------------------------- 9.4/204.1 MB 3.6 MB/s eta 0:00:55\n",
167
+ " -- ------------------------------------- 10.5/204.1 MB 3.7 MB/s eta 0:00:53\n",
168
+ " -- ------------------------------------- 11.5/204.1 MB 3.8 MB/s eta 0:00:51\n",
169
+ " -- ------------------------------------- 12.3/204.1 MB 3.9 MB/s eta 0:00:50\n",
170
+ " -- ------------------------------------- 13.1/204.1 MB 3.8 MB/s eta 0:00:51\n",
171
+ " -- ------------------------------------- 13.9/204.1 MB 3.8 MB/s eta 0:00:51\n",
172
+ " -- ------------------------------------- 14.4/204.1 MB 3.8 MB/s eta 0:00:51\n",
173
+ " --- ------------------------------------ 15.5/204.1 MB 3.8 MB/s eta 0:00:51\n",
174
+ " --- ------------------------------------ 16.3/204.1 MB 3.8 MB/s eta 0:00:50\n",
175
+ " --- ------------------------------------ 17.3/204.1 MB 3.8 MB/s eta 0:00:49\n",
176
+ " --- ------------------------------------ 18.4/204.1 MB 3.9 MB/s eta 0:00:48\n",
177
+ " --- ------------------------------------ 19.1/204.1 MB 3.9 MB/s eta 0:00:48\n",
178
+ " --- ------------------------------------ 19.9/204.1 MB 3.9 MB/s eta 0:00:48\n",
179
+ " --- ------------------------------------ 20.2/204.1 MB 3.9 MB/s eta 0:00:48\n",
180
+ " ---- ----------------------------------- 20.7/204.1 MB 3.8 MB/s eta 0:00:49\n",
181
+ " ---- ----------------------------------- 21.5/204.1 MB 3.7 MB/s eta 0:00:49\n",
182
+ " ---- ----------------------------------- 22.3/204.1 MB 3.7 MB/s eta 0:00:49\n",
183
+ " ---- ----------------------------------- 22.8/204.1 MB 3.7 MB/s eta 0:00:50\n",
184
+ " ---- ----------------------------------- 23.6/204.1 MB 3.7 MB/s eta 0:00:50\n",
185
+ " ---- ----------------------------------- 24.1/204.1 MB 3.6 MB/s eta 0:00:50\n",
186
+ " ---- ----------------------------------- 24.9/204.1 MB 3.7 MB/s eta 0:00:50\n",
187
+ " ----- ---------------------------------- 25.7/204.1 MB 3.7 MB/s eta 0:00:49\n",
188
+ " ----- ---------------------------------- 26.5/204.1 MB 3.6 MB/s eta 0:00:49\n",
189
+ " ----- ---------------------------------- 27.3/204.1 MB 3.6 MB/s eta 0:00:49\n",
190
+ " ----- ---------------------------------- 28.3/204.1 MB 3.7 MB/s eta 0:00:48\n",
191
+ " ----- ---------------------------------- 29.4/204.1 MB 3.7 MB/s eta 0:00:48\n",
192
+ " ----- ---------------------------------- 30.1/204.1 MB 3.7 MB/s eta 0:00:47\n",
193
+ " ----- ---------------------------------- 30.4/204.1 MB 3.7 MB/s eta 0:00:47\n",
194
+ " ------ --------------------------------- 31.2/204.1 MB 3.7 MB/s eta 0:00:48\n",
195
+ " ------ --------------------------------- 31.7/204.1 MB 3.7 MB/s eta 0:00:47\n",
196
+ " ------ --------------------------------- 32.5/204.1 MB 3.6 MB/s eta 0:00:48\n",
197
+ " ------ --------------------------------- 33.0/204.1 MB 3.6 MB/s eta 0:00:48\n",
198
+ " ------ --------------------------------- 33.8/204.1 MB 3.6 MB/s eta 0:00:48\n",
199
+ " ------ --------------------------------- 34.6/204.1 MB 3.6 MB/s eta 0:00:47\n",
200
+ " ------ --------------------------------- 35.4/204.1 MB 3.6 MB/s eta 0:00:47\n",
201
+ " ------- -------------------------------- 36.2/204.1 MB 3.6 MB/s eta 0:00:47\n",
202
+ " ------- -------------------------------- 37.2/204.1 MB 3.7 MB/s eta 0:00:46\n",
203
+ " ------- -------------------------------- 38.0/204.1 MB 3.7 MB/s eta 0:00:46\n",
204
+ " ------- -------------------------------- 38.5/204.1 MB 3.6 MB/s eta 0:00:46\n",
205
+ " ------- -------------------------------- 39.3/204.1 MB 3.6 MB/s eta 0:00:46\n",
206
+ " ------- -------------------------------- 40.1/204.1 MB 3.6 MB/s eta 0:00:45\n",
207
+ " -------- ------------------------------- 40.9/204.1 MB 3.7 MB/s eta 0:00:45\n",
208
+ " -------- ------------------------------- 41.7/204.1 MB 3.7 MB/s eta 0:00:45\n",
209
+ " -------- ------------------------------- 42.5/204.1 MB 3.6 MB/s eta 0:00:45\n",
210
+ " -------- ------------------------------- 43.5/204.1 MB 3.7 MB/s eta 0:00:44\n",
211
+ " -------- ------------------------------- 44.6/204.1 MB 3.7 MB/s eta 0:00:44\n",
212
+ " -------- ------------------------------- 45.4/204.1 MB 3.7 MB/s eta 0:00:44\n",
213
+ " --------- ------------------------------ 46.1/204.1 MB 3.7 MB/s eta 0:00:43\n",
214
+ " --------- ------------------------------ 46.9/204.1 MB 3.7 MB/s eta 0:00:43\n",
215
+ " --------- ------------------------------ 47.4/204.1 MB 3.7 MB/s eta 0:00:43\n",
216
+ " --------- ------------------------------ 48.2/204.1 MB 3.7 MB/s eta 0:00:43\n",
217
+ " --------- ------------------------------ 49.0/204.1 MB 3.7 MB/s eta 0:00:43\n",
218
+ " --------- ------------------------------ 49.5/204.1 MB 3.6 MB/s eta 0:00:43\n",
219
+ " --------- ------------------------------ 50.3/204.1 MB 3.6 MB/s eta 0:00:43\n",
220
+ " --------- ------------------------------ 50.9/204.1 MB 3.6 MB/s eta 0:00:43\n",
221
+ " ---------- ----------------------------- 51.6/204.1 MB 3.6 MB/s eta 0:00:42\n",
222
+ " ---------- ----------------------------- 52.2/204.1 MB 3.6 MB/s eta 0:00:42\n",
223
+ " ---------- ----------------------------- 53.0/204.1 MB 3.6 MB/s eta 0:00:42\n",
224
+ " ---------- ----------------------------- 53.5/204.1 MB 3.6 MB/s eta 0:00:42\n",
225
+ " ---------- ----------------------------- 54.0/204.1 MB 3.6 MB/s eta 0:00:42\n",
226
+ " ---------- ----------------------------- 54.5/204.1 MB 3.6 MB/s eta 0:00:42\n",
227
+ " ---------- ----------------------------- 55.3/204.1 MB 3.6 MB/s eta 0:00:42\n",
228
+ " ---------- ----------------------------- 56.1/204.1 MB 3.6 MB/s eta 0:00:42\n",
229
+ " ----------- ---------------------------- 56.9/204.1 MB 3.6 MB/s eta 0:00:42\n",
230
+ " ----------- ---------------------------- 57.7/204.1 MB 3.6 MB/s eta 0:00:41\n",
231
+ " ----------- ---------------------------- 58.5/204.1 MB 3.6 MB/s eta 0:00:41\n",
232
+ " ----------- ---------------------------- 59.2/204.1 MB 3.6 MB/s eta 0:00:41\n",
233
+ " ----------- ---------------------------- 60.0/204.1 MB 3.6 MB/s eta 0:00:41\n",
234
+ " ----------- ---------------------------- 60.8/204.1 MB 3.6 MB/s eta 0:00:40\n",
235
+ " ------------ --------------------------- 61.6/204.1 MB 3.6 MB/s eta 0:00:40\n",
236
+ " ------------ --------------------------- 62.4/204.1 MB 3.6 MB/s eta 0:00:40\n",
237
+ " ------------ --------------------------- 63.2/204.1 MB 3.6 MB/s eta 0:00:40\n",
238
+ " ------------ --------------------------- 64.0/204.1 MB 3.6 MB/s eta 0:00:40\n",
239
+ " ------------ --------------------------- 64.7/204.1 MB 3.6 MB/s eta 0:00:39\n",
240
+ " ------------ --------------------------- 65.3/204.1 MB 3.6 MB/s eta 0:00:39\n",
241
+ " ------------ --------------------------- 66.1/204.1 MB 3.6 MB/s eta 0:00:39\n",
242
+ " ------------- -------------------------- 66.6/204.1 MB 3.6 MB/s eta 0:00:39\n",
243
+ " ------------- -------------------------- 67.6/204.1 MB 3.6 MB/s eta 0:00:39\n",
244
+ " ------------- -------------------------- 68.7/204.1 MB 3.6 MB/s eta 0:00:38\n",
245
+ " ------------- -------------------------- 69.7/204.1 MB 3.6 MB/s eta 0:00:38\n",
246
+ " ------------- -------------------------- 70.8/204.1 MB 3.6 MB/s eta 0:00:37\n",
247
+ " -------------- ------------------------- 71.6/204.1 MB 3.6 MB/s eta 0:00:37\n",
248
+ " -------------- ------------------------- 72.4/204.1 MB 3.6 MB/s eta 0:00:37\n",
249
+ " -------------- ------------------------- 73.1/204.1 MB 3.6 MB/s eta 0:00:37\n",
250
+ " -------------- ------------------------- 73.9/204.1 MB 3.6 MB/s eta 0:00:36\n",
251
+ " -------------- ------------------------- 74.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
252
+ " -------------- ------------------------- 74.7/204.1 MB 3.6 MB/s eta 0:00:36\n",
253
+ " -------------- ------------------------- 75.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
254
+ " -------------- ------------------------- 76.0/204.1 MB 3.6 MB/s eta 0:00:36\n",
255
+ " --------------- ------------------------ 76.5/204.1 MB 3.6 MB/s eta 0:00:36\n",
256
+ " --------------- ------------------------ 77.3/204.1 MB 3.6 MB/s eta 0:00:36\n",
257
+ " --------------- ------------------------ 77.9/204.1 MB 3.6 MB/s eta 0:00:36\n",
258
+ " --------------- ------------------------ 78.6/204.1 MB 3.6 MB/s eta 0:00:36\n",
259
+ " --------------- ------------------------ 79.2/204.1 MB 3.6 MB/s eta 0:00:36\n",
260
+ " --------------- ------------------------ 79.7/204.1 MB 3.6 MB/s eta 0:00:36\n",
261
+ " --------------- ------------------------ 80.2/204.1 MB 3.6 MB/s eta 0:00:35\n",
262
+ " --------------- ------------------------ 81.0/204.1 MB 3.6 MB/s eta 0:00:35\n",
263
+ " ---------------- ----------------------- 81.8/204.1 MB 3.6 MB/s eta 0:00:35\n",
264
+ " ---------------- ----------------------- 82.6/204.1 MB 3.6 MB/s eta 0:00:35\n",
265
+ " ---------------- ----------------------- 83.4/204.1 MB 3.6 MB/s eta 0:00:34\n",
266
+ " ---------------- ----------------------- 84.1/204.1 MB 3.6 MB/s eta 0:00:34\n",
267
+ " ---------------- ----------------------- 84.9/204.1 MB 3.6 MB/s eta 0:00:34\n",
268
+ " ---------------- ----------------------- 86.0/204.1 MB 3.6 MB/s eta 0:00:34\n",
269
+ " ----------------- ---------------------- 86.8/204.1 MB 3.6 MB/s eta 0:00:33\n",
270
+ " ----------------- ---------------------- 88.1/204.1 MB 3.6 MB/s eta 0:00:33\n",
271
+ " ----------------- ---------------------- 88.9/204.1 MB 3.6 MB/s eta 0:00:33\n",
272
+ " ----------------- ---------------------- 89.7/204.1 MB 3.6 MB/s eta 0:00:32\n",
273
+ " ----------------- ---------------------- 90.2/204.1 MB 3.6 MB/s eta 0:00:32\n",
274
+ " ----------------- ---------------------- 90.7/204.1 MB 3.6 MB/s eta 0:00:32\n",
275
+ " ----------------- ---------------------- 91.8/204.1 MB 3.6 MB/s eta 0:00:32\n",
276
+ " ------------------ --------------------- 92.5/204.1 MB 3.6 MB/s eta 0:00:32\n",
277
+ " ------------------ --------------------- 93.8/204.1 MB 3.6 MB/s eta 0:00:31\n",
278
+ " ------------------ --------------------- 94.4/204.1 MB 3.6 MB/s eta 0:00:31\n",
279
+ " ------------------ --------------------- 95.2/204.1 MB 3.6 MB/s eta 0:00:31\n",
280
+ " ------------------ --------------------- 96.2/204.1 MB 3.6 MB/s eta 0:00:30\n",
281
+ " ------------------- -------------------- 97.0/204.1 MB 3.6 MB/s eta 0:00:30\n",
282
+ " ------------------- -------------------- 97.8/204.1 MB 3.6 MB/s eta 0:00:30\n",
283
+ " ------------------- -------------------- 98.8/204.1 MB 3.6 MB/s eta 0:00:30\n",
284
+ " ------------------- -------------------- 99.9/204.1 MB 3.6 MB/s eta 0:00:29\n",
285
+ " ------------------- -------------------- 100.4/204.1 MB 3.6 MB/s eta 0:00:29\n",
286
+ " ------------------- -------------------- 100.9/204.1 MB 3.6 MB/s eta 0:00:29\n",
287
+ " ------------------- -------------------- 101.4/204.1 MB 3.6 MB/s eta 0:00:29\n",
288
+ " -------------------- ------------------- 102.2/204.1 MB 3.6 MB/s eta 0:00:29\n",
289
+ " -------------------- ------------------- 103.0/204.1 MB 3.6 MB/s eta 0:00:29\n",
290
+ " -------------------- ------------------- 103.8/204.1 MB 3.6 MB/s eta 0:00:28\n",
291
+ " -------------------- ------------------- 104.3/204.1 MB 3.6 MB/s eta 0:00:28\n",
292
+ " -------------------- ------------------- 105.4/204.1 MB 3.6 MB/s eta 0:00:28\n",
293
+ " -------------------- ------------------- 106.4/204.1 MB 3.6 MB/s eta 0:00:28\n",
294
+ " --------------------- ------------------ 107.2/204.1 MB 3.6 MB/s eta 0:00:27\n",
295
+ " --------------------- ------------------ 107.7/204.1 MB 3.6 MB/s eta 0:00:27\n",
296
+ " --------------------- ------------------ 108.5/204.1 MB 3.6 MB/s eta 0:00:27\n",
297
+ " --------------------- ------------------ 109.1/204.1 MB 3.6 MB/s eta 0:00:27\n",
298
+ " --------------------- ------------------ 110.1/204.1 MB 3.6 MB/s eta 0:00:26\n",
299
+ " --------------------- ------------------ 111.1/204.1 MB 3.6 MB/s eta 0:00:26\n",
300
+ " --------------------- ------------------ 111.9/204.1 MB 3.6 MB/s eta 0:00:26\n",
301
+ " ---------------------- ----------------- 113.0/204.1 MB 3.7 MB/s eta 0:00:25\n",
302
+ " ---------------------- ----------------- 113.8/204.1 MB 3.6 MB/s eta 0:00:25\n",
303
+ " ---------------------- ----------------- 114.6/204.1 MB 3.6 MB/s eta 0:00:25\n",
304
+ " ---------------------- ----------------- 115.3/204.1 MB 3.7 MB/s eta 0:00:25\n",
305
+ " ---------------------- ----------------- 116.1/204.1 MB 3.7 MB/s eta 0:00:25\n",
306
+ " ---------------------- ----------------- 116.9/204.1 MB 3.6 MB/s eta 0:00:24\n",
307
+ " ----------------------- ---------------- 117.7/204.1 MB 3.6 MB/s eta 0:00:24\n",
308
+ " ----------------------- ---------------- 118.2/204.1 MB 3.6 MB/s eta 0:00:24\n",
309
+ " ----------------------- ---------------- 118.8/204.1 MB 3.6 MB/s eta 0:00:24\n",
310
+ " ----------------------- ---------------- 119.3/204.1 MB 3.6 MB/s eta 0:00:24\n",
311
+ " ----------------------- ---------------- 119.5/204.1 MB 3.6 MB/s eta 0:00:24\n",
312
+ " ----------------------- ---------------- 120.1/204.1 MB 3.6 MB/s eta 0:00:24\n",
313
+ " ----------------------- ---------------- 120.6/204.1 MB 3.6 MB/s eta 0:00:24\n",
314
+ " ----------------------- ---------------- 120.6/204.1 MB 3.6 MB/s eta 0:00:24\n",
315
+ " ----------------------- ---------------- 120.8/204.1 MB 3.5 MB/s eta 0:00:24\n",
316
+ " ----------------------- ---------------- 121.1/204.1 MB 3.5 MB/s eta 0:00:24\n",
317
+ " ----------------------- ---------------- 121.6/204.1 MB 3.5 MB/s eta 0:00:24\n",
318
+ " ----------------------- ---------------- 122.2/204.1 MB 3.5 MB/s eta 0:00:24\n",
319
+ " ------------------------ --------------- 122.9/204.1 MB 3.5 MB/s eta 0:00:24\n",
320
+ " ------------------------ --------------- 123.7/204.1 MB 3.5 MB/s eta 0:00:24\n",
321
+ " ------------------------ --------------- 124.5/204.1 MB 3.5 MB/s eta 0:00:23\n",
322
+ " ------------------------ --------------- 125.3/204.1 MB 3.5 MB/s eta 0:00:23\n",
323
+ " ------------------------ --------------- 125.8/204.1 MB 3.5 MB/s eta 0:00:23\n",
324
+ " ------------------------ --------------- 126.6/204.1 MB 3.5 MB/s eta 0:00:23\n",
325
+ " ------------------------ --------------- 127.4/204.1 MB 3.5 MB/s eta 0:00:23\n",
326
+ " ------------------------- -------------- 128.2/204.1 MB 3.5 MB/s eta 0:00:22\n",
327
+ " ------------------------- -------------- 129.0/204.1 MB 3.5 MB/s eta 0:00:22\n",
328
+ " ------------------------- -------------- 129.5/204.1 MB 3.5 MB/s eta 0:00:22\n",
329
+ " ------------------------- -------------- 130.0/204.1 MB 3.5 MB/s eta 0:00:22\n",
330
+ " ------------------------- -------------- 130.8/204.1 MB 3.5 MB/s eta 0:00:22\n",
331
+ " ------------------------- -------------- 131.6/204.1 MB 3.5 MB/s eta 0:00:21\n",
332
+ " ------------------------- -------------- 132.6/204.1 MB 3.5 MB/s eta 0:00:21\n",
333
+ " -------------------------- ------------- 133.4/204.1 MB 3.5 MB/s eta 0:00:21\n",
334
+ " -------------------------- ------------- 134.5/204.1 MB 3.5 MB/s eta 0:00:21\n",
335
+ " -------------------------- ------------- 135.3/204.1 MB 3.5 MB/s eta 0:00:20\n",
336
+ " -------------------------- ------------- 136.3/204.1 MB 3.5 MB/s eta 0:00:20\n",
337
+ " -------------------------- ------------- 137.1/204.1 MB 3.5 MB/s eta 0:00:20\n",
338
+ " --------------------------- ------------ 137.9/204.1 MB 3.5 MB/s eta 0:00:19\n",
339
+ " --------------------------- ------------ 138.7/204.1 MB 3.5 MB/s eta 0:00:19\n",
340
+ " --------------------------- ------------ 139.7/204.1 MB 3.5 MB/s eta 0:00:19\n",
341
+ " --------------------------- ------------ 140.5/204.1 MB 3.5 MB/s eta 0:00:19\n",
342
+ " --------------------------- ------------ 141.3/204.1 MB 3.5 MB/s eta 0:00:18\n",
343
+ " --------------------------- ------------ 142.1/204.1 MB 3.5 MB/s eta 0:00:18\n",
344
+ " --------------------------- ------------ 142.9/204.1 MB 3.5 MB/s eta 0:00:18\n",
345
+ " ---------------------------- ----------- 143.1/204.1 MB 3.5 MB/s eta 0:00:18\n",
346
+ " ---------------------------- ----------- 144.2/204.1 MB 3.5 MB/s eta 0:00:18\n",
347
+ " ---------------------------- ----------- 144.7/204.1 MB 3.5 MB/s eta 0:00:17\n",
348
+ " ---------------------------- ----------- 145.8/204.1 MB 3.5 MB/s eta 0:00:17\n",
349
+ " ---------------------------- ----------- 146.8/204.1 MB 3.5 MB/s eta 0:00:17\n",
350
+ " ---------------------------- ----------- 147.6/204.1 MB 3.5 MB/s eta 0:00:17\n",
351
+ " ----------------------------- ---------- 148.6/204.1 MB 3.5 MB/s eta 0:00:16\n",
352
+ " ----------------------------- ---------- 149.7/204.1 MB 3.5 MB/s eta 0:00:16\n",
353
+ " ----------------------------- ---------- 150.5/204.1 MB 3.5 MB/s eta 0:00:16\n",
354
+ " ----------------------------- ---------- 151.5/204.1 MB 3.5 MB/s eta 0:00:15\n",
355
+ " ----------------------------- ---------- 152.3/204.1 MB 3.5 MB/s eta 0:00:15\n",
356
+ " ------------------------------ --------- 153.4/204.1 MB 3.5 MB/s eta 0:00:15\n",
357
+ " ------------------------------ --------- 154.4/204.1 MB 3.6 MB/s eta 0:00:14\n",
358
+ " ------------------------------ --------- 155.2/204.1 MB 3.6 MB/s eta 0:00:14\n",
359
+ " ------------------------------ --------- 156.0/204.1 MB 3.6 MB/s eta 0:00:14\n",
360
+ " ------------------------------ --------- 157.0/204.1 MB 3.6 MB/s eta 0:00:14\n",
361
+ " ------------------------------ --------- 157.8/204.1 MB 3.6 MB/s eta 0:00:13\n",
362
+ " ------------------------------- -------- 158.9/204.1 MB 3.6 MB/s eta 0:00:13\n",
363
+ " ------------------------------- -------- 159.6/204.1 MB 3.6 MB/s eta 0:00:13\n",
364
+ " ------------------------------- -------- 160.7/204.1 MB 3.6 MB/s eta 0:00:13\n",
365
+ " ------------------------------- -------- 161.7/204.1 MB 3.6 MB/s eta 0:00:12\n",
366
+ " ------------------------------- -------- 162.5/204.1 MB 3.6 MB/s eta 0:00:12\n",
367
+ " -------------------------------- ------- 163.3/204.1 MB 3.6 MB/s eta 0:00:12\n",
368
+ " -------------------------------- ------- 164.4/204.1 MB 3.7 MB/s eta 0:00:11\n",
369
+ " -------------------------------- ------- 165.4/204.1 MB 3.7 MB/s eta 0:00:11\n",
370
+ " -------------------------------- ------- 166.2/204.1 MB 3.7 MB/s eta 0:00:11\n",
371
+ " -------------------------------- ------- 167.0/204.1 MB 3.7 MB/s eta 0:00:11\n",
372
+ " -------------------------------- ------- 167.8/204.1 MB 3.7 MB/s eta 0:00:10\n",
373
+ " --------------------------------- ------ 168.6/204.1 MB 3.7 MB/s eta 0:00:10\n",
374
+ " --------------------------------- ------ 169.3/204.1 MB 3.7 MB/s eta 0:00:10\n",
375
+ " --------------------------------- ------ 170.1/204.1 MB 3.7 MB/s eta 0:00:10\n",
376
+ " --------------------------------- ------ 170.9/204.1 MB 3.7 MB/s eta 0:00:10\n",
377
+ " --------------------------------- ------ 171.4/204.1 MB 3.7 MB/s eta 0:00:09\n",
378
+ " --------------------------------- ------ 172.2/204.1 MB 3.7 MB/s eta 0:00:09\n",
379
+ " --------------------------------- ------ 172.8/204.1 MB 3.6 MB/s eta 0:00:09\n",
380
+ " --------------------------------- ------ 173.3/204.1 MB 3.6 MB/s eta 0:00:09\n",
381
+ " ---------------------------------- ----- 174.1/204.1 MB 3.6 MB/s eta 0:00:09\n",
382
+ " ---------------------------------- ----- 174.3/204.1 MB 3.6 MB/s eta 0:00:09\n",
383
+ " ---------------------------------- ----- 174.9/204.1 MB 3.6 MB/s eta 0:00:09\n",
384
+ " ---------------------------------- ----- 175.6/204.1 MB 3.6 MB/s eta 0:00:08\n",
385
+ " ---------------------------------- ----- 175.9/204.1 MB 3.6 MB/s eta 0:00:08\n",
386
+ " ---------------------------------- ----- 176.7/204.1 MB 3.6 MB/s eta 0:00:08\n",
387
+ " ---------------------------------- ----- 177.2/204.1 MB 3.6 MB/s eta 0:00:08\n",
388
+ " ---------------------------------- ----- 178.3/204.1 MB 3.6 MB/s eta 0:00:08\n",
389
+ " ----------------------------------- ---- 178.8/204.1 MB 3.6 MB/s eta 0:00:08\n",
390
+ " ----------------------------------- ---- 179.6/204.1 MB 3.6 MB/s eta 0:00:07\n",
391
+ " ----------------------------------- ---- 180.4/204.1 MB 3.6 MB/s eta 0:00:07\n",
392
+ " ----------------------------------- ---- 181.1/204.1 MB 3.6 MB/s eta 0:00:07\n",
393
+ " ----------------------------------- ---- 181.9/204.1 MB 3.6 MB/s eta 0:00:07\n",
394
+ " ----------------------------------- ---- 182.7/204.1 MB 3.6 MB/s eta 0:00:06\n",
395
+ " ----------------------------------- ---- 183.5/204.1 MB 3.6 MB/s eta 0:00:06\n",
396
+ " ------------------------------------ --- 184.3/204.1 MB 3.6 MB/s eta 0:00:06\n",
397
+ " ------------------------------------ --- 184.8/204.1 MB 3.6 MB/s eta 0:00:06\n",
398
+ " ------------------------------------ --- 185.9/204.1 MB 3.6 MB/s eta 0:00:06\n",
399
+ " ------------------------------------ --- 186.6/204.1 MB 3.6 MB/s eta 0:00:05\n",
400
+ " ------------------------------------ --- 187.4/204.1 MB 3.6 MB/s eta 0:00:05\n",
401
+ " ------------------------------------ --- 188.2/204.1 MB 3.6 MB/s eta 0:00:05\n",
402
+ " ------------------------------------ --- 188.7/204.1 MB 3.6 MB/s eta 0:00:05\n",
403
+ " ------------------------------------- -- 189.5/204.1 MB 3.6 MB/s eta 0:00:05\n",
404
+ " ------------------------------------- -- 190.3/204.1 MB 3.6 MB/s eta 0:00:04\n",
405
+ " ------------------------------------- -- 191.1/204.1 MB 3.6 MB/s eta 0:00:04\n",
406
+ " ------------------------------------- -- 191.6/204.1 MB 3.6 MB/s eta 0:00:04\n",
407
+ " ------------------------------------- -- 192.2/204.1 MB 3.6 MB/s eta 0:00:04\n",
408
+ " ------------------------------------- -- 192.4/204.1 MB 3.6 MB/s eta 0:00:04\n",
409
+ " ------------------------------------- -- 192.9/204.1 MB 3.6 MB/s eta 0:00:04\n",
410
+ " ------------------------------------- -- 193.7/204.1 MB 3.6 MB/s eta 0:00:03\n",
411
+ " -------------------------------------- - 194.2/204.1 MB 3.6 MB/s eta 0:00:03\n",
412
+ " -------------------------------------- - 195.0/204.1 MB 3.6 MB/s eta 0:00:03\n",
413
+ " -------------------------------------- - 195.6/204.1 MB 3.6 MB/s eta 0:00:03\n",
414
+ " -------------------------------------- - 196.1/204.1 MB 3.6 MB/s eta 0:00:03\n",
415
+ " -------------------------------------- - 196.6/204.1 MB 3.6 MB/s eta 0:00:03\n",
416
+ " -------------------------------------- - 197.4/204.1 MB 3.6 MB/s eta 0:00:02\n",
417
+ " -------------------------------------- - 198.2/204.1 MB 3.5 MB/s eta 0:00:02\n",
418
+ " -------------------------------------- - 199.0/204.1 MB 3.5 MB/s eta 0:00:02\n",
419
+ " --------------------------------------- 199.8/204.1 MB 3.5 MB/s eta 0:00:02\n",
420
+ " --------------------------------------- 200.8/204.1 MB 3.5 MB/s eta 0:00:01\n",
421
+ " --------------------------------------- 201.6/204.1 MB 3.5 MB/s eta 0:00:01\n",
422
+ " --------------------------------------- 202.4/204.1 MB 3.5 MB/s eta 0:00:01\n",
423
+ " --------------------------------------- 203.2/204.1 MB 3.5 MB/s eta 0:00:01\n",
424
+ " --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
425
+ " --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
426
+ " --------------------------------------- 203.9/204.1 MB 3.5 MB/s eta 0:00:01\n",
427
+ " ---------------------------------------- 204.1/204.1 MB 3.5 MB/s eta 0:00:00\n",
428
+ "Downloading sympy-1.13.1-py3-none-any.whl (6.2 MB)\n",
429
+ " ---------------------------------------- 0.0/6.2 MB ? eta -:--:--\n",
430
+ " ------ --------------------------------- 1.0/6.2 MB 5.6 MB/s eta 0:00:01\n",
431
+ " ------------- -------------------------- 2.1/6.2 MB 5.1 MB/s eta 0:00:01\n",
432
+ " -------------------- ------------------- 3.1/6.2 MB 4.9 MB/s eta 0:00:01\n",
433
+ " ----------------------- ---------------- 3.7/6.2 MB 4.5 MB/s eta 0:00:01\n",
434
+ " ------------------------------ --------- 4.7/6.2 MB 4.5 MB/s eta 0:00:01\n",
435
+ " ----------------------------------- ---- 5.5/6.2 MB 4.5 MB/s eta 0:00:01\n",
436
+ " -------------------------------------- - 6.0/6.2 MB 4.1 MB/s eta 0:00:01\n",
437
+ " ---------------------------------------- 6.2/6.2 MB 4.0 MB/s eta 0:00:00\n",
438
+ "Downloading torchaudio-2.6.0-cp312-cp312-win_amd64.whl (2.4 MB)\n",
439
+ " ---------------------------------------- 0.0/2.4 MB ? eta -:--:--\n",
440
+ " ------------ --------------------------- 0.8/2.4 MB 4.2 MB/s eta 0:00:01\n",
441
+ " ----------------------------- ---------- 1.8/2.4 MB 4.6 MB/s eta 0:00:01\n",
442
+ " ---------------------------------------- 2.4/2.4 MB 4.5 MB/s eta 0:00:00\n",
443
+ "Downloading transformers-4.50.0-py3-none-any.whl (10.2 MB)\n",
444
+ " ---------------------------------------- 0.0/10.2 MB ? eta -:--:--\n",
445
+ " --- ------------------------------------ 0.8/10.2 MB 4.2 MB/s eta 0:00:03\n",
446
+ " ------- -------------------------------- 1.8/10.2 MB 4.4 MB/s eta 0:00:02\n",
447
+ " --------- ------------------------------ 2.4/10.2 MB 4.1 MB/s eta 0:00:02\n",
448
+ " ------------ --------------------------- 3.1/10.2 MB 3.7 MB/s eta 0:00:02\n",
449
+ " --------------- ------------------------ 3.9/10.2 MB 3.7 MB/s eta 0:00:02\n",
450
+ " ------------------ --------------------- 4.7/10.2 MB 3.8 MB/s eta 0:00:02\n",
451
+ " ---------------------- ----------------- 5.8/10.2 MB 3.9 MB/s eta 0:00:02\n",
452
+ " -------------------------- ------------- 6.8/10.2 MB 4.0 MB/s eta 0:00:01\n",
453
+ " ---------------------------- ----------- 7.3/10.2 MB 4.0 MB/s eta 0:00:01\n",
454
+ " ------------------------------ --------- 7.9/10.2 MB 3.7 MB/s eta 0:00:01\n",
455
+ " --------------------------------- ------ 8.7/10.2 MB 3.8 MB/s eta 0:00:01\n",
456
+ " -------------------------------------- - 9.7/10.2 MB 3.8 MB/s eta 0:00:01\n",
457
+ " ---------------------------------------- 10.2/10.2 MB 3.8 MB/s eta 0:00:00\n",
458
+ "Using cached huggingface_hub-0.29.3-py3-none-any.whl (468 kB)\n",
459
+ "Downloading gradio-5.22.0-py3-none-any.whl (46.2 MB)\n",
460
+ " ---------------------------------------- 0.0/46.2 MB ? eta -:--:--\n",
461
+ " --------------------------------------- 0.8/46.2 MB 4.2 MB/s eta 0:00:11\n",
462
+ " - -------------------------------------- 1.6/46.2 MB 4.4 MB/s eta 0:00:11\n",
463
+ " -- ------------------------------------- 2.4/46.2 MB 4.3 MB/s eta 0:00:11\n",
464
+ " -- ------------------------------------- 3.4/46.2 MB 4.2 MB/s eta 0:00:11\n",
465
+ " --- ------------------------------------ 3.9/46.2 MB 4.1 MB/s eta 0:00:11\n",
466
+ " ---- ----------------------------------- 4.7/46.2 MB 3.9 MB/s eta 0:00:11\n",
467
+ " ---- ----------------------------------- 5.5/46.2 MB 3.9 MB/s eta 0:00:11\n",
468
+ " ----- ---------------------------------- 6.6/46.2 MB 4.0 MB/s eta 0:00:10\n",
469
+ " ------ --------------------------------- 7.6/46.2 MB 4.2 MB/s eta 0:00:10\n",
470
+ " ------- -------------------------------- 8.7/46.2 MB 4.2 MB/s eta 0:00:09\n",
471
+ " -------- ------------------------------- 9.7/46.2 MB 4.3 MB/s eta 0:00:09\n",
472
+ " --------- ------------------------------ 10.7/46.2 MB 4.3 MB/s eta 0:00:09\n",
473
+ " --------- ------------------------------ 11.5/46.2 MB 4.3 MB/s eta 0:00:08\n",
474
+ " ---------- ----------------------------- 12.6/46.2 MB 4.3 MB/s eta 0:00:08\n",
475
+ " ----------- ---------------------------- 13.4/46.2 MB 4.3 MB/s eta 0:00:08\n",
476
+ " ------------ --------------------------- 14.7/46.2 MB 4.4 MB/s eta 0:00:08\n",
477
+ " ------------- -------------------------- 15.7/46.2 MB 4.4 MB/s eta 0:00:07\n",
478
+ " -------------- ------------------------- 16.8/46.2 MB 4.4 MB/s eta 0:00:07\n",
479
+ " --------------- ------------------------ 17.6/46.2 MB 4.4 MB/s eta 0:00:07\n",
480
+ " --------------- ------------------------ 18.4/46.2 MB 4.4 MB/s eta 0:00:07\n",
481
+ " ---------------- ----------------------- 19.4/46.2 MB 4.4 MB/s eta 0:00:07\n",
482
+ " ----------------- ---------------------- 20.2/46.2 MB 4.4 MB/s eta 0:00:06\n",
483
+ " ------------------ --------------------- 21.2/46.2 MB 4.4 MB/s eta 0:00:06\n",
484
+ " ------------------- -------------------- 22.3/46.2 MB 4.4 MB/s eta 0:00:06\n",
485
+ " ------------------- -------------------- 23.1/46.2 MB 4.4 MB/s eta 0:00:06\n",
486
+ " -------------------- ------------------- 24.1/46.2 MB 4.4 MB/s eta 0:00:06\n",
487
+ " --------------------- ------------------ 24.9/46.2 MB 4.4 MB/s eta 0:00:05\n",
488
+ " ---------------------- ----------------- 25.7/46.2 MB 4.4 MB/s eta 0:00:05\n",
489
+ " ----------------------- ---------------- 26.7/46.2 MB 4.4 MB/s eta 0:00:05\n",
490
+ " ----------------------- ---------------- 27.5/46.2 MB 4.4 MB/s eta 0:00:05\n",
491
+ " ------------------------ --------------- 28.8/46.2 MB 4.4 MB/s eta 0:00:04\n",
492
+ " ------------------------- -------------- 29.9/46.2 MB 4.5 MB/s eta 0:00:04\n",
493
+ " -------------------------- ------------- 30.9/46.2 MB 4.5 MB/s eta 0:00:04\n",
494
+ " --------------------------- ------------ 32.2/46.2 MB 4.5 MB/s eta 0:00:04\n",
495
+ " ---------------------------- ----------- 33.3/46.2 MB 4.5 MB/s eta 0:00:03\n",
496
+ " ----------------------------- ---------- 34.1/46.2 MB 4.5 MB/s eta 0:00:03\n",
497
+ " ------------------------------ --------- 35.1/46.2 MB 4.5 MB/s eta 0:00:03\n",
498
+ " ------------------------------- -------- 35.9/46.2 MB 4.5 MB/s eta 0:00:03\n",
499
+ " -------------------------------- ------- 37.0/46.2 MB 4.5 MB/s eta 0:00:03\n",
500
+ " -------------------------------- ------- 37.7/46.2 MB 4.5 MB/s eta 0:00:02\n",
501
+ " --------------------------------- ------ 38.8/46.2 MB 4.5 MB/s eta 0:00:02\n",
502
+ " ---------------------------------- ----- 39.3/46.2 MB 4.5 MB/s eta 0:00:02\n",
503
+ " ---------------------------------- ----- 40.1/46.2 MB 4.5 MB/s eta 0:00:02\n",
504
+ " ----------------------------------- ---- 40.9/46.2 MB 4.4 MB/s eta 0:00:02\n",
505
+ " ------------------------------------ --- 41.9/46.2 MB 4.4 MB/s eta 0:00:01\n",
506
+ " ------------------------------------- -- 42.7/46.2 MB 4.4 MB/s eta 0:00:01\n",
507
+ " ------------------------------------- -- 43.8/46.2 MB 4.4 MB/s eta 0:00:01\n",
508
+ " -------------------------------------- - 44.8/46.2 MB 4.4 MB/s eta 0:00:01\n",
509
+ " --------------------------------------- 45.6/46.2 MB 4.4 MB/s eta 0:00:01\n",
510
+ " --------------------------------------- 46.1/46.2 MB 4.4 MB/s eta 0:00:01\n",
511
+ " ---------------------------------------- 46.2/46.2 MB 4.4 MB/s eta 0:00:00\n",
512
+ "Downloading gradio_client-1.8.0-py3-none-any.whl (322 kB)\n",
513
+ "Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
514
+ "Downloading fastapi-0.115.11-py3-none-any.whl (94 kB)\n",
515
+ "Downloading fsspec-2025.3.0-py3-none-any.whl (193 kB)\n",
516
+ "Downloading groovy-0.1.2-py3-none-any.whl (14 kB)\n",
517
+ "Downloading orjson-3.10.15-cp312-cp312-win_amd64.whl (133 kB)\n",
518
+ "Downloading pydantic-2.10.6-py3-none-any.whl (431 kB)\n",
519
+ "Downloading pydantic_core-2.27.2-cp312-cp312-win_amd64.whl (2.0 MB)\n",
520
+ " ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
521
+ " --------------------- ------------------ 1.0/2.0 MB 6.3 MB/s eta 0:00:01\n",
522
+ " ---------------------------------------- 2.0/2.0 MB 4.6 MB/s eta 0:00:00\n",
523
+ "Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)\n",
524
+ "Downloading ruff-0.11.2-py3-none-win_amd64.whl (11.4 MB)\n",
525
+ " ---------------------------------------- 0.0/11.4 MB ? eta -:--:--\n",
526
+ " --- ------------------------------------ 1.0/11.4 MB 5.6 MB/s eta 0:00:02\n",
527
+ " ------ --------------------------------- 1.8/11.4 MB 4.8 MB/s eta 0:00:02\n",
528
+ " ---------- ----------------------------- 2.9/11.4 MB 4.5 MB/s eta 0:00:02\n",
529
+ " ------------- -------------------------- 3.9/11.4 MB 4.6 MB/s eta 0:00:02\n",
530
+ " ----------------- ---------------------- 5.0/11.4 MB 4.7 MB/s eta 0:00:02\n",
531
+ " --------------------- ------------------ 6.0/11.4 MB 4.8 MB/s eta 0:00:02\n",
532
+ " ----------------------- ---------------- 6.8/11.4 MB 4.7 MB/s eta 0:00:01\n",
533
+ " --------------------------- ------------ 7.9/11.4 MB 4.7 MB/s eta 0:00:01\n",
534
+ " ------------------------------ --------- 8.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
535
+ " ---------------------------------- ----- 9.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
536
+ " ------------------------------------- -- 10.7/11.4 MB 4.6 MB/s eta 0:00:01\n",
537
+ " ---------------------------------------- 11.4/11.4 MB 4.6 MB/s eta 0:00:00\n",
538
+ "Downloading safehttpx-0.1.6-py3-none-any.whl (8.7 kB)\n",
539
+ "Using cached safetensors-0.5.3-cp38-abi3-win_amd64.whl (308 kB)\n",
540
+ "Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
541
+ "Downloading starlette-0.46.1-py3-none-any.whl (71 kB)\n",
542
+ "Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl (2.4 MB)\n",
543
+ " ---------------------------------------- 0.0/2.4 MB ? eta -:--:--\n",
544
+ " -------- ------------------------------- 0.5/2.4 MB 3.4 MB/s eta 0:00:01\n",
545
+ " --------------------- ------------------ 1.3/2.4 MB 3.5 MB/s eta 0:00:01\n",
546
+ " ---------------------------------- ----- 2.1/2.4 MB 3.4 MB/s eta 0:00:01\n",
547
+ " ---------------------------------------- 2.4/2.4 MB 3.3 MB/s eta 0:00:00\n",
548
+ "Downloading tomlkit-0.13.2-py3-none-any.whl (37 kB)\n",
549
+ "Downloading typer-0.15.2-py3-none-any.whl (45 kB)\n",
550
+ "Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)\n",
551
+ "Downloading uvicorn-0.34.0-py3-none-any.whl (62 kB)\n",
552
+ "Downloading ffmpy-0.5.0-py3-none-any.whl (6.0 kB)\n",
553
+ "Using cached filelock-3.18.0-py3-none-any.whl (16 kB)\n",
554
+ "Using cached networkx-3.4.2-py3-none-any.whl (1.7 MB)\n",
555
+ "Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
556
+ "Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)\n",
557
+ "Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)\n",
558
+ "Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n",
559
+ "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",
560
+ " Attempting uninstall: typing-extensions\n",
561
+ " Found existing installation: typing_extensions 4.10.0\n",
562
+ " Uninstalling typing_extensions-4.10.0:\n",
563
+ " Successfully uninstalled typing_extensions-4.10.0\n",
564
+ "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"
565
+ ]
566
+ }
567
+ ],
568
+ "source": [
569
+ "# Reinstall required dependencies\n",
570
+ "!pip install torch torchaudio transformers huggingface_hub gradio"
571
+ ]
572
+ },
573
+ {
574
+ "cell_type": "markdown",
575
+ "metadata": {
576
+ "id": "ssphqLJugbrI"
577
+ },
578
+ "source": []
579
+ },
580
+ {
581
+ "cell_type": "code",
582
+ "execution_count": 2,
583
+ "metadata": {
584
+ "colab": {
585
+ "base_uri": "https://localhost:8080/"
586
+ },
587
+ "collapsed": true,
588
+ "id": "ObK_fhW7iCAn",
589
+ "outputId": "a483389f-82f3-4d07-e1b5-6cc4c73bae21"
590
+ },
591
+ "outputs": [
592
+ {
593
+ "name": "stdout",
594
+ "output_type": "stream",
595
+ "text": [
596
+ "c:\\Users\\PALLAVI\\csm-google-collab\\csm-google-collab\n"
597
+ ]
598
+ },
599
+ {
600
+ "name": "stderr",
601
+ "output_type": "stream",
602
+ "text": [
603
+ "Cloning into 'csm-google-collab'...\n",
604
+ "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",
605
+ " self.shell.db['dhist'] = compress_dhist(dhist)[-100:]\n"
606
+ ]
607
+ }
608
+ ],
609
+ "source": [
610
+ "# Clone the Sesame CSM repository\n",
611
+ "!git clone https://github.com/Justmalhar/csm-google-collab.git\n",
612
+ "%cd csm-google-collab"
613
+ ]
614
+ },
615
+ {
616
+ "cell_type": "code",
617
+ "execution_count": 3,
618
+ "metadata": {
619
+ "colab": {
620
+ "base_uri": "https://localhost:8080/"
621
+ },
622
+ "collapsed": true,
623
+ "id": "cr1XnB10Zf4z",
624
+ "outputId": "d5d175fe-6c10-4b6d-9ffb-d40b29adcd04"
625
+ },
626
+ "outputs": [
627
+ {
628
+ "name": "stderr",
629
+ "output_type": "stream",
630
+ "text": [
631
+ "ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/content/csm/requirements.txt'\n"
632
+ ]
633
+ }
634
+ ],
635
+ "source": [
636
+ "# Install dependencies from requirements.txt\n",
637
+ "!pip install -r /content/csm/requirements.txt"
638
+ ]
639
+ },
640
+ {
641
+ "cell_type": "code",
642
+ "execution_count": 4,
643
+ "metadata": {
644
+ "id": "YV8hf1Y7iEl0"
645
+ },
646
+ "outputs": [],
647
+ "source": [
648
+ "#Add the repository to Python's path\n",
649
+ "import sys\n",
650
+ "sys.path.append(\"/content/csm\")"
651
+ ]
652
+ },
653
+ {
654
+ "cell_type": "code",
655
+ "execution_count": 5,
656
+ "metadata": {
657
+ "collapsed": true,
658
+ "id": "8AvFx6f4iMSW"
659
+ },
660
+ "outputs": [
661
+ {
662
+ "name": "stderr",
663
+ "output_type": "stream",
664
+ "text": [
665
+ "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",
666
+ " warnings.warn(\n"
667
+ ]
668
+ }
669
+ ],
670
+ "source": [
671
+ "# Authenticate with Hugging Face\n",
672
+ "from huggingface_hub import notebook_login\n",
673
+ "notebook_login(\"\")"
674
+ ]
675
+ },
676
+ {
677
+ "cell_type": "code",
678
+ "execution_count": null,
679
+ "metadata": {
680
+ "colab": {
681
+ "base_uri": "https://localhost:8080/",
682
+ "height": 356
683
+ },
684
+ "collapsed": true,
685
+ "id": "3CsTqgqZiUls",
686
+ "outputId": "8966902a-5d4d-4ba4-f8f7-12e6830cf676"
687
+ },
688
+ "outputs": [
689
+ {
690
+ "ename": "OSError",
691
+ "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.",
692
+ "output_type": "error",
693
+ "traceback": [
694
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
695
+ "\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
696
+ "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",
697
+ "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",
698
+ "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.<locals>._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",
699
+ "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",
700
+ "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",
701
+ "\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."
702
+ ]
703
+ }
704
+ ],
705
+ "source": [
706
+ "# Load the Model\n",
707
+ "from transformers import AutoModel, AutoConfig\n",
708
+ "import torch\n",
709
+ "\n",
710
+ "# Load the configuration\n",
711
+ "config = AutoConfig.from_pretrained(\"sesame/csm-1b\")\n",
712
+ "\n",
713
+ "# Load the model with the configuration\n",
714
+ "model = AutoModel.from_pretrained(\"sesame/csm-1b\", config=config)\n",
715
+ "model.to(device=\"cuda\", dtype=torch.bfloat16)\n",
716
+ "print(\"Model loaded successfully!\")"
717
+ ]
718
+ },
719
+ {
720
+ "cell_type": "code",
721
+ "execution_count": null,
722
+ "metadata": {
723
+ "id": "mdpfkA6qiZaZ"
724
+ },
725
+ "outputs": [],
726
+ "source": [
727
+ "# Define the generate_audio function (replace with your actual implementation)\n",
728
+ "def generate_audio(text, speaker_id):\n",
729
+ " \"\"\"\n",
730
+ " Placeholder function for generating audio from text.\n",
731
+ " Replace this with your actual implementation.\n",
732
+ " \"\"\"\n",
733
+ " # Simulate audio generation\n",
734
+ " print(f\"Generating audio for text: {text} with speaker ID: {speaker_id}\")\n",
735
+ " # Return a placeholder audio file path\n",
736
+ " return \"/content/dummy_audio.wav\"\n"
737
+ ]
738
+ },
739
+ {
740
+ "cell_type": "code",
741
+ "execution_count": null,
742
+ "metadata": {
743
+ "id": "Whv2TT-CdFBq"
744
+ },
745
+ "outputs": [],
746
+ "source": [
747
+ "# Define the Gradio interface using Blocks API\n",
748
+ "import gradio as gr\n",
749
+ "\n",
750
+ "with gr.Blocks(title=\"Sesame CSM-1B Text-to-Speech\") as demo:\n",
751
+ " gr.Markdown(\"# 🎙️ Sesame CSM-1B Text-to-Speech\")\n",
752
+ " gr.Markdown(\"Generate high-quality audio from text using the Sesame CSM-1B model.\")\n",
753
+ "\n",
754
+ " with gr.Row():\n",
755
+ " with gr.Column():\n",
756
+ " # Text input\n",
757
+ " text_input = gr.Textbox(label=\"Enter Text\", placeholder=\"Type your text here...\", lines=5)\n",
758
+ "\n",
759
+ " # Speaker selection\n",
760
+ " speaker_dropdown = gr.Dropdown(\n",
761
+ " choices=[\"Speaker 0\", \"Speaker 1\", \"Speaker 2\", \"Speaker 3\"], # Add more options if needed\n",
762
+ " label=\"Select Speaker\",\n",
763
+ " value=\"Speaker 0\"\n",
764
+ " )\n",
765
+ "\n",
766
+ " # File upload for text\n",
767
+ " file_upload = gr.File(label=\"Or Upload a Text File\", file_types=[\".txt\"])\n",
768
+ "\n",
769
+ " # Generate and Cancel buttons\n",
770
+ " with gr.Row():\n",
771
+ " generate_button = gr.Button(\"Generate Audio 🎵\")\n",
772
+ " cancel_button = gr.Button(\"Cancel ❌\")\n",
773
+ "\n",
774
+ " with gr.Column():\n",
775
+ " # Audio output\n",
776
+ " audio_output = gr.Audio(label=\"Generated Audio\", interactive=False)\n",
777
+ "\n",
778
+ " # Playback controls\n",
779
+ " with gr.Row():\n",
780
+ " play_button = gr.Button(\"▶️ Play\")\n",
781
+ " pause_button = gr.Button(\"⏸️ Pause\")\n",
782
+ " stop_button = gr.Button(\"⏹️ Stop\")\n",
783
+ "\n",
784
+ " # Volume control\n",
785
+ " volume_slider = gr.Slider(minimum=0, maximum=100, value=50, label=\"Volume\")\n",
786
+ "\n",
787
+ " # Define interactions\n",
788
+ " def process_input(text, file, speaker, cancel_flag):\n",
789
+ " if cancel_flag:\n",
790
+ " return \"Process canceled by user.\"\n",
791
+ "\n",
792
+ " if file is not None:\n",
793
+ " # Read text from the uploaded file\n",
794
+ " with open(file.name, \"r\") as f:\n",
795
+ " text = f.read()\n",
796
+ "\n",
797
+ " # Get speaker ID from the dropdown\n",
798
+ " speaker_id = int(speaker.split()[-1])\n",
799
+ "\n",
800
+ " # Generate audio\n",
801
+ " audio_file = generate_audio(text, speaker_id)\n",
802
+ " return audio_file\n",
803
+ "\n",
804
+ " # Link inputs and outputs\n",
805
+ " generate_button.click(\n",
806
+ " fn=process_input,\n",
807
+ " inputs=[text_input, file_upload, speaker_dropdown, cancel_button],\n",
808
+ " outputs=audio_output\n",
809
+ " )\n",
810
+ "\n",
811
+ " # Cancel button logic\n",
812
+ " cancel_button.click(\n",
813
+ " fn=lambda: \"Process canceled by user.\",\n",
814
+ " inputs=None,\n",
815
+ " outputs=audio_output\n",
816
+ " )\n",
817
+ "\n",
818
+ " # Playback controls (placeholders, as Gradio Audio already has built-in controls)\n",
819
+ " play_button.click(fn=lambda: None)\n",
820
+ " pause_button.click(fn=lambda: None)\n",
821
+ " stop_button.click(fn=lambda: None)\n",
822
+ "\n",
823
+ "# Launch the Gradio app\n",
824
+ "demo.launch(share=True) # Set `share=True` to get a public link"
825
+ ]
826
+ }
827
+ ],
828
+ "metadata": {
829
+ "accelerator": "GPU",
830
+ "colab": {
831
+ "gpuType": "T4",
832
+ "include_colab_link": true,
833
+ "provenance": []
834
+ },
835
+ "kernelspec": {
836
+ "display_name": "Python 3",
837
+ "name": "python3"
838
+ },
839
+ "language_info": {
840
+ "codemirror_mode": {
841
+ "name": "ipython",
842
+ "version": 3
843
+ },
844
+ "file_extension": ".py",
845
+ "mimetype": "text/x-python",
846
+ "name": "python",
847
+ "nbconvert_exporter": "python",
848
+ "pygments_lexer": "ipython3",
849
+ "version": "3.12.6"
850
+ }
851
+ },
852
+ "nbformat": 4,
853
+ "nbformat_minor": 0
854
+ }
csm-google-collab ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit 3b40a8aa6b18f3b77eaae597913f7a6522b95251