Aki004 commited on
Commit
ee8ea9e
1 Parent(s): 6793f83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -41,8 +41,16 @@ def tts_mode(txt, voice):
41
  loop = asyncio.new_event_loop()
42
  asyncio.set_event_loop(loop)
43
 
44
- txt = gr.Textbox(label = 'TTS text')
45
- voice = gr.Dropdown(tts_get_voices_list(), value = str)
 
 
 
 
 
 
 
 
 
46
 
47
- if gr.Button():
48
- tts_mode(txt, voice)
 
41
  loop = asyncio.new_event_loop()
42
  asyncio.set_event_loop(loop)
43
 
44
+ with gr.Blocks() as app:
45
+ gr.Markdown("TEST.")
46
+ with gr.Row():
47
+ tts_text = gr.Textbox(label="TTS text (100 words limitation)")
48
+ tts_voice = gr.Dropdown(choices= tts_get_voices_list(), visible=False)
49
+ submit_btn = gr.Button("Generate", variant="primary")
50
+
51
+ with gr.Column():
52
+ audio_output = gr.Audio(label="Output Audio")
53
+
54
+ submit_btn.click(tts_mode, [tts_text, tts_voice], [audio_output])
55
 
56
+ app.queue(concurrency_count=1).launch()