Inial commited on
Commit
46e4a85
·
verified ·
1 Parent(s): 12ec115

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def tts_fn(text, language):
31
  with gr.Blocks() as demo:
32
  gr.Markdown("# 🌐 MMS-TTS: 1100+ Languages (No ISO Code Needed)")
33
  with gr.Row():
34
- language = gr.Dropdown(choices=sorted(lang_map.keys()), label="Choose a language")
35
  text = gr.Textbox(label="Enter your text", placeholder="Type something here...")
36
  with gr.Row():
37
  btn = gr.Button("Speak")
@@ -39,6 +39,8 @@ with gr.Blocks() as demo:
39
  out_text = gr.Textbox(label="Info")
40
  out_audio = gr.Audio(label="Audio", type="filepath")
41
 
 
 
42
  btn.click(fn=tts_fn, inputs=[text, language], outputs=[out_text, out_audio])
43
 
44
  demo.launch()
 
31
  with gr.Blocks() as demo:
32
  gr.Markdown("# 🌐 MMS-TTS: 1100+ Languages (No ISO Code Needed)")
33
  with gr.Row():
34
+ language = gr.Dropdown(choices=[], label="Choose a language")
35
  text = gr.Textbox(label="Enter your text", placeholder="Type something here...")
36
  with gr.Row():
37
  btn = gr.Button("Speak")
 
39
  out_text = gr.Textbox(label="Info")
40
  out_audio = gr.Audio(label="Audio", type="filepath")
41
 
42
+ language.choices = sorted(lang_map.keys())
43
+
44
  btn.click(fn=tts_fn, inputs=[text, language], outputs=[out_text, out_audio])
45
 
46
  demo.launch()