Deepakraj2006 commited on
Commit
5c1da39
·
verified ·
1 Parent(s): 8607b97

Update worker.py

Browse files
Files changed (1) hide show
  1. worker.py +2 -2
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
- os.environ["HF_HOME"] = "./huggingface_cache"
13
- os.environ["TRANSFORMERS_CACHE"] = "./huggingface_cache"
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"