Update app.py
Browse files
app.py
CHANGED
@@ -356,13 +356,15 @@ demo = gr.Interface(
|
|
356 |
flagging_mode=None
|
357 |
)
|
358 |
|
359 |
-
# Launch with
|
360 |
if __name__ == "__main__":
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
|
|
|
|
|
356 |
flagging_mode=None
|
357 |
)
|
358 |
|
359 |
+
# Launch with minimal configuration
|
360 |
if __name__ == "__main__":
|
361 |
+
if os.getenv('SPACE_ID'):
|
362 |
+
# Running on Hugging Face Spaces
|
363 |
+
demo.launch()
|
364 |
+
else:
|
365 |
+
# Running locally
|
366 |
+
demo.launch(
|
367 |
+
server_name="0.0.0.0",
|
368 |
+
server_port=7860,
|
369 |
+
share=False
|
370 |
+
)
|