Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -213,11 +213,11 @@ def generate(audio_path, ins, speed, alpha, beta, embedding, steps=200):
|
|
213 |
|
214 |
return 24000, scaled
|
215 |
|
216 |
-
|
217 |
if torch.cuda.is_available():
|
218 |
-
other_tts =
|
219 |
else:
|
220 |
-
other_tts =
|
221 |
|
222 |
with gr.Blocks(theme=theme, js=js_func) as clone:
|
223 |
gr.HTML(INTRO)
|
|
|
213 |
|
214 |
return 24000, scaled
|
215 |
|
216 |
+
other_tts = tts.StyleTTS2(model_checkpoint_path='./epoch_2nd_00012.pth', config_path="models/config_ft.yml")
|
217 |
if torch.cuda.is_available():
|
218 |
+
other_tts.devuce = "cuda"
|
219 |
else:
|
220 |
+
other_tts.device = "cpu"
|
221 |
|
222 |
with gr.Blocks(theme=theme, js=js_func) as clone:
|
223 |
gr.HTML(INTRO)
|