Shubham170793 commited on
Commit
54be71f
·
verified ·
1 Parent(s): d542234

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -6
src/streamlit_app.py CHANGED
@@ -1,10 +1,6 @@
1
- # ----------------------------
2
- # Hugging Face cache bootstrap
3
- # ----------------------------
4
  import os
5
 
6
- uid = os.getuid()
7
- CACHE_DIR = f"/home/user-{uid}/huggingface"
8
  os.makedirs(CACHE_DIR, exist_ok=True)
9
 
10
  os.environ["HF_HOME"] = CACHE_DIR
@@ -12,7 +8,8 @@ os.environ["TRANSFORMERS_CACHE"] = CACHE_DIR
12
  os.environ["HF_DATASETS_CACHE"] = CACHE_DIR
13
  os.environ["HF_MODULES_CACHE"] = CACHE_DIR
14
 
15
- print(f"✅ streamlit_app.py using Hugging Face cache at {CACHE_DIR}")
 
16
 
17
  # ----------------------------
18
  # Imports AFTER cache bootstrap
 
 
 
 
1
  import os
2
 
3
+ CACHE_DIR = "/app/hf_cache"
 
4
  os.makedirs(CACHE_DIR, exist_ok=True)
5
 
6
  os.environ["HF_HOME"] = CACHE_DIR
 
8
  os.environ["HF_DATASETS_CACHE"] = CACHE_DIR
9
  os.environ["HF_MODULES_CACHE"] = CACHE_DIR
10
 
11
+ print(f"✅ Using Hugging Face cache at {CACHE_DIR}")
12
+
13
 
14
  # ----------------------------
15
  # Imports AFTER cache bootstrap