Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,16 +38,17 @@ def tts_mode(txt, voice):
|
|
38 |
|
39 |
return audio_bytes
|
40 |
|
41 |
-
|
42 |
-
asyncio.
|
43 |
-
|
44 |
-
with gr.
|
45 |
-
with gr.
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
btn_submit.click(tts_mode, [tts_text, tts_voice], [audio_output])
|
52 |
|
53 |
-
app.launch()
|
|
|
38 |
|
39 |
return audio_bytes
|
40 |
|
41 |
+
if __name__ == '__main__':
|
42 |
+
loop = asyncio.new_event_loop()
|
43 |
+
asyncio.set_event_loop(loop)
|
44 |
+
with gr.Blocks() as app:
|
45 |
+
with gr.Tabs():
|
46 |
+
with gr.TabItem('Herta'):
|
47 |
+
tts_text = gr.Textbox(label="TTS text (100 words limitation)", visible = True)
|
48 |
+
tts_voice = gr.Dropdown(choices= tts_get_voices_list(), visible = True)
|
49 |
+
audio_output = gr.Audio(label="Output Audio")
|
50 |
+
btn_submit = gr.Button("Generate")
|
51 |
|
52 |
btn_submit.click(tts_mode, [tts_text, tts_voice], [audio_output])
|
53 |
|
54 |
+
app.launch()
|