Spaces:
Sleeping
Sleeping
NicholasGuerrero
commited on
Commit
·
fbb1b84
1
Parent(s):
4cab03f
tweak 3
Browse files
app.py
CHANGED
|
@@ -6,6 +6,12 @@ from huggingface_hub import hf_hub_download
|
|
| 6 |
|
| 7 |
# huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir .
|
| 8 |
# huggingface-cli download LoneStriker/OpenBioLLM-Llama3-8B-GGUF --local-dir ./llama3-gguf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
llm = Llama(
|
| 11 |
# model_path="./Phi-3-mini-4k-instruct-q4.gguf",
|
|
|
|
| 6 |
|
| 7 |
# huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir .
|
| 8 |
# huggingface-cli download LoneStriker/OpenBioLLM-Llama3-8B-GGUF --local-dir ./llama3-gguf
|
| 9 |
+
# Explicitly create the cache directory if it doesn't exist
|
| 10 |
+
cache_dir = os.path.expanduser("~/.cache/huggingface/hub")
|
| 11 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 12 |
+
|
| 13 |
+
# Use the cache directory for huggingface downloads
|
| 14 |
+
os.environ["HF_HOME"] = cache_dir
|
| 15 |
|
| 16 |
llm = Llama(
|
| 17 |
# model_path="./Phi-3-mini-4k-instruct-q4.gguf",
|