Spaces:
Runtime error
Runtime error
Commit
·
9846d74
1
Parent(s):
8a6e134
huggingface_hub.Repository doesnt work
Browse files
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
|
| 15 |
|
| 16 |
# global tts module, initialized from a model selected
|
| 17 |
tts = None
|
| 18 |
model_repo_dir = "/data"
|
| 19 |
-
|
| 20 |
-
|
| 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)
|