acc_api / app.py
Adit1Sharma's picture
Initial commit: FastAPI Incident Analyzer for HF Spaces
8e6f164
Raw
History Blame Contribute Delete
389 Bytes
import uvicorn
import os
if __name__ == "__main__":
port = int(os.getenv("PORT", 8000))
host = os.getenv("HOST", "0.0.0.0")
print(f"Starting FastAPI server on http://{host}:{port}...")
uvicorn.run(
"api.main:app",
host=host,
port=port,
reload=False # Disabled by default for ML models to prevent duplicate model loads in memory
)