Spaces:
Sleeping
Sleeping
Download cache_model.py from avid-ml/indie-label: direct link, hf CLI and curl.
- Browser
- Download file 284 Bytes
-
https://huggingface.co/spaces/avid-ml/indie-label/resolve/main/cache_model.py
- Command line
-
hf download hf://spaces/avid-ml/indie-label/cache_model.py
-
curl -L -o cache_model.py https://huggingface.co/spaces/avid-ml/indie-label/resolve/main/cache_model.py
284 Bytes
| """" | |
| Intended for use by Dockerfile; downloads pytorch model and caches it | |
| in the image, so the download doesn't have to run when app starts. | |
| """ | |
| from sentence_transformers import SentenceTransformer | |
| model_name = "paraphrase-MiniLM-L6-v2" | |
| model = SentenceTransformer(model_name) | |