Spaces:
Sleeping
Sleeping
Commit ·
cfbb33f
1
Parent(s): 1b1a58d
Remove ssr parameter in launch() function
Browse files
app.py
CHANGED
|
@@ -79,16 +79,13 @@ if __name__ == "__main__":
|
|
| 79 |
import os
|
| 80 |
|
| 81 |
if os.environ.get("SPACE_ID"):
|
| 82 |
-
# Running in HF Spaces
|
| 83 |
-
# show_api=False disables the /api endpoint which has a bug in Gradio 5.9.1
|
| 84 |
-
# ssr=False disables experimental server-side rendering
|
| 85 |
logger.info("Starting seg_app on Hugging Face Spaces...")
|
| 86 |
demo.launch(
|
| 87 |
server_name="0.0.0.0",
|
| 88 |
server_port=7860,
|
| 89 |
share=False,
|
| 90 |
show_api=False,
|
| 91 |
-
ssr=False,
|
| 92 |
)
|
| 93 |
else:
|
| 94 |
# Local development
|
|
@@ -97,6 +94,4 @@ if __name__ == "__main__":
|
|
| 97 |
server_name="127.0.0.1",
|
| 98 |
server_port=7869,
|
| 99 |
share=False,
|
| 100 |
-
show_api=False,
|
| 101 |
-
ssr=False,
|
| 102 |
)
|
|
|
|
| 79 |
import os
|
| 80 |
|
| 81 |
if os.environ.get("SPACE_ID"):
|
| 82 |
+
# Running in HF Spaces
|
|
|
|
|
|
|
| 83 |
logger.info("Starting seg_app on Hugging Face Spaces...")
|
| 84 |
demo.launch(
|
| 85 |
server_name="0.0.0.0",
|
| 86 |
server_port=7860,
|
| 87 |
share=False,
|
| 88 |
show_api=False,
|
|
|
|
| 89 |
)
|
| 90 |
else:
|
| 91 |
# Local development
|
|
|
|
| 94 |
server_name="127.0.0.1",
|
| 95 |
server_port=7869,
|
| 96 |
share=False,
|
|
|
|
|
|
|
| 97 |
)
|