hysts HF Staff commited on
Commit
1fef2ec
·
1 Parent(s): 2a782f1
Files changed (7) hide show
  1. .pre-commit-config.yaml +3 -3
  2. .python-version +1 -1
  3. README.md +2 -1
  4. app.py +46 -38
  5. pyproject.toml +16 -8
  6. requirements.txt +171 -104
  7. uv.lock +0 -0
.pre-commit-config.yaml CHANGED
@@ -1,6 +1,6 @@
1
  repos:
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v5.0.0
4
  hooks:
5
  - id: check-executables-have-shebangs
6
  - id: check-json
@@ -14,13 +14,13 @@ repos:
14
  - id: requirements-txt-fixer
15
  - id: trailing-whitespace
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
17
- rev: v0.12.0
18
  hooks:
19
  - id: ruff-check
20
  args: ["--fix"]
21
  - id: ruff-format
22
  - repo: https://github.com/pre-commit/mirrors-mypy
23
- rev: v1.16.1
24
  hooks:
25
  - id: mypy
26
  args: ["--ignore-missing-imports"]
 
1
  repos:
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
  hooks:
5
  - id: check-executables-have-shebangs
6
  - id: check-json
 
14
  - id: requirements-txt-fixer
15
  - id: trailing-whitespace
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.15.4
18
  hooks:
19
  - id: ruff-check
20
  args: ["--fix"]
21
  - id: ruff-format
22
  - repo: https://github.com/pre-commit/mirrors-mypy
23
+ rev: v1.19.1
24
  hooks:
25
  - id: mypy
26
  args: ["--ignore-missing-imports"]
.python-version CHANGED
@@ -1 +1 @@
1
- 3.10
 
1
+ 3.12
README.md CHANGED
@@ -4,7 +4,8 @@ emoji: ⚡
4
  colorFrom: red
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.40.0
 
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: red
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 6.8.0
8
+ python_version: "3.12"
9
  app_file: app.py
10
  pinned: false
11
  ---
app.py CHANGED
@@ -9,13 +9,13 @@ import gradio as gr
9
  import spaces
10
  import torch
11
  from gradio.utils import get_upload_folder
12
- from transformers import AutoModelForImageTextToText, AutoProcessor
13
  from transformers.generation.streamers import TextIteratorStreamer
14
 
15
- model_id = "google/gemma-3n-E4B-it"
16
 
17
- processor = AutoProcessor.from_pretrained(model_id)
18
- model = AutoModelForImageTextToText.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16)
19
 
20
  IMAGE_FILE_TYPES = (".jpg", ".jpeg", ".png", ".webp")
21
  VIDEO_FILE_TYPES = (".mp4", ".mov", ".webm")
@@ -50,15 +50,12 @@ def count_files_in_new_message(paths: list[str]) -> tuple[int, int]:
50
  return video_count, non_video_count
51
 
52
 
53
- def validate_media_constraints(message: dict) -> bool:
54
  video_count, non_video_count = count_files_in_new_message(message["files"])
55
  if video_count > 1:
56
- gr.Warning("Only one video is supported.")
57
- return False
58
  if video_count == 1 and non_video_count > 0:
59
- gr.Warning("Mixing images and videos is not allowed.")
60
- return False
61
- return True
62
 
63
 
