gmedin commited on
Commit
8d70952
·
verified ·
1 Parent(s): b6d96d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -30,7 +30,8 @@ def load_graph_from_hf(brand):
30
  try:
31
  # Download the file from HuggingFace Hub
32
  HF_REPO = f'{brand}-graph'
33
- file_path = hf_hub_download(repo_id=HF_REPO, filename=BRAND_GRAPHS[brand], use_auth_token=AUTH_TOKEN)
 
34
  # Load the graph
35
  with open(file_path, 'rb') as f:
36
  return pickle.load(f)
 
30
  try:
31
  # Download the file from HuggingFace Hub
32
  HF_REPO = f'{brand}-graph'
33
+ cache_dir = '/tmp'
34
+ file_path = hf_hub_download(repo_id=HF_REPO, filename=BRAND_GRAPHS[brand], token=AUTH_TOKEN, cache_dir=cache_dir)
35
  # Load the graph
36
  with open(file_path, 'rb') as f:
37
  return pickle.load(f)