Spaces:
Running
Running
Commit ·
2ab4f11
1
Parent(s): ac46b30
Upgrade to Gradio 5.x to fix api-schema startup crash
Browse filesgradio 4.44's bundled gradio_client raises "TypeError: argument of type
'bool' is not iterable" while building api_info at startup, which made
Gradio believe localhost was unreachable and abort with a share=True
ValueError. Gradio 5.x fixes the boolean-schema handling. Also pass
show_api=False defensively.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- app.py +5 -1
- requirements.txt +4 -3
app.py
CHANGED
|
@@ -110,4 +110,8 @@ def build_ui() -> gr.Blocks:
|
|
| 110 |
|
| 111 |
|
| 112 |
if __name__ == "__main__":
|
| 113 |
-
build_ui().queue().launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
|
| 112 |
if __name__ == "__main__":
|
| 113 |
+
build_ui().queue().launch(
|
| 114 |
+
server_name="0.0.0.0",
|
| 115 |
+
server_port=7860,
|
| 116 |
+
show_api=False, # avoid API-schema generation edge cases
|
| 117 |
+
)
|
requirements.txt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
huggingface_hub
|
|
|
|
| 4 |
requests>=2.32.0
|
| 5 |
trafilatura>=1.12.0
|
| 6 |
python-docx>=1.1.2
|
|
|
|
| 1 |
+
# Gradio 5.x fixes the gradio_client "bool is not iterable" api-schema crash present in 4.44.
|
| 2 |
+
gradio>=5.6,<6
|
| 3 |
+
# Keep huggingface_hub <1.0: 0.x InferenceClient (Inference Providers) is what the pipeline targets.
|
| 4 |
+
huggingface_hub>=0.28.1,<1.0
|
| 5 |
requests>=2.32.0
|
| 6 |
trafilatura>=1.12.0
|
| 7 |
python-docx>=1.1.2
|