Aki004 commited on
Commit
9da5311
1 Parent(s): fbb63bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -40,11 +40,14 @@ def tts_mode(txt, voice):
40
 
41
  loop = asyncio.new_event_loop()
42
  asyncio.set_event_loop(loop)
 
 
 
 
 
 
 
 
 
43
 
44
- tts_text = gr.Textbox(label="TTS text (100 words limitation)")
45
- tts_voice = gr.Dropdown(choices= tts_get_voices_list(), visible=False)
46
- submit_btn = gr.Button("Generate", variant="primary")
47
- audio_output = gr.Audio(label="Output Audio")
48
-
49
- app = gr.Interface(tts_mode, [tts_text, tts_voice], [audio_output])
50
  app.launch()
 
40
 
41
  loop = asyncio.new_event_loop()
42
  asyncio.set_event_loop(loop)
43
+ with gr.Blocks() as app:
44
+ with gr.Tabs():
45
+ with gr.TabItem('Herta'):
46
+ tts_text = gr.Textbox(label="TTS text (100 words limitation)", visible = True)
47
+ tts_voice = gr.Dropdown(choices= tts_get_voices_list(), visible = True)
48
+ audio_output = gr.Audio(label="Output Audio")
49
+ btn_submit = gr.Button("Generate")
50
+
51
+ btn_submit.click(tts_mode, [tts_text, tts_voice], [audio_output])
52
 
 
 
 
 
 
 
53
  app.launch()