ovi054 commited on
Commit
caeb0f9
·
verified ·
1 Parent(s): 38750c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,9 +1,11 @@
1
  import os
2
 
3
- os.environ["HF_HOME"] = "/tmp/huggingface_cache"
4
- os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface_cache"
5
- cache_dir = os.environ["HF_HOME"]
6
 
 
 
 
 
7
 
8
  if not os.path.exists(cache_dir):
9
  os.makedirs(cache_dir, exist_ok=True)
 
1
  import os
2
 
3
+ os.environ["HF_HOME"] = "/tmp/huggingface_cache" # Writable directory in container
 
 
4
 
5
+ # Ensure the cache directory exists
6
+ cache_dir = os.environ["HF_HOME"]
7
+ if not os.path.exists(cache_dir):
8
+ os.makedirs(cache_dir, exist_ok=True)
9
 
10
  if not os.path.exists(cache_dir):
11
  os.makedirs(cache_dir, exist_ok=True)