Spaces:
Running on Zero
Running on Zero
apingali Claude Opus 4.7 (1M context) commited on
Commit ·
69d1664
1
Parent(s): 971e3f4
fix(hf-space): bump Gradio to 5.x to fix HfFolder ImportError
Browse filesBuild on AshwinP/compounding-test failed at startup with:
ImportError: cannot import name 'HfFolder' from 'huggingface_hub'
Cause: Gradio 4.x imports the now-removed HfFolder symbol from
huggingface_hub in its oauth.py. huggingface_hub>=1.0 (pulled in by
our `huggingface_hub>=0.27` floor and pip resolving to latest) removed
HfFolder. Gradio 5.0 (Oct 2024) dropped the HfFolder dependency and
uses HfApi/get_token instead.
Fix:
requirements.txt gradio>=4.0 → gradio>=5.0 (with a comment
explaining why the floor matters)
README.md sdk_version: 4.44.0 → 5.9.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- README.md +1 -1
- requirements.txt +4 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 📈
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
|
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.9.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
requirements.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
# Core (always required)
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
| 3 |
python-dotenv>=1.0
|
| 4 |
pytest>=8.0
|
| 5 |
|
|
|
|
| 1 |
# Core (always required)
|
| 2 |
+
# Gradio 5.x is required — earlier 4.x versions import the now-removed
|
| 3 |
+
# `HfFolder` symbol from `huggingface_hub`, breaking the Space at startup
|
| 4 |
+
# when paired with huggingface_hub>=1.0.
|
| 5 |
+
gradio>=5.0
|
| 6 |
python-dotenv>=1.0
|
| 7 |
pytest>=8.0
|
| 8 |
|