not-lain commited on
Commit
6dbdc81
1 Parent(s): 69696dd

supported languages in a list

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -301,6 +301,9 @@ welcome_message = """
301
  #### Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community on 👻Discord: [Discord](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Polytonic](https://github.com/tonic-ai) & contribute to 🌟 [PolyGPT](https://github.com/tonic-ai/polygpt-alpha)"
302
  """
303
 
 
 
 
304
  with gr.Blocks(theme='ParityError/Anime') as iface :
305
  gr.Markdown(welcome_message)
306
  with gr.Tab("text summarization"):
@@ -313,8 +316,8 @@ with gr.Blocks(theme='ParityError/Anime') as iface :
313
  image_button = gr.Button("process image")
314
  with gr.Tab("speech to text translation"):
315
  with gr.Row():
316
- input_language = gr.Dropdown(["English", "French" ], label="input language",value="French",interactive=True)
317
- target_language = gr.Dropdown(["English", "French"], label="target language",value="English",interactive=True)
318
  audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")
319
  audio_output = gr.Markdown(label="output text")
320
  audio_button = gr.Button("process audio")
 
301
  #### Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community on 👻Discord: [Discord](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Polytonic](https://github.com/tonic-ai) & contribute to 🌟 [PolyGPT](https://github.com/tonic-ai/polygpt-alpha)"
302
  """
303
 
304
+
305
+ languages = ["English", "French"]
306
+
307
  with gr.Blocks(theme='ParityError/Anime') as iface :
308
  gr.Markdown(welcome_message)
309
  with gr.Tab("text summarization"):
 
316
  image_button = gr.Button("process image")
317
  with gr.Tab("speech to text translation"):
318
  with gr.Row():
319
+ input_language = gr.Dropdown(languages, label="input language",value="French",interactive=True)
320
+ target_language = gr.Dropdown(languages, label="target language",value="English",interactive=True)
321
  audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")
322
  audio_output = gr.Markdown(label="output text")
323
  audio_button = gr.Button("process audio")