File size: 389 Bytes
8e6f164
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
    )