AIencoder commited on
Commit
54f1cb1
Β·
verified Β·
1 Parent(s): 8e908ed

v6: bump to Gradio 5 (fixes Starlette 0.40+ TemplateResponse signature)

Browse files
Files changed (2) hide show
  1. README.md +5 -4
  2. requirements.txt +9 -13
README.md CHANGED
@@ -4,12 +4,12 @@ emoji: πŸŒ€
4
  colorFrom: indigo
5
  colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
  python_version: "3.12"
12
- short_description: Live llama.cpp + Hadamard rotation visualizer (TurboQuant)
13
  ---
14
 
15
  # turbocpp β€” llama.cpp + TurboQuant
@@ -27,8 +27,9 @@ Two tabs:
27
 
28
  ## Build details
29
 
30
- - **Python 3.12** pinned (3.13 dropped stdlib `audioop` which Gradio's
31
- pydub dep needs).
 
32
  - **llama-cpp-python** installed from a **prebuilt wheel** at
33
  [AIencoder/llama-cpp-wheels](https://huggingface.co/datasets/AIencoder/llama-cpp-wheels)
34
  (variant `0.3.16+basic_avx2_fma_f16c-cp312`). HF Spaces don't reliably
 
4
  colorFrom: indigo
5
  colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 5.5.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
  python_version: "3.12"
12
+ short_description: Live llama.cpp + Hadamard rotation demo (TurboQuant)
13
  ---
14
 
15
  # turbocpp β€” llama.cpp + TurboQuant
 
27
 
28
  ## Build details
29
 
30
+ - **Gradio 5** + **Python 3.12** β€” Gradio 4 + new Starlette is broken in
31
+ ways that don't resolve cleanly with version pins (TemplateResponse
32
+ signature change, pydantic schema change), so we just upgrade.
33
  - **llama-cpp-python** installed from a **prebuilt wheel** at
34
  [AIencoder/llama-cpp-wheels](https://huggingface.co/datasets/AIencoder/llama-cpp-wheels)
35
  (variant `0.3.16+basic_avx2_fma_f16c-cp312`). HF Spaces don't reliably
requirements.txt CHANGED
@@ -1,21 +1,17 @@
1
- # Pin tested-known-good Gradio + gradio_client + Pydantic combo. Pydantic
2
- # 2.10 changed schema generation to emit `additionalProperties: True/False`
3
- # (bool) β€” gradio_client 1.3 / 1.4 raises `'bool' is not iterable` when
4
- # walking that schema. <2.10 keeps the pre-change behaviour.
5
- gradio==4.44.1
6
- gradio_client==1.3.0
7
- pydantic>=2.0,<2.10
8
 
9
  matplotlib>=3.7
10
  numpy>=1.24
11
  torch>=2.0
12
  pillow>=10.0
13
 
14
- # Gradio 4.x imports HfFolder which was removed in huggingface_hub 1.0.
15
- huggingface_hub>=0.24,<1.0
16
 
17
- # llama-cpp-python: prebuilt wheel from AIencoder/llama-cpp-wheels.
18
- # CPU-only, AVX2 + FMA + F16C. Avoids HF-Spaces source-build failures.
19
  https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16%2Bbasic_avx2_fma_f16c-cp312-cp312-manylinux_2_31_x86_64.whl
20
-
21
- audioop-lts; python_version >= "3.13"
 
1
+ # Gradio 5 β€” escapes the 4.x dep-pinning rabbit hole.
2
+ # 4.44.1 + new Starlette (0.40+) is broken: 4.x calls TemplateResponse with
3
+ # the pre-0.40 positional-args signature, so jinja2's cache lookup gets a
4
+ # dict as a key β†’ TypeError. Gradio 5 uses the new Starlette API.
5
+ gradio>=5.5,<6.0
 
 
6
 
7
  matplotlib>=3.7
8
  numpy>=1.24
9
  torch>=2.0
10
  pillow>=10.0
11
 
12
+ # huggingface_hub stays <2.0 (pinning broad β€” Gradio 5 handles 1.x+).
13
+ huggingface_hub>=0.24,<2.0
14
 
15
+ # Prebuilt llama-cpp-python wheel from AIencoder/llama-cpp-wheels.
16
+ # CPU-only, AVX2 + FMA + F16C β€” works on every HF Space x86_64 host.
17
  https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16%2Bbasic_avx2_fma_f16c-cp312-cp312-manylinux_2_31_x86_64.whl