Upload app.py
Browse files
app.py
CHANGED
|
@@ -464,9 +464,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 464 |
if __name__ == "__main__":
|
| 465 |
# Check if running on Hugging Face Spaces
|
| 466 |
if "SPACE_ID" in os.environ:
|
| 467 |
-
# Running on HF Spaces -
|
| 468 |
-
|
| 469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 470 |
else:
|
| 471 |
# Running locally - use custom server settings and share
|
| 472 |
demo.launch(
|
|
|
|
| 464 |
if __name__ == "__main__":
|
| 465 |
# Check if running on Hugging Face Spaces
|
| 466 |
if "SPACE_ID" in os.environ:
|
| 467 |
+
# Running on HF Spaces - use minimal configuration
|
| 468 |
+
demo.launch(
|
| 469 |
+
server_port=7860, # Match the port HF Spaces expects
|
| 470 |
+
share=False, # Explicitly disable sharing
|
| 471 |
+
debug=False, # Disable debug mode in production
|
| 472 |
+
show_error=True # Show detailed errors if they occur
|
| 473 |
+
)
|
| 474 |
else:
|
| 475 |
# Running locally - use custom server settings and share
|
| 476 |
demo.launch(
|