Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -48,15 +48,21 @@ def start_streamlit():
|
|
48 |
"""Start Streamlit app optimized for HF Spaces"""
|
49 |
print("π Starting MoneyPrinterTurbo WebUI...")
|
50 |
|
|
|
51 |
streamlit_cmd = [
|
52 |
sys.executable, "-m", "streamlit", "run",
|
53 |
os.path.join(root_dir, "webui", "Main.py"),
|
54 |
-
"--server.port
|
55 |
-
"--server.address
|
56 |
-
"--browser.gatherUsageStats
|
57 |
-
"--server.enableCORS
|
|
|
|
|
58 |
]
|
59 |
|
|
|
|
|
|
|
60 |
# Replace current process with Streamlit
|
61 |
os.execvp(sys.executable, streamlit_cmd)
|
62 |
|
|
|
48 |
"""Start Streamlit app optimized for HF Spaces"""
|
49 |
print("π Starting MoneyPrinterTurbo WebUI...")
|
50 |
|
51 |
+
# Explicitly specify port 7860 for HF Spaces
|
52 |
streamlit_cmd = [
|
53 |
sys.executable, "-m", "streamlit", "run",
|
54 |
os.path.join(root_dir, "webui", "Main.py"),
|
55 |
+
"--server.port", "7860",
|
56 |
+
"--server.address", "0.0.0.0",
|
57 |
+
"--browser.gatherUsageStats", "false",
|
58 |
+
"--server.enableCORS", "true",
|
59 |
+
"--server.enableXsrfProtection", "false",
|
60 |
+
"--server.enableWebsocketCompression", "false"
|
61 |
]
|
62 |
|
63 |
+
print(f"π― Starting Streamlit on port 7860...")
|
64 |
+
print(f"π Command: {' '.join(streamlit_cmd)}")
|
65 |
+
|
66 |
# Replace current process with Streamlit
|
67 |
os.execvp(sys.executable, streamlit_cmd)
|
68 |
|