Spaces:
Sleeping
Sleeping
Download js/download_model.py from BhavyaPatel07/splitify-backend: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/spaces/BhavyaPatel07/splitify-backend/resolve/main/js/download_model.py
- Command line
-
hf download hf://spaces/BhavyaPatel07/splitify-backend/js/download_model.py
-
curl -L -o download_model.py https://huggingface.co/spaces/BhavyaPatel07/splitify-backend/resolve/main/js/download_model.py
452 Bytes
| """ | |
| Runs once during `docker build`. Downloads and caches the htdemucs | |
| model weights into the image so the running container never needs to | |
| hit the network for them — see the comment in the Dockerfile for why | |
| this matters. | |
| """ | |
| from demucs.pretrained import get_model | |
| if __name__ == "__main__": | |
| print("Pre-downloading htdemucs weights into the image...") | |
| get_model("htdemucs") | |
| print("Done. Model weights are now baked into this image.") | |