mazpie commited on
Commit
ae407cb
1 Parent(s): 1503429

Update demo/t2v.py

Browse files
Files changed (1) hide show
  1. demo/t2v.py +4 -1
demo/t2v.py CHANGED
@@ -11,6 +11,9 @@ import time
11
  import torchvision
12
  from huggingface_hub import hf_hub_download
13
 
 
 
 
14
  def save_videos(batch_tensors, savedir, filenames, fps=10):
15
  # b,samples,c,t,h,w
16
  n_samples = batch_tensors.shape[1]
@@ -107,7 +110,7 @@ class Text2Video():
107
  local_file = os.path.join(model_folder, filename)
108
 
109
  if not os.path.exists(local_file):
110
- hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir=model_folder, local_dir_use_symlinks=False)
111
 
112
  if __name__ == '__main__':
113
  t2v = Text2Video()
 
11
  import torchvision
12
  from huggingface_hub import hf_hub_download
13
 
14
+ # IMPORT HF_TOKEN
15
+ hf_token = os.environ['HF_TOKEN']
16
+
17
  def save_videos(batch_tensors, savedir, filenames, fps=10):
18
  # b,samples,c,t,h,w
19
  n_samples = batch_tensors.shape[1]
 
110
  local_file = os.path.join(model_folder, filename)
111
 
112
  if not os.path.exists(local_file):
113
+ hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir=model_folder, local_dir_use_symlinks=False, token=hf_token)
114
 
115
  if __name__ == '__main__':
116
  t2v = Text2Video()