Spaces:
Sleeping
Resolve HF Spaces gradio version conflict
Browse filesHF Spaces builds its runtime based on README.md's sdk_version
frontmatter field and raises a version-conflict build error when
requirements.txt also lists gradio — sdk_version always wins on HF's
side and the conflict surfaces before pip is even invoked.
Two changes:
- README.md: sdk_version 4.44.1 -> 4.31.5 to match our intent
(4.44.1 ships gradio_client 1.3.0 with the jinja cache +
additionalProperties schema regressions we hit earlier).
- requirements.txt: drop the `gradio==4.31.5` line entirely so HF
only sees the sdk_version declaration. Kept the huggingface_hub
upper bound because gradio 4.x still imports HfFolder, which was
removed in huggingface_hub 1.0.
Local runs are unaffected: gradio 4.31.5 is still resolvable from
other installers.
- README.md +1 -1
- requirements.txt +7 -6
|
@@ -4,7 +4,7 @@ emoji: 🔧
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 4.
|
| 8 |
python_version: "3.10"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.31.5
|
| 8 |
python_version: "3.10"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
@@ -3,12 +3,13 @@ pydantic>=2.0
|
|
| 3 |
networkx>=3.0
|
| 4 |
Pillow>=10.0
|
| 5 |
tqdm>=4.65
|
| 6 |
-
#
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
#
|
| 10 |
-
#
|
| 11 |
-
gradio
|
|
|
|
| 12 |
# gradio 4.x imports HfFolder which was removed in huggingface_hub 1.0
|
| 13 |
huggingface_hub>=0.26,<1.0
|
| 14 |
matplotlib>=3.7
|
|
|
|
| 3 |
networkx>=3.0
|
| 4 |
Pillow>=10.0
|
| 5 |
tqdm>=4.65
|
| 6 |
+
# gradio is intentionally NOT listed here: HF Spaces auto-installs the
|
| 7 |
+
# version declared in README.md's `sdk_version` frontmatter field, and
|
| 8 |
+
# listing it again in requirements.txt causes a version-conflict build
|
| 9 |
+
# error (HF forces sdk_version to win). Bump sdk_version in README.md
|
| 10 |
+
# to upgrade. See the repo README for the full rationale on why we pin
|
| 11 |
+
# to gradio 4.31.5 (gradio_client 1.3.0 regressions in 4.44.1).
|
| 12 |
+
|
| 13 |
# gradio 4.x imports HfFolder which was removed in huggingface_hub 1.0
|
| 14 |
huggingface_hub>=0.26,<1.0
|
| 15 |
matplotlib>=3.7
|