64
  def extract_frames_to_tempdir(
@@ -154,10 +151,42 @@ def process_history(history: list[dict]) -> list[dict]:
154
 
155
  @spaces.GPU(duration=120)
156
  @torch.inference_mode()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  def generate(message: dict, history: list[dict], system_prompt: str = "", max_new_tokens: int = 512) -> Iterator[str]:
158
- if not validate_media_constraints(message):
159
- yield ""
160
- return
161
 
162
  messages = []
163
  if system_prompt:
@@ -174,29 +203,10 @@ def generate(message: dict, history: list[dict], system_prompt: str = "", max_ne
174
  )
175
  n_tokens = inputs["input_ids"].shape[1]
176
  if n_tokens > MAX_INPUT_TOKENS:
177
- gr.Warning(
178
- f"Input too long. Max {MAX_INPUT_TOKENS} tokens. Got {n_tokens} tokens. This limit is set to avoid CUDA out-of-memory errors in this Space."
179
- )
180
- yield ""
181
- return
182
-
183
- inputs = inputs.to(device=model.device, dtype=torch.bfloat16)
184
-
185
- streamer = TextIteratorStreamer(processor, timeout=30.0, skip_prompt=True, skip_special_tokens=True)
186
- generate_kwargs = dict(
187
- inputs,
188
- streamer=streamer,
189
- max_new_tokens=max_new_tokens,
190
- do_sample=False,
191
- disable_compile=True,
192
- )
193
- t = Thread(target=model.generate, kwargs=generate_kwargs)
194
- t.start()
195
 
196
- output = ""
197
- for delta in streamer:
198
- output += delta
199
- yield output
200
 
201
 
202
  examples = [
@@ -234,7 +244,6 @@ examples = [
234
 
235
  demo = gr.ChatInterface(
236
  fn=generate,
237
- type="messages",
238
  textbox=gr.MultimodalTextbox(
239
  file_types=list(IMAGE_FILE_TYPES + VIDEO_FILE_TYPES + AUDIO_FILE_TYPES),
240
  file_count="multiple",
@@ -250,9 +259,8 @@ demo = gr.ChatInterface(
250
  examples=examples,
251
  run_examples_on_click=False,
252
  cache_examples=False,
253
- css_paths="style.css",
254
  delete_cache=(1800, 1800),
255
  )
256
 
257
  if __name__ == "__main__":
258
- demo.launch()
 
9
  import spaces
10
  import torch
11
  from gradio.utils import get_upload_folder
12
+ from transformers import AutoModelForImageTextToText, AutoProcessor, BatchFeature
13
  from transformers.generation.streamers import TextIteratorStreamer
14
 
15
+ MODEL_ID = "google/gemma-3n-E4B-it"
16
 
17
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
18
+ model = AutoModelForImageTextToText.from_pretrained(MODEL_ID, device_map="auto", torch_dtype=torch.bfloat16)
19
 
20
  IMAGE_FILE_TYPES = (".jpg", ".jpeg", ".png", ".webp")
21
  VIDEO_FILE_TYPES = (".mp4", ".mov", ".webm")
 
50
  return video_count, non_video_count
51
 
52
 
53
+ def validate_media_constraints(message: dict) -> None:
54
  video_count, non_video_count = count_files_in_new_message(message["files"])
55
  if video_count > 1:
56
+ raise gr.Error("Only one video is supported.")
 
57
  if video_count == 1 and non_video_count > 0:
58
+ raise gr.Error("Mixing images and videos is not allowed.")
 
 
59
 
60
 
61
  def extract_frames_to_tempdir(
 
151
 
152
  @spaces.GPU(duration=120)
153
  @torch.inference_mode()
154
+ def _generate_on_gpu(inputs: BatchFeature, max_new_tokens: int) -> Iterator[str]:
155
+ inputs = inputs.to(device=model.device, dtype=torch.bfloat16)
156
+
157
+ streamer = TextIteratorStreamer(processor, timeout=30.0, skip_prompt=True, skip_special_tokens=True)
158
+ generate_kwargs = {
159
+ **inputs,
160
+ "streamer": streamer,
161
+ "max_new_tokens": max_new_tokens,
162
+ "do_sample": False,
163
+ "disable_compile": True,
164
+ }
165
+
166
+ exception_holder: list[Exception] = []
167
+
168
+ def _generate() -> None:
169
+ try:
170
+ model.generate(**generate_kwargs)
171
+ except Exception as e: # noqa: BLE001
172
+ exception_holder.append(e)
173
+
174
+ thread = Thread(target=_generate)
175
+ thread.start()
176
+
177
+ chunks: list[str] = []
178
+ for text in streamer:
179
+ chunks.append(text)
180
+ yield "".join(chunks)
181
+
182
+ thread.join()
183
+ if exception_holder:
184
+ msg = f"Generation failed: {exception_holder[0]}"
185
+ raise gr.Error(msg)
186
+
187
+
188
  def generate(message: dict, history: list[dict], system_prompt: str = "", max_new_tokens: int = 512) -> Iterator[str]:
189
+ validate_media_constraints(message)
 
 
190
 
191
  messages = []
192
  if system_prompt:
 
203
  )
204
  n_tokens = inputs["input_ids"].shape[1]
205
  if n_tokens > MAX_INPUT_TOKENS:
206
+ msg = f"Input too long ({n_tokens} tokens). Maximum is {MAX_INPUT_TOKENS} tokens."
207
+ raise gr.Error(msg)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
+ yield from _generate_on_gpu(inputs=inputs, max_new_tokens=max_new_tokens)
 
 
 
210
 
211
 
212
  examples = [
 
244
 
245
  demo = gr.ChatInterface(
246
  fn=generate,
 
247
  textbox=gr.MultimodalTextbox(
248
  file_types=list(IMAGE_FILE_TYPES + VIDEO_FILE_TYPES + AUDIO_FILE_TYPES),
249
  file_count="multiple",
 
259
  examples=examples,
260
  run_examples_on_click=False,
261
  cache_examples=False,
 
262
  delete_cache=(1800, 1800),
263
  )
264
 
265
  if __name__ == "__main__":
266
+ demo.launch(css_paths="style.css")
pyproject.toml CHANGED
@@ -3,18 +3,17 @@ name = "gemma-3n-e4b-it"
3
  version = "0.1.0"
4
  description = ""
5
  readme = "README.md"
6
- requires-python = ">=3.10"
7
  dependencies = [
8
- "accelerate>=1.9.0",
9
  "av>=14.4.0",
10
- "gradio>=5.40.0",
11
- "hf-transfer>=0.1.9",
12
  "librosa>=0.11.0",
13
- "spaces>=0.39.0",
14
  "timm>=1.0.16",
15
- "torch==2.5.1",
16
  "torchvision>=0.20.1",
17
- "transformers>=4.54.1",
18
  ]
19
 
20
  [tool.ruff]
@@ -39,7 +38,7 @@ ignore = [
39
  "EM101", # raw-string-in-exception
40
  "FBT001", # boolean-type-hint-positional-argument
41
  "FBT002", # boolean-default-value-positional-argument
42
- "PD901", # pandas-df-variable-name
43
  "PGH003", # blanket-type-ignore
44
  "PLR0913", # too-many-arguments
45
  "PLR0915", # too-many-statements
@@ -57,3 +56,12 @@ convention = "google"
57
 
58
  [tool.ruff.format]
59
  docstring-code-format = true
 
 
 
 
 
 
 
 
 
 
3
  version = "0.1.0"
4
  description = ""
5
  readme = "README.md"
6
+ requires-python = ">=3.12"
7
  dependencies = [
8
+ "accelerate>=1.12.0",
9
  "av>=14.4.0",
10
+ "gradio>=6.8.0",
 
11
  "librosa>=0.11.0",
12
+ "spaces>=0.47.0",
13
  "timm>=1.0.16",
14
+ "torch==2.9.1",
15
  "torchvision>=0.20.1",
16
+ "transformers>=5.2.0",
17
  ]
18
 
19
  [tool.ruff]
 
38
  "EM101", # raw-string-in-exception
39
  "FBT001", # boolean-type-hint-positional-argument
40
  "FBT002", # boolean-default-value-positional-argument
41
+ "ISC001", # single-line-implicit-string-concatenation
42
  "PGH003", # blanket-type-ignore
43
  "PLR0913", # too-many-arguments
44
  "PLR0915", # too-many-statements
 
56
 
57
  [tool.ruff.format]
58
  docstring-code-format = true
59
+
60
+ [dependency-groups]
61
+ dev = [
62
+ "pre-commit>=4.5.1",
63
+ "ruff>=0.15.4",
64
+ ]
65
+ hf-spaces = [
66
+ "datasets",
67
+ ]
requirements.txt CHANGED
@@ -1,59 +1,87 @@
1
  # This file was autogenerated by uv via the following command:
2
- # uv pip compile pyproject.toml -o requirements.txt
3
- accelerate==1.9.0
4
- # via gemma-3n-e4b-it (pyproject.toml)
5
  aiofiles==24.1.0
6
  # via gradio
 
 
 
 
 
 
 
 
 
 
7
  annotated-types==0.7.0
8
  # via pydantic
9
- anyio==4.10.0
10
  # via
11
  # gradio
12
  # httpx
13
  # starlette
14
- audioread==3.0.1
 
 
 
 
 
 
 
15
  # via librosa
16
- av==15.0.0
17
- # via gemma-3n-e4b-it (pyproject.toml)
18
- brotli==1.1.0
19
  # via gradio
20
- certifi==2025.8.3
21
  # via
22
  # httpcore
23
  # httpx
24
  # requests
25
- cffi==1.17.1
26
  # via soundfile
27
- charset-normalizer==3.4.2
28
  # via requests
29
- click==8.2.1
30
  # via
31
  # typer
32
  # uvicorn
 
 
 
 
 
33
  decorator==5.2.1
34
  # via librosa
35
- exceptiongroup==1.3.0
36
- # via anyio
37
- fastapi==0.116.1
 
 
38
  # via gradio
39
- ffmpy==0.6.1
40
  # via gradio
41
- filelock==3.18.0
42
  # via
 
43
  # huggingface-hub
44
  # torch
45
- # transformers
46
- # triton
47
- fsspec==2025.7.0
48
  # via
 
 
 
 
 
49
  # gradio-client
50
  # huggingface-hub
51
  # torch
52
- gradio==5.40.0
53
  # via
54
- # gemma-3n-e4b-it (pyproject.toml)
55
  # spaces
56
- gradio-client==1.11.0
57
  # via gradio
58
  groovy==0.1.2
59
  # via gradio
@@ -61,48 +89,50 @@ h11==0.16.0
61
  # via
62
  # httpcore
63
  # uvicorn
64
- hf-transfer==0.1.9
65
- # via gemma-3n-e4b-it (pyproject.toml)
66
- hf-xet==1.1.5
67
  # via huggingface-hub
68
  httpcore==1.0.9
69
  # via httpx
70
  httpx==0.28.1
71
  # via
 
72
  # gradio
73
  # gradio-client
 
74
  # safehttpx
75
  # spaces
76
- huggingface-hub==0.34.3
77
  # via
78
  # accelerate
 
79
  # gradio
80
  # gradio-client
81
  # timm
82
  # tokenizers
83
  # transformers
84
- idna==3.10
85
  # via
86
  # anyio
87
  # httpx
88
  # requests
 
89
  jinja2==3.1.6
90
  # via
91
  # gradio
92
  # torch
93
- joblib==1.5.1
94
  # via
95
  # librosa
96
  # scikit-learn
97
  lazy-loader==0.4
98
  # via librosa
99
  librosa==0.11.0
100
- # via gemma-3n-e4b-it (pyproject.toml)
101
- llvmlite==0.44.0
102
  # via numba
103
- markdown-it-py==3.0.0
104
  # via rich
105
- markupsafe==3.0.2
106
  # via
107
  # gradio
108
  # jinja2
@@ -110,15 +140,22 @@ mdurl==0.1.2
110
  # via markdown-it-py
111
  mpmath==1.3.0
112
  # via sympy
113
- msgpack==1.1.1
114
  # via librosa
115
- networkx==3.4.2
 
 
 
 
 
 
116
  # via torch
117
- numba==0.61.2
118
  # via librosa
119
- numpy==2.2.6
120
  # via
121
  # accelerate
 
122
  # gradio
123
  # librosa
124
  # numba
@@ -129,43 +166,51 @@ numpy==2.2.6
129
  # soxr
130
  # torchvision
131
  # transformers
132
- nvidia-cublas-cu12==12.4.5.8
133
  # via
134
  # nvidia-cudnn-cu12
135
  # nvidia-cusolver-cu12
136
  # torch
137
- nvidia-cuda-cupti-cu12==12.4.127
 
 
138
  # via torch
139
- nvidia-cuda-nvrtc-cu12==12.4.127
140
  # via torch
141
- nvidia-cuda-runtime-cu12==12.4.127
142
  # via torch
143
- nvidia-cudnn-cu12==9.1.0.70
144
  # via torch
145
- nvidia-cufft-cu12==11.2.1.3
146
  # via torch
147
- nvidia-curand-cu12==10.3.5.147
148
  # via torch
149
- nvidia-cusolver-cu12==11.6.1.9
150
  # via torch
151
- nvidia-cusparse-cu12==12.3.1.170
152
  # via
153
  # nvidia-cusolver-cu12
154
  # torch
155
- nvidia-nccl-cu12==2.21.5
 
 
156
  # via torch
157
- nvidia-nvjitlink-cu12==12.4.127
158
  # via
 
159
  # nvidia-cusolver-cu12
160
  # nvidia-cusparse-cu12
161
  # torch
162
- nvidia-nvtx-cu12==12.4.127
163
  # via torch
164
- orjson==3.11.1
 
 
165
  # via gradio
166
- packaging==25.0
167
  # via
168
  # accelerate
 
169
  # gradio
170
  # gradio-client
171
  # huggingface-hub
@@ -173,28 +218,36 @@ packaging==25.0
173
  # pooch
174
  # spaces
175
  # transformers
176
- pandas==2.3.1
177
- # via gradio
178
- pillow==11.3.0
 
 
179
  # via
180
  # gradio
181
  # torchvision
182
- platformdirs==4.3.8
183
  # via pooch
184
- pooch==1.8.2
185
  # via librosa
 
 
 
 
186
  psutil==5.9.8
187
  # via
188
  # accelerate
189
  # spaces
190
- pycparser==2.22
 
 
191
  # via cffi
192
- pydantic==2.11.7
193
  # via
194
  # fastapi
195
  # gradio
196
  # spaces
197
- pydantic-core==2.33.2
198
  # via pydantic
199
  pydub==0.25.1
200
  # via gradio
@@ -202,94 +255,106 @@ pygments==2.19.2
202
  # via rich
203
  python-dateutil==2.9.0.post0
204
  # via pandas
205
- python-multipart==0.0.20
206
  # via gradio
207
  pytz==2025.2
208
- # via pandas
209
- pyyaml==6.0.2
210
  # via
211
  # accelerate
 
212
  # gradio
213
  # huggingface-hub
214
  # timm
215
  # transformers
216
- regex==2025.7.34
217
  # via transformers
218
- requests==2.32.4
219
  # via
220
- # huggingface-hub
221
  # pooch
222
  # spaces
223
- # transformers
224
- rich==14.1.0
225
  # via typer
226
- ruff==0.12.7
227
  # via gradio
228
- safehttpx==0.1.6
229
- # via gradio
230
- safetensors==0.5.3
231
  # via
232
  # accelerate
233
  # timm
234
  # transformers
235
- scikit-learn==1.7.1
236
  # via librosa
237
- scipy==1.15.3
238
  # via
239
  # librosa
240
  # scikit-learn
241
  semantic-version==2.10.0
242
  # via gradio
 
 
243
  shellingham==1.5.4
244
  # via typer
245
  six==1.17.0
246
  # via python-dateutil
247
- sniffio==1.3.1
248
- # via anyio
249
  soundfile==0.13.1
250
  # via librosa
251
- soxr==0.5.0.post1
252
  # via librosa
253
- spaces==0.39.0
254
- # via gemma-3n-e4b-it (pyproject.toml)
255
- starlette==0.47.2
 
 
 
 
 
 
 
 
 
 
256
  # via
257
  # fastapi
258
  # gradio
259
- sympy==1.13.1
260
  # via torch
261
  threadpoolctl==3.6.0
262
  # via scikit-learn
263
- timm==1.0.19
264
- # via gemma-3n-e4b-it (pyproject.toml)
265
- tokenizers==0.21.4
266
  # via transformers
267
  tomlkit==0.13.3
268
  # via gradio
269
- torch==2.5.1
270
  # via
271
- # gemma-3n-e4b-it (pyproject.toml)
272
  # accelerate
 
273
  # timm
274
  # torchvision
275
- torchvision==0.20.1
276
  # via
277
- # gemma-3n-e4b-it (pyproject.toml)
278
  # timm
279
- tqdm==4.67.1
280
  # via
 
281
  # huggingface-hub
282
  # transformers
283
- transformers==4.54.1
284
- # via gemma-3n-e4b-it (pyproject.toml)
285
- triton==3.1.0
286
  # via torch
287
- typer==0.16.0
288
- # via gradio
289
- typing-extensions==4.14.1
290
  # via
 
 
 
 
 
 
291
  # anyio
292
- # exceptiongroup
293
  # fastapi
294
  # gradio
295
  # gradio-client
@@ -300,16 +365,18 @@ typing-extensions==4.14.1
300
  # spaces
301
  # starlette
302
  # torch
303
- # typer
304
  # typing-inspection
305
- # uvicorn
306
- typing-inspection==0.4.1
307
- # via pydantic
308
- tzdata==2025.2
 
309
  # via pandas
310
- urllib3==2.5.0
311
  # via requests
312
- uvicorn==0.35.0
313
  # via gradio
314
- websockets==15.0.1
315
- # via gradio-client
 
 
 
1
  # This file was autogenerated by uv via the following command:
2
+ # uv export --no-hashes --no-dev --group hf-spaces --no-emit-package typer-slim -o requirements.txt
3
+ accelerate==1.12.0
4
+ # via gemma-3n-e4b-it
5
  aiofiles==24.1.0
6
  # via gradio
7
+ aiohappyeyeballs==2.6.1
8
+ # via aiohttp
9
+ aiohttp==3.13.3
10
+ # via fsspec
11
+ aiosignal==1.4.0
12
+ # via aiohttp
13
+ annotated-doc==0.0.4
14
+ # via
15
+ # fastapi
16
+ # typer
17
  annotated-types==0.7.0
18
  # via pydantic
19
+ anyio==4.12.1
20
  # via
21
  # gradio
22
  # httpx
23
  # starlette
24
+ attrs==25.4.0
25
+ # via aiohttp
26
+ audioop-lts==0.2.2 ; python_full_version >= '3.13'
27
+ # via
28
+ # gradio
29
+ # standard-aifc
30
+ # standard-sunau
31
+ audioread==3.1.0
32
  # via librosa
33
+ av==16.1.0
34
+ # via gemma-3n-e4b-it
35
+ brotli==1.2.0
36
  # via gradio
37
+ certifi==2026.2.25
38
  # via
39
  # httpcore
40
  # httpx
41
  # requests
42
+ cffi==2.0.0
43
  # via soundfile
44
+ charset-normalizer==3.4.4
45
  # via requests
46
+ click==8.3.1
47
  # via
48
  # typer
49
  # uvicorn
50
+ colorama==0.4.6 ; sys_platform == 'win32'
51
+ # via
52
+ # click
53
+ # tqdm
54
+ datasets==4.6.1
55
  decorator==5.2.1
56
  # via librosa
57
+ dill==0.4.0
58
+ # via
59
+ # datasets
60
+ # multiprocess
61
+ fastapi==0.135.1
62
  # via gradio
63
+ ffmpy==1.0.0
64
  # via gradio
65
+ filelock==3.25.0
66
  # via
67
+ # datasets
68
  # huggingface-hub
69
  # torch
70
+ frozenlist==1.8.0
 
 
71
  # via
72
+ # aiohttp
73
+ # aiosignal
74
+ fsspec==2026.2.0
75
+ # via
76
+ # datasets
77
  # gradio-client
78
  # huggingface-hub
79
  # torch
80
+ gradio==6.8.0
81
  # via
82
+ # gemma-3n-e4b-it
83
  # spaces
84
+ gradio-client==2.2.0
85
  # via gradio
86
  groovy==0.1.2
87
  # via gradio
 
89
  # via
90
  # httpcore
91
  # uvicorn
92
+ hf-xet==1.3.2 ; platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'
 
 
93
  # via huggingface-hub
94
  httpcore==1.0.9
95
  # via httpx
96
  httpx==0.28.1
97
  # via
98
+ # datasets
99
  # gradio
100
  # gradio-client
101
+ # huggingface-hub
102
  # safehttpx
103
  # spaces
104
+ huggingface-hub==1.5.0
105
  # via
106
  # accelerate
107
+ # datasets
108
  # gradio
109
  # gradio-client
110
  # timm
111
  # tokenizers
112
  # transformers
113
+ idna==3.11
114
  # via
115
  # anyio
116
  # httpx
117
  # requests
118
+ # yarl
119
  jinja2==3.1.6
120
  # via
121
  # gradio
122
  # torch
123
+ joblib==1.5.3
124
  # via
125
  # librosa
126
  # scikit-learn
127
  lazy-loader==0.4
128
  # via librosa
129
  librosa==0.11.0
130
+ # via gemma-3n-e4b-it
131
+ llvmlite==0.46.0
132
  # via numba
133
+ markdown-it-py==4.0.0
134
  # via rich
135
+ markupsafe==3.0.3
136
  # via
137
  # gradio
138
  # jinja2
 
140
  # via markdown-it-py
141
  mpmath==1.3.0
142
  # via sympy
143
+ msgpack==1.1.2
144
  # via librosa
145
+ multidict==6.7.1
146
+ # via
147
+ # aiohttp
148
+ # yarl
149
+ multiprocess==0.70.18
150
+ # via datasets
151
+ networkx==3.6.1
152
  # via torch
153
+ numba==0.64.0
154
  # via librosa
155
+ numpy==2.4.2
156
  # via
157
  # accelerate
158
+ # datasets
159
  # gradio
160
  # librosa
161
  # numba
 
166
  # soxr
167
  # torchvision
168
  # transformers
169
+ nvidia-cublas-cu12==12.8.4.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
170
  # via
171
  # nvidia-cudnn-cu12
172
  # nvidia-cusolver-cu12
173
  # torch
174
+ nvidia-cuda-cupti-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
175
+ # via torch
176
+ nvidia-cuda-nvrtc-cu12==12.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
177
  # via torch
178
+ nvidia-cuda-runtime-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
179
  # via torch
180
+ nvidia-cudnn-cu12==9.10.2.21 ; platform_machine == 'x86_64' and sys_platform == 'linux'
181
  # via torch
182
+ nvidia-cufft-cu12==11.3.3.83 ; platform_machine == 'x86_64' and sys_platform == 'linux'
183
  # via torch
184
+ nvidia-cufile-cu12==1.13.1.3 ; platform_machine == 'x86_64' and sys_platform == 'linux'
185
  # via torch
186
+ nvidia-curand-cu12==10.3.9.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
187
  # via torch
188
+ nvidia-cusolver-cu12==11.7.3.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
189
  # via torch
190
+ nvidia-cusparse-cu12==12.5.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
191
  # via
192
  # nvidia-cusolver-cu12
193
  # torch
194
+ nvidia-cusparselt-cu12==0.7.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
195
+ # via torch
196
+ nvidia-nccl-cu12==2.27.5 ; platform_machine == 'x86_64' and sys_platform == 'linux'
197
  # via torch
198
+ nvidia-nvjitlink-cu12==12.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
199
  # via
200
+ # nvidia-cufft-cu12
201
  # nvidia-cusolver-cu12
202
  # nvidia-cusparse-cu12
203
  # torch
204
+ nvidia-nvshmem-cu12==3.3.20 ; platform_machine == 'x86_64' and sys_platform == 'linux'
205
  # via torch
206
+ nvidia-nvtx-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
207
+ # via torch
208
+ orjson==3.11.7
209
  # via gradio
210
+ packaging==26.0
211
  # via
212
  # accelerate
213
+ # datasets
214
  # gradio
215
  # gradio-client
216
  # huggingface-hub
 
218
  # pooch
219
  # spaces
220
  # transformers
221
+ pandas==3.0.1
222
+ # via
223
+ # datasets
224
+ # gradio
225
+ pillow==12.1.1
226
  # via
227
  # gradio
228
  # torchvision
229
+ platformdirs==4.9.2
230
  # via pooch
231
+ pooch==1.9.0
232
  # via librosa
233
+ propcache==0.4.1
234
+ # via
235
+ # aiohttp
236
+ # yarl
237
  psutil==5.9.8
238
  # via
239
  # accelerate
240
  # spaces
241
+ pyarrow==23.0.1
242
+ # via datasets
243
+ pycparser==3.0 ; implementation_name != 'PyPy'
244
  # via cffi
245
+ pydantic==2.12.5
246
  # via
247
  # fastapi
248
  # gradio
249
  # spaces
250
+ pydantic-core==2.41.5
251
  # via pydantic
252
  pydub==0.25.1
253
  # via gradio
 
255
  # via rich
256
  python-dateutil==2.9.0.post0
257
  # via pandas
258
+ python-multipart==0.0.22
259
  # via gradio
260
  pytz==2025.2
261
+ # via gradio
262
+ pyyaml==6.0.3
263
  # via
264
  # accelerate
265
+ # datasets
266
  # gradio
267
  # huggingface-hub
268
  # timm
269
  # transformers
270
+ regex==2026.2.28
271
  # via transformers
272
+ requests==2.32.5
273
  # via
274
+ # datasets
275
  # pooch
276
  # spaces
277
+ rich==14.3.3
 
278
  # via typer
279
+ safehttpx==0.1.7
280
  # via gradio
281
+ safetensors==0.7.0
 
 
282
  # via
283
  # accelerate
284
  # timm
285
  # transformers
286
+ scikit-learn==1.8.0
287
  # via librosa
288
+ scipy==1.17.1
289
  # via
290
  # librosa
291
  # scikit-learn
292
  semantic-version==2.10.0
293
  # via gradio
294
+ setuptools==82.0.0
295
+ # via torch
296
  shellingham==1.5.4
297
  # via typer
298
  six==1.17.0
299
  # via python-dateutil
 
 
300
  soundfile==0.13.1
301
  # via librosa
302
+ soxr==1.0.0
303
  # via librosa
304
+ spaces==0.47.0
305
+ # via gemma-3n-e4b-it
306
+ standard-aifc==3.13.0 ; python_full_version >= '3.13'
307
+ # via
308
+ # audioread
309
+ # librosa
310
+ standard-chunk==3.13.0 ; python_full_version >= '3.13'
311
+ # via standard-aifc
312
+ standard-sunau==3.13.0 ; python_full_version >= '3.13'
313
+ # via
314
+ # audioread
315
+ # librosa
316
+ starlette==0.52.1
317
  # via
318
  # fastapi
319
  # gradio
320
+ sympy==1.14.0
321
  # via torch
322
  threadpoolctl==3.6.0
323
  # via scikit-learn
324
+ timm==1.0.25
325
+ # via gemma-3n-e4b-it
326
+ tokenizers==0.22.2
327
  # via transformers
328
  tomlkit==0.13.3
329
  # via gradio
330
+ torch==2.9.1
331
  # via
 
332
  # accelerate
333
+ # gemma-3n-e4b-it
334
  # timm
335
  # torchvision
336
+ torchvision==0.24.1
337
  # via
338
+ # gemma-3n-e4b-it
339
  # timm
340
+ tqdm==4.67.3
341
  # via
342
+ # datasets
343
  # huggingface-hub
344
  # transformers
345
+ transformers==5.2.0
346
+ # via gemma-3n-e4b-it
347
+ triton==3.5.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
348
  # via torch
349
+ typer==0.24.1
 
 
350
  # via
351
+ # gradio
352
+ # huggingface-hub
353
+ # typer-slim
354
+ typing-extensions==4.15.0
355
+ # via
356
+ # aiosignal
357
  # anyio
 
358
  # fastapi
359
  # gradio
360
  # gradio-client
 
365
  # spaces
366
  # starlette
367
  # torch
 
368
  # typing-inspection
369
+ typing-inspection==0.4.2
370
+ # via
371
+ # fastapi
372
+ # pydantic
373
+ tzdata==2025.3 ; sys_platform == 'emscripten' or sys_platform == 'win32'
374
  # via pandas
375
+ urllib3==2.6.3
376
  # via requests
377
+ uvicorn==0.41.0
378
  # via gradio
379
+ xxhash==3.6.0
380
+ # via datasets
381
+ yarl==1.23.0
382
+ # via aiohttp
uv.lock CHANGED
The diff for this file is too large to render. See raw diff