mohammad2928git commited on
Commit
9cc1d9d
·
verified ·
1 Parent(s): a5d46dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,5 +5,6 @@ def translate(input_text, language):
5
  translated = GoogleTranslator(source='auto', target=str(language)).translate(input_text)
6
  return translated
7
 
8
- demo = gr.Interface(fn=translate, inputs=["text", 'target language (en, de, fr)'], outputs="text")
 
9
  demo.launch(debug=True)
 
5
  translated = GoogleTranslator(source='auto', target=str(language)).translate(input_text)
6
  return translated
7
 
8
+ options_1 = ['en', 'de', 'fr']
9
+ demo = gr.Interface(fn=translate, inputs=["text", gr.inputs.Dropdown(options=options_1),], outputs="text")
10
  demo.launch(debug=True)