Spaces:
Runtime error
Runtime error
Workaround Gradio schema crash: remove type hint, disable show_api and ssr
Browse files
app.py
CHANGED
|
@@ -118,7 +118,7 @@ def _ensure_loaded():
|
|
| 118 |
raise
|
| 119 |
|
| 120 |
|
| 121 |
-
def predict(img
|
| 122 |
if img is None:
|
| 123 |
yield "error: no image", "status: please upload image first"
|
| 124 |
return
|
|
@@ -153,4 +153,4 @@ with gr.Blocks() as demo:
|
|
| 153 |
|
| 154 |
|
| 155 |
demo.queue(default_concurrency_limit=1)
|
| 156 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 118 |
raise
|
| 119 |
|
| 120 |
|
| 121 |
+
def predict(img):
|
| 122 |
if img is None:
|
| 123 |
yield "error: no image", "status: please upload image first"
|
| 124 |
return
|
|
|
|
| 153 |
|
| 154 |
|
| 155 |
demo.queue(default_concurrency_limit=1)
|
| 156 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False, ssr_mode=False)
|