Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ import subprocess
|
|
| 22 |
# -----------------------------
|
| 23 |
# Hugging Face fix: ensure Streamlit runs properly
|
| 24 |
# -----------------------------
|
| 25 |
-
if
|
| 26 |
subprocess.Popen(["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"])
|
| 27 |
exit()
|
| 28 |
|
|
|
|
| 22 |
# -----------------------------
|
| 23 |
# Hugging Face fix: ensure Streamlit runs properly
|
| 24 |
# -----------------------------
|
| 25 |
+
if __name__ == "__main__" and os.environ.get("SYSTEM") == "spaces":
|
| 26 |
subprocess.Popen(["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"])
|
| 27 |
exit()
|
| 28 |
|