Loren commited on
Commit
68833e4
·
verified ·
1 Parent(s): 3458af5

Update app/database.py

Browse files
Files changed (1) hide show
  1. app/database.py +4 -0
app/database.py CHANGED
@@ -7,6 +7,10 @@ from huggingface_hub import hf_hub_download
7
  REPO_ID = "Loren/articles_database"
8
  cache_dir = "/tmp"
9
  os.makedirs(cache_dir, exist_ok=True)
 
 
 
 
10
 
11
  # Téléchargement des fichiers Parquet depuis Hugging Face
12
  articles_parquet = hf_hub_download(
 
7
  REPO_ID = "Loren/articles_database"
8
  cache_dir = "/tmp"
9
  os.makedirs(cache_dir, exist_ok=True)
10
+ # Rediriger le cache HF globalement
11
+ os.environ["HF_HOME"] = cache_dir
12
+ os.environ["HF_DATASETS_CACHE"] = cache_dir
13
+ os.environ["TRANSFORMERS_CACHE"] = cache_dir
14
 
15
  # Téléchargement des fichiers Parquet depuis Hugging Face
16
  articles_parquet = hf_hub_download(