vivekchakraverty Claude Opus 4.8 commited on
Commit
2ab4f11
·
1 Parent(s): ac46b30

Upgrade to Gradio 5.x to fix api-schema startup crash

Browse files

gradio 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>

Files changed (2) hide show
  1. app.py +5 -1
  2. 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(server_name="0.0.0.0", server_port=7860)
 
 
 
 
 
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
- gradio==4.44.1
2
- # gradio 4.44 imports HfFolder, removed in huggingface_hub 1.0 — keep <1.0 (still has Inference Providers).
3
- huggingface_hub>=0.28.0,<1.0
 
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