Spaces:
Sleeping
Sleeping
File size: 429 Bytes
43a49a4 1e45192 d01f0ef 43a49a4 d01f0ef 43a49a4 d01f0ef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os
from huggingface_hub import hf_hub_download
# Redirect all internal caching to writable location
os.environ["HF_HOME"] = "/tmp/huggingface"
os.environ["HF_HUB_CACHE"] = "/tmp/huggingface"
model_path = hf_hub_download(
repo_id="TheBloke/phi-2-GGUF",
filename="phi-2.Q4_K_M.gguf",
cache_dir="/tmp/huggingface"
)
# Copy model to working directory
import shutil
shutil.copy(model_path, "./phi-2.Q4_K_M.gguf") |