Sarco-Monitor / app.py
Ning311's picture
Upload 40 files
ad05511 verified
raw
history blame contribute delete
523 Bytes
#!/usr/bin/env python3
"""
SarcoAdvisor Hugging Face Spaces入口文件
"""
import os
import sys
import uvicorn
from pathlib import Path
# 添加当前目录到Python路径
current_dir = Path(__file__).parent
sys.path.append(str(current_dir))
# 导入主应用
from main import app
if __name__ == "__main__":
# Hugging Face Spaces默认端口
port = int(os.environ.get("PORT", 7860))
# 启动应用
uvicorn.run(
app,
host="0.0.0.0",
port=port,
log_level="info"
)