Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,10 +159,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 159 |
["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "switch to discussions"],
|
| 160 |
],
|
| 161 |
inputs=[input_img, text_input],
|
| 162 |
-
outputs
|
| 163 |
-
fn=run_example,
|
| 164 |
-
cache_examples=False, # IMPORTANT: don't run inference at startup
|
| 165 |
-
label="Try examples"
|
| 166 |
)
|
| 167 |
|
| 168 |
submit_btn.click(
|
|
@@ -172,10 +169,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 172 |
)
|
| 173 |
|
| 174 |
# -------- Launch (Spaces-friendly) --------
|
| 175 |
-
# api_open=False avoids known JSON-schema crashes on some versions
|
| 176 |
demo.queue().launch(
|
| 177 |
server_name="0.0.0.0",
|
| 178 |
server_port=PORT,
|
| 179 |
-
show_error=
|
| 180 |
-
debug=
|
|
|
|
|
|
|
| 181 |
)
|
|
|
|
| 159 |
["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "switch to discussions"],
|
| 160 |
],
|
| 161 |
inputs=[input_img, text_input],
|
| 162 |
+
# remove fn/outputs so examples only prefill inputs
|
|
|
|
|
|
|
|
|
|
| 163 |
)
|
| 164 |
|
| 165 |
submit_btn.click(
|
|
|
|
| 169 |
)
|
| 170 |
|
| 171 |
# -------- Launch (Spaces-friendly) --------
|
|
|
|
| 172 |
demo.queue().launch(
|
| 173 |
server_name="0.0.0.0",
|
| 174 |
server_port=PORT,
|
| 175 |
+
show_error=False, # avoid large HTML error bodies
|
| 176 |
+
debug=False, # avoid big pretty tracebacks (and Content-Length mismatch)
|
| 177 |
+
show_api=False # <— key: disables /api/info schema generation
|
| 178 |
+
# api_open=False # if your Gradio version expects the old name, use this instead of show_api
|
| 179 |
)
|