Spaces:
Runtime error
Runtime error
Commit
Β·
579fccc
1
Parent(s):
d381252
add download model for hf space
Browse files
webui.py
CHANGED
|
@@ -3,6 +3,9 @@ import shutil
|
|
| 3 |
import threading
|
| 4 |
import time
|
| 5 |
import sys
|
|
|
|
|
|
|
|
|
|
| 6 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 7 |
sys.path.append(current_dir)
|
| 8 |
sys.path.append(os.path.join(current_dir, "indextts"))
|
|
@@ -13,6 +16,7 @@ from tools.i18n.i18n import I18nAuto
|
|
| 13 |
|
| 14 |
i18n = I18nAuto(language="zh_CN")
|
| 15 |
MODE = 'local'
|
|
|
|
| 16 |
tts = IndexTTS(model_dir="checkpoints",cfg_path="checkpoints/config.yaml")
|
| 17 |
|
| 18 |
os.makedirs("outputs/tasks",exist_ok=True)
|
|
|
|
| 3 |
import threading
|
| 4 |
import time
|
| 5 |
import sys
|
| 6 |
+
|
| 7 |
+
from huggingface_hub import hf_hub_download
|
| 8 |
+
|
| 9 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 10 |
sys.path.append(current_dir)
|
| 11 |
sys.path.append(os.path.join(current_dir, "indextts"))
|
|
|
|
| 16 |
|
| 17 |
i18n = I18nAuto(language="zh_CN")
|
| 18 |
MODE = 'local'
|
| 19 |
+
hf_hub_download("IndexTeam/IndexTTS",local_dir="checkpoints")
|
| 20 |
tts = IndexTTS(model_dir="checkpoints",cfg_path="checkpoints/config.yaml")
|
| 21 |
|
| 22 |
os.makedirs("outputs/tasks",exist_ok=True)
|