mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-11-14 18:22:59 +01:00
3.7 KiB
3.7 KiB
In [ ]:
!git clone https://github.com/harry0703/MoneyPrinterTurbo.git
%cd MoneyPrinterTurbo
!pip install -q uv pyngrok
!uv python install 3.11
# Colab 预装了 google-colab / google-genai / google-adk 等包,直接 pip install -r requirements.txt
# 会覆盖全局依赖并触发版本冲突。这里使用 uv 为项目创建独立 .venv,避免影响 Colab 运行时。
!uv sync --frozen --python 3.11In [ ]:
from pyngrok import ngrok
# Terminate any existing ngrok tunnels
ngrok.kill()
# Set your authentication token
# Replace "your_ngrok_auth_token" with your actual token
ngrok.set_auth_token("your_ngrok_auth_token")In [ ]:
import subprocess
import time
print("🚀 Starting MoneyPrinterTurbo...")
# 通过 uv run 进入项目 .venv,确保 Streamlit 使用上一步锁定的依赖版本。
streamlit_proc = subprocess.Popen([
"uv", "run", "streamlit", "run", "./webui/Main.py", "--server.port=8501", "--server.address=0.0.0.0"
])
# Wait for the server to initialize
time.sleep(5)
print("🌐 Creating ngrok tunnel to expose the MoneyPrinterTurbo...")
public_url = ngrok.connect(8501, bind_tls=True)
print("✅ Deployment complete! Access your MoneyPrinterTurbo at:")
print(public_url)