Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,12 +5,12 @@ from f5_tts.api import F5TTS
|
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
import os
|
7 |
|
8 |
-
VARIANTS = ["
|
9 |
models = {}
|
10 |
for variant in VARIANTS:
|
11 |
models[variant] = F5TTS(
|
12 |
-
ckpt_file=hf_hub_download("
|
13 |
-
vocab_file=hf_hub_download("
|
14 |
)
|
15 |
|
16 |
@spaces.GPU
|
@@ -28,7 +28,7 @@ def generate(text, ref_audio, variant, progress = gr.Progress()):
|
|
28 |
return f.name
|
29 |
|
30 |
with gr.Blocks() as demo:
|
31 |
-
gr.Markdown("# Demo for
|
32 |
textbox = gr.Textbox(label="Text")
|
33 |
audio = gr.Audio(label="Reference Audio", type="filepath")
|
34 |
variant = gr.Radio(choices=VARIANTS, value=VARIANTS[0], label="Variant")
|
|
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
import os
|
7 |
|
8 |
+
VARIANTS = ["orkhon_tts"]
|
9 |
models = {}
|
10 |
for variant in VARIANTS:
|
11 |
models[variant] = F5TTS(
|
12 |
+
ckpt_file=hf_hub_download("hcsolakoglu/Orkhon-TTS", f"{variant}.pt", token=os.getenv("HF_TOKEN")),
|
13 |
+
vocab_file=hf_hub_download("hcsolakoglu/Orkhon-TTS", "vocab.txt", token=os.getenv("HF_TOKEN"))
|
14 |
)
|
15 |
|
16 |
@spaces.GPU
|
|
|
28 |
return f.name
|
29 |
|
30 |
with gr.Blocks() as demo:
|
31 |
+
gr.Markdown("# Demo for Orkhon-TTS\n\nTry out [Orkhon-TTS](https://huggingface.co/hcsolakoglu/Orkhon-TTS)")
|
32 |
textbox = gr.Textbox(label="Text")
|
33 |
audio = gr.Audio(label="Reference Audio", type="filepath")
|
34 |
variant = gr.Radio(choices=VARIANTS, value=VARIANTS[0], label="Variant")
|