Download start.sh from perachon/p14-space: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/perachon/p14-space/resolve/main/start.sh
- Command line
-
hf download hf://spaces/perachon/p14-space/start.sh
-
curl -L -o start.sh https://huggingface.co/spaces/perachon/p14-space/resolve/main/start.sh
472 Bytes
| set -eu | |
| # HF Spaces usually sets PORT=7860, but we default it anyway. | |
| PORT="${PORT:-7860}" | |
| # Auto-detect app dir. | |
| APP_DIR="/app" | |
| if [ -d "/app/src/triage_llm" ]; then | |
| APP_DIR="/app/src" | |
| elif [ -d "/app/triage_llm" ]; then | |
| APP_DIR="/app" | |
| fi | |
| # Use --app-dir so imports like triage_llm.* resolve. | |
| exec uvicorn triage_llm.api.app:app \ | |
| --app-dir "${APP_DIR}" \ | |
| --host 0.0.0.0 \ | |
| --port "${PORT}" \ | |
| --proxy-headers \ | |
| --forwarded-allow-ips '*' | |