clementruhm commited on
Commit
9846d74
1 Parent(s): 8a6e134

huggingface_hub.Repository doesnt work

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -11,14 +11,18 @@ from typing import cast
11
 
12
  import gradio as gr
13
  from balacoon_tts import TTS
14
- from huggingface_hub import Repository
15
 
16
  # global tts module, initialized from a model selected
17
  tts = None
18
  model_repo_dir = "/data"
19
- model_repo = Repository(
20
- local_dir=model_repo_dir, clone_from="balacoon/tts"
21
- )
 
 
 
 
22
 
23
  def main():
24
  logging.basicConfig(level=logging.INFO)
 
11
 
12
  import gradio as gr
13
  from balacoon_tts import TTS
14
+ from huggingface_hub import hf_hub_download, list_repo_files
15
 
16
  # global tts module, initialized from a model selected
17
  tts = None
18
  model_repo_dir = "/data"
19
+ for name in list_repo_files(repo_id="balacoon/tts"):
20
+ hf_hub_download(
21
+ repo_id="balacoon/tts",
22
+ filename=model_name_str,
23
+ local_dir=model_repo_dir,
24
+ )
25
+
26
 
27
  def main():
28
  logging.basicConfig(level=logging.INFO)