Spaces:
Runtime error
Runtime error
Skip launch on Spaces; pin gradio_client<0.19
Browse files- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -234,6 +234,6 @@ def build_ui() -> gr.Blocks:
|
|
| 234 |
|
| 235 |
demo = build_ui()
|
| 236 |
|
| 237 |
-
|
| 238 |
-
|
| 239 |
demo.launch()
|
|
|
|
| 234 |
|
| 235 |
demo = build_ui()
|
| 236 |
|
| 237 |
+
# On Hugging Face Spaces, the runtime serves the app; avoid calling launch().
|
| 238 |
+
if __name__ == "__main__" and os.getenv("SPACE_ID") is None:
|
| 239 |
demo.launch()
|
requirements.txt
CHANGED
|
@@ -3,3 +3,4 @@ soundfile
|
|
| 3 |
scipy
|
| 4 |
huggingface_hub<0.25
|
| 5 |
pymongo
|
|
|
|
|
|
| 3 |
scipy
|
| 4 |
huggingface_hub<0.25
|
| 5 |
pymongo
|
| 6 |
+
gradio_client<0.19
|