Download app.py from TanyaVM/load: direct link, hf CLI and curl.
- Browser
- Download file 484 Bytes
-
https://huggingface.co/spaces/TanyaVM/load/resolve/main/app.py
- Command line
-
hf download hf://spaces/TanyaVM/load/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TanyaVM/load/resolve/main/app.py
484 Bytes
| from huggingface_hub import snapshot_download | |
| from pathlib import Path | |
| import os | |
| API_TKN = os.environ['HF_API_KEY'] | |
| mistral_models_path = 'TanyaVM/7B-Instruct-v0.3' | |
| cache_dir = "/mistral_models/7B-Instruct-v0.3/.cache/huggingface" | |
| os.makedirs(cache_dir, exist_ok=True) | |
| #cache_dir = "\.cache\huggingface" | |
| snapshot_download(repo_id="TanyaVM/mistral_instruct_gen", token = API_TKN,allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"],cache_dir=cache_dir) | |