moazx's picture
Refactor project for Lung Cancer AI Advisor: update app and API descriptions, modify .gitignore to exclude Jupyter notebooks, and remove outdated deployment documentation. Delete unused files and enhance logging for better traceability.
0176a31
raw
history blame
647 Bytes
"""
Startup script for Lung Cancer AI Advisor API
"""
import sys
import os
import uvicorn
# Add core to Python path
sys.path.append(os.path.join(os.path.dirname(__file__), 'core'))
if __name__ == "__main__":
# Get port from environment variable (Hugging Face uses PORT env var)
port = int(os.environ.get("PORT", 7860))
uvicorn.run(
"api.app:app",
host="0.0.0.0", # Bind to all interfaces for deployment
port=port,
reload=False, # Disable reload in production for faster startup
log_level="info",
access_log=True,
workers=1 # Single worker for Hugging Face Spaces
)