Commit Β·
ec8ba93
1
Parent(s): 579fccc
add download model for hf space
Browse files3 unmodified lines4567789105 unmodified lines16171819192021223 unmodified linesimport timeimport sys
from huggingface_hub import hf_hub_downloadfrom huggingface_hub import snapshot_download
current_dir = os.path.dirname(os.path.abspath(__file__))sys.path.append(current_dir)5 unmodified lines
i18n = I18nAuto(language="zh_CN")MODE = 'local'hf_hub_download("IndexTeam/IndexTTS",local_dir="checkpoints")snapshot_download("IndexTeam/IndexTTS",local_dir="checkpoints")tts = IndexTTS(model_dir="checkpoints",cfg_path="checkpoints/config.yaml")
os.makedirs("outputs/tasks",exist_ok=True)webui.py+2-2