MAZEN00 commited on
Commit
7790bd9
·
verified ·
1 Parent(s): b649d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,12 +7,12 @@ import pandas as pd
7
  import os
8
 
9
  # -----------------------------
10
- # Download model + columns from Hugging Face Hub
11
  # -----------------------------
12
- REPO_ID = "MAZEN00/Player"
 
13
 
14
- # Use Hugging Face default cache inside /home
15
- cache_dir = os.path.expanduser("~/.cache/huggingface")
16
 
17
  model_path = hf_hub_download(repo_id=REPO_ID, filename="modeel.joblib", cache_dir=cache_dir)
18
  columns_path = hf_hub_download(repo_id=REPO_ID, filename="columns.pkl", cache_dir=cache_dir)
 
7
  import os
8
 
9
  # -----------------------------
10
+ # Fix cache directory (use /tmp to avoid PermissionError)
11
  # -----------------------------
12
+ os.environ["HF_HOME"] = "/tmp/huggingface"
13
+ cache_dir = "/tmp/huggingface"
14
 
15
+ REPO_ID = "MAZEN00/Player"
 
16
 
17
  model_path = hf_hub_download(repo_id=REPO_ID, filename="modeel.joblib", cache_dir=cache_dir)
18
  columns_path = hf_hub_download(repo_id=REPO_ID, filename="columns.pkl", cache_dir=cache_dir)