-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·37 lines (31 loc) · 990 Bytes
/
main.py
File metadata and controls
executable file
·37 lines (31 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
"""
启动重构版本的火山引擎多模态实验室应用
"""
import subprocess
import sys
import os
def main():
"""启动Streamlit应用"""
try:
# 确保在正确的目录中
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(script_dir)
print("🚀 启动火山引擎多模态实验室")
print("📁 工作目录:", script_dir)
print("🌐 应用将在浏览器中自动打开...")
print("-" * 50)
# 启动Streamlit应用
subprocess.run([
sys.executable, "-m", "streamlit", "run", "app.py",
"--server.headless", "false",
"--server.port", "8501",
"--browser.gatherUsageStats", "false"
])
except KeyboardInterrupt:
print("\n👋 应用已停止")
except Exception as e:
print(f"❌ 启动失败: {e}")
sys.exit(1)
if __name__ == "__main__":
main()