Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def tokenize_first(text, voice='af_heart'):
|
|
49 |
return words # Return a list of words
|
50 |
|
51 |
def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
52 |
-
text = text
|
53 |
pipeline = pipelines[voice[0]]
|
54 |
pack = pipeline.load_voice(voice)
|
55 |
use_gpu = use_gpu and CUDA_AVAILABLE
|
@@ -189,7 +189,7 @@ with gr.Blocks() as app:
|
|
189 |
with gr.Column():
|
190 |
gr.TabbedInterface([generate_tab], ['Generate'])
|
191 |
random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
|
192 |
-
generate_btn.click(fn=
|
193 |
tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
|
194 |
predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
|
195 |
|
|
|
49 |
return words # Return a list of words
|
50 |
|
51 |
def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
52 |
+
text = text
|
53 |
pipeline = pipelines[voice[0]]
|
54 |
pack = pipeline.load_voice(voice)
|
55 |
use_gpu = use_gpu and CUDA_AVAILABLE
|
|
|
189 |
with gr.Column():
|
190 |
gr.TabbedInterface([generate_tab], ['Generate'])
|
191 |
random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
|
192 |
+
generate_btn.click(fn=generate_all, inputs=[text, voice, speed, use_gpu], outputs=[out_audio, out_ps], api_name=API_NAME)
|
193 |
tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
|
194 |
predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
|
195 |
|