#!/bin/bash # Streamlit 应用启动脚本 cd "$(dirname "$0")" echo "🚀 启动 ETF轮动策略可视化应用..." echo "" # 检查虚拟环境 if [ -d "venv" ]; then source venv/bin/activate fi # 安装依赖(如果需要) # pip install -r requirements_streamlit.txt # 设置环境变量 export API_BASE_URL=${API_BASE_URL:-"https://k3s.tokenpluse.xyz"} echo "📊 正在启动 Streamlit 服务..." echo "🌐 API地址: $API_BASE_URL" echo "" streamlit run streamlit_app.py --server.port 8501 --server.address 0.0.0.0