Korakoe commited on
Commit
43feca4
1 Parent(s): 843ed45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = tts.StyleTTS2(model_checkpoint_path='./epoch_2nd_00012.pth', config_path="models/config_ft.yml")
219
  else:
220
- other_tts = None
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)