Spaces:
Sleeping
Sleeping
Download setup.sh from MataStrategy/ground-zero: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/spaces/MataStrategy/ground-zero/resolve/a5737ac8bc24f606d06a92530480b9f584798967/setup.sh
- Command line
-
hf download hf://spaces/MataStrategy/ground-zero@a5737ac8bc24f606d06a92530480b9f584798967/setup.sh
-
curl -L -o setup.sh https://huggingface.co/spaces/MataStrategy/ground-zero/resolve/a5737ac8bc24f606d06a92530480b9f584798967/setup.sh
441 Bytes
| # Runs during HF Spaces build phase (build layer is cached). | |
| # Pre-downloads the Whisper model so cold starts don't re-download it. | |
| # WHISPER_MODEL_ID is available as an env var at build time if set in Space secrets. | |
| MODEL=${WHISPER_MODEL_ID:-openai/whisper-small} | |
| echo "Pre-caching $MODEL ..." | |
| python -c " | |
| from huggingface_hub import snapshot_download | |
| import os | |
| snapshot_download('${MODEL}', repo_type='model') | |
| print('Done.') | |
| " | |