hussain-shk commited on
Commit
cda5887
1 Parent(s): 83bccb7

added examples

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,9 +23,9 @@ drop_down = gr.inputs.Dropdown(languages, type="value", default="Hindi", label="
23
  text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to translate", default="", label="Enter Text in English")
24
  text_ouptut = gr.outputs.Textbox(type="auto", label="Translated text in Target Language")
25
 
26
- # example=[['I want to translate this sentence in Hindi','Hindi'],
27
- # ['I am feeling very good today.', 'Bengali']]
28
 
29
  supported_lang = ', '.join(languages)
30
- iface = gr.Interface(fn=translate, inputs=[text,drop_down] , outputs=text_ouptut, title='IndicTrans NMT System', description = 'Currently the model supports ' + supported_lang, article = 'Original repository can be found [here](https://github.com/AI4Bharat/indicTrans)' , examples=None)
31
  iface.launch(enable_queue=True)
 
23
  text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to translate", default="", label="Enter Text in English")
24
  text_ouptut = gr.outputs.Textbox(type="auto", label="Translated text in Target Language")
25
 
26
+ example=[['Farmers are backbone of our Indian economy.','Hindi'],
27
+ ['India, officially the Republic of India, is a country in South Asia.', 'Marathi']]
28
 
29
  supported_lang = ', '.join(languages)
30
+ iface = gr.Interface(fn=translate, inputs=[text,drop_down] , outputs=text_ouptut, title='IndicTrans NMT System', description = 'Currently the model supports ' + supported_lang, article = 'Original repository can be found [here](https://github.com/AI4Bharat/indicTrans)' , examples=example)
31
  iface.launch(enable_queue=True)