moazx's picture
Initial commit with all files including LFS
73c6377
raw
history blame
641 Bytes
"""
Startup script for HBV AI Assistant 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
)