CatPtain commited on
Commit
cc8570f
Β·
verified Β·
1 Parent(s): 239fb8e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
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=7860",
55
- "--server.address=0.0.0.0",
56
- "--browser.gatherUsageStats=false",
57
- "--server.enableCORS=true"
 
 
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