jiinkwan commited on
Commit
d57ec0b
·
verified ·
1 Parent(s): 21a3eb3

Upload streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -3
src/streamlit_app.py CHANGED
@@ -12,9 +12,12 @@ from huggingface_hub import hf_hub_download
12
  import os
13
 
14
  # ✅ Safe directory for Spaces
15
- os.environ["HF_HOME"] = "/tmp/hf_home"
16
- os.environ["HF_HUB_CACHE"] = "/tmp/hf_home/hub_cache"
17
- os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib"
 
 
 
18
 
19
  # === Custom Metric ===
20
  def pearson_corr(y_true, y_pred):
 
12
  import os
13
 
14
  # ✅ Safe directory for Spaces
15
+ import os
16
+
17
+ os.environ["STREAMLIT_HOME"] = "/home/user/.streamlit"
18
+ os.environ["MPLCONFIGDIR"] = "/home/user/.config/matplotlib"
19
+ os.environ["HF_HOME"] = "/home/user/.cache/huggingface"
20
+ os.environ["TRANSFORMERS_CACHE"] = "/home/user/.cache/huggingface/transformers"
21
 
22
  # === Custom Metric ===
23
  def pearson_corr(y_true, y_pred):