Update app.py
Browse files
app.py
CHANGED
|
@@ -322,7 +322,10 @@ def create_app():
|
|
| 322 |
app = create_app()
|
| 323 |
|
| 324 |
if __name__ == "__main__":
|
| 325 |
-
if
|
|
|
|
| 326 |
|
|
|
|
| 327 |
else:
|
|
|
|
| 328 |
app.launch(share=True)
|
|
|
|
| 322 |
app = create_app()
|
| 323 |
|
| 324 |
if __name__ == "__main__":
|
| 325 |
+
# Check if we're running on Hugging Face Spaces
|
| 326 |
+
if "SPACE_ID" in os.environ:
|
| 327 |
|
| 328 |
+
app.launch()
|
| 329 |
else:
|
| 330 |
+
# We're running locally, use share
|
| 331 |
app.launch(share=True)
|