Spaces:
Runtime error
Runtime error
Download run.sh from openscopelabs/cctv-object-detection: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/openscopelabs/cctv-object-detection/resolve/main/run.sh
- Command line
-
hf download hf://spaces/openscopelabs/cctv-object-detection/run.sh
-
curl -L -o run.sh https://huggingface.co/spaces/openscopelabs/cctv-object-detection/resolve/main/run.sh
577 Bytes
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| HOST="${HOST:-0.0.0.0}" | |
| PORT="${PORT:-8000}" | |
| # Prefer the project venv if one exists. | |
| if [[ -x ".venv/bin/uvicorn" ]]; then | |
| UVICORN=".venv/bin/uvicorn" | |
| elif command -v uvicorn >/dev/null 2>&1; then | |
| UVICORN="uvicorn" | |
| else | |
| echo "uvicorn not found. Run:" >&2 | |
| echo " .venv/bin/python -m pip install -r requirements.txt" >&2 | |
| exit 1 | |
| fi | |
| # Single worker because the registry holds in-process state | |
| # (camera workers, YOLO model, analytics). | |
| exec "$UVICORN" app.main:app --host "$HOST" --port "$PORT" --workers 1 | |