Download start.sh from techindro/papaya: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/spaces/techindro/papaya/resolve/main/start.sh
- Command line
-
hf download hf://spaces/techindro/papaya/start.sh
-
curl -L -o start.sh https://huggingface.co/spaces/techindro/papaya/resolve/main/start.sh
796 Bytes
| # Runs both Papaya processes inside one container. | |
| # - FastAPI backend: private, only reachable inside the container (127.0.0.1:8000) | |
| # - Streamlit dashboard: public on port 7860 (the port Hugging Face exposes) | |
| set -e | |
| export PAPAYA_BACKEND_URL="http://127.0.0.1:8000" | |
| uvicorn backend.main:app --host 127.0.0.1 --port 8000 & | |
| # Wait (max ~30s) until the backend answers before starting the dashboard | |
| python - <<'PY' | |
| import time, urllib.request | |
| for _ in range(60): | |
| try: | |
| urllib.request.urlopen("http://127.0.0.1:8000/health", timeout=1) | |
| break | |
| except Exception: | |
| time.sleep(0.5) | |
| PY | |
| exec streamlit run simulator/app_dashboard.py \ | |
| --server.port 7860 \ | |
| --server.address 0.0.0.0 \ | |
| --server.headless true \ | |
| --browser.gatherUsageStats false | |