Spaces:
Running on Zero
Running on Zero
Commit ·
369d427
1
Parent(s): 5788c76
Revert to modern Gradio (5.9.1) + keep bool-schema monkeypatch (#5)
Browse files- Revert to modern Gradio (5.9.1) + keep bool-schema monkeypatch (4cdf360cfd12b09ae39ba127489792d0f2d19b2e)
Co-authored-by: pormungtailaw <pormungtai@users.noreply.huggingface.co>
- README.md +1 -1
- app.py +2 -2
- requirements.txt +8 -10
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🎭
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.9.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -29,10 +29,10 @@ def _safe_get_type(schema):
|
|
| 29 |
_gcu.get_type = _safe_get_type
|
| 30 |
|
| 31 |
_orig_j2pt = _gcu._json_schema_to_python_type
|
| 32 |
-
def _safe_j2pt(schema,
|
| 33 |
if isinstance(schema, bool):
|
| 34 |
return "Any"
|
| 35 |
-
return _orig_j2pt(schema,
|
| 36 |
_gcu._json_schema_to_python_type = _safe_j2pt
|
| 37 |
|
| 38 |
import pipeline_manager as pm
|
|
|
|
| 29 |
_gcu.get_type = _safe_get_type
|
| 30 |
|
| 31 |
_orig_j2pt = _gcu._json_schema_to_python_type
|
| 32 |
+
def _safe_j2pt(schema, *args, **kwargs):
|
| 33 |
if isinstance(schema, bool):
|
| 34 |
return "Any"
|
| 35 |
+
return _orig_j2pt(schema, *args, **kwargs)
|
| 36 |
_gcu._json_schema_to_python_type = _safe_j2pt
|
| 37 |
|
| 38 |
import pipeline_manager as pm
|
requirements.txt
CHANGED
|
@@ -1,18 +1,16 @@
|
|
| 1 |
# ZeroGPU provides the CUDA torch build; do not pin torch hard.
|
| 2 |
-
#
|
| 3 |
-
#
|
| 4 |
-
#
|
| 5 |
spaces
|
| 6 |
torch
|
| 7 |
torchvision
|
| 8 |
-
diffusers=
|
| 9 |
-
transformers=
|
| 10 |
-
accelerate=
|
| 11 |
-
peft=
|
| 12 |
safetensors>=0.4.3
|
| 13 |
-
|
| 14 |
-
# so pin hub to the matching era.
|
| 15 |
-
huggingface_hub==0.25.2
|
| 16 |
sentencepiece
|
| 17 |
protobuf
|
| 18 |
Pillow
|
|
|
|
| 1 |
# ZeroGPU provides the CUDA torch build; do not pin torch hard.
|
| 2 |
+
# Modern set — paired with a recent Gradio (installed by HF from README `sdk_version`).
|
| 3 |
+
# Do NOT add a `gradio` line here; it conflicts with the Spaces runtime.
|
| 4 |
+
# The api_info "bool is not iterable" bug is handled by a monkeypatch in app.py.
|
| 5 |
spaces
|
| 6 |
torch
|
| 7 |
torchvision
|
| 8 |
+
diffusers>=0.31.0
|
| 9 |
+
transformers>=4.44.0
|
| 10 |
+
accelerate>=0.33.0
|
| 11 |
+
peft>=0.12.0
|
| 12 |
safetensors>=0.4.3
|
| 13 |
+
huggingface_hub>=0.25.0
|
|
|
|
|
|
|
| 14 |
sentencepiece
|
| 15 |
protobuf
|
| 16 |
Pillow
|