Spaces:
Sleeping
Sleeping
| # Entrypoint script for CloverShield ML API | |
| # Reads PORT from environment variable (required by Render) | |
| PORT=${PORT:-7860} | |
| HOST=${HOST:-0.0.0.0} | |
| echo "π Starting CloverShield ML API" | |
| echo "π Configuration: HOST=$HOST, PORT=$PORT" | |
| echo "β³ Server will start, model will load on startup..." | |
| echo "π‘ Note: First request may take longer if model is still loading" | |
| # Start uvicorn with the PORT from environment | |
| # Use --log-level info for better visibility | |
| exec uvicorn main:app --host "$HOST" --port "$PORT" --workers 1 --log-level info | |