jedick commited on
Commit
657bdab
·
1 Parent(s): 592998f

Use os.getenv for HF_TOKEN

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -22,11 +22,13 @@ load_dotenv(dotenv_path=".env", override=True)
22
 
23
  # Download model snapshots from Hugging Face Hub
24
  print(f"Downloading checkpoints for {model_id}...")
25
- ckpt_dir = snapshot_download(model_id, local_dir_use_symlinks=False, token=True)
 
 
26
  print(f"Using checkpoints from {ckpt_dir}")
27
  print(f"Downloading checkpoints for {embedding_model_id}...")
28
  embedding_ckpt_dir = snapshot_download(
29
- embedding_model_id, local_dir_use_symlinks=False, token=True
30
  )
31
  print(f"Using embedding checkpoints from {embedding_ckpt_dir}")
32
 
 
22
 
23
  # Download model snapshots from Hugging Face Hub
24
  print(f"Downloading checkpoints for {model_id}...")
25
+ ckpt_dir = snapshot_download(
26
+ model_id, local_dir_use_symlinks=False, token=os.getenv("HF_TOKEN")
27
+ )
28
  print(f"Using checkpoints from {ckpt_dir}")
29
  print(f"Downloading checkpoints for {embedding_model_id}...")
30
  embedding_ckpt_dir = snapshot_download(
31
+ embedding_model_id, local_dir_use_symlinks=False, token=os.getenv("HF_TOKEN")
32
  )
33
  print(f"Using embedding checkpoints from {embedding_ckpt_dir}")
34