yucornetto commited on
Commit
8b5d788
1 Parent(s): 8a89e5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -9,15 +9,14 @@ import time
9
  import demo_util
10
  import os
11
  import spaces
 
12
 
13
  model2ckpt = {
14
  "TiTok-L-32": ("tokenizer_titok_l32.bin", "generator_titok_l32.bin"),
15
  }
16
 
17
- if not os.path.exists("tokenizer_titok_l32.bin"):
18
- os.system("gdown 1I_m2Vm4JgQsa7bZVORj-nVhP8fgQLngd")
19
- if not os.path.exists("generator_titok_l32.bin"):
20
- os.system("gdown 1IgqZ_vwGIj2ZWOPuCzilxeQ2UrMVY93l")
21
 
22
  # @spaces.GPU
23
  def load_model():
 
9
  import demo_util
10
  import os
11
  import spaces
12
+ from huggingface_hub import hf_hub_download
13
 
14
  model2ckpt = {
15
  "TiTok-L-32": ("tokenizer_titok_l32.bin", "generator_titok_l32.bin"),
16
  }
17
 
18
+ hf_hub_download(repo_id="fun-research/TiTok", filename="tokenizer_titok_l32.bin", local_dir="./")
19
+ hf_hub_download(repo_id="fun-research/TiTok", filename="generator_titok_l32.bin", local_dir="./")
 
 
20
 
21
  # @spaces.GPU
22
  def load_model():