Spaces:
Runtime error
Runtime error
Update worker.py
Browse files
worker.py
CHANGED
@@ -9,8 +9,8 @@ from langchain_community.llms import HuggingFacePipeline
|
|
9 |
from transformers import pipeline
|
10 |
|
11 |
# ✅ Set a writable cache directory for both Hugging Face Hub and Transformers
|
12 |
-
|
13 |
-
os.environ["
|
14 |
|
15 |
# Check for GPU availability
|
16 |
DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
|
9 |
from transformers import pipeline
|
10 |
|
11 |
# ✅ Set a writable cache directory for both Hugging Face Hub and Transformers
|
12 |
+
# ✅ Use `/tmp/huggingface_cache/` instead of `./huggingface_cache`
|
13 |
+
os.environ["HF_HOME"] = "/tmp/huggingface_cache"
|
14 |
|
15 |
# Check for GPU availability
|
16 |
DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
|