Harveenchadha commited on
Commit
fc2a883
1 Parent(s): d68e7cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -25,7 +25,11 @@ languages = list(INDIC.keys())
25
 
26
  #print(translate('helo how are you'))
27
  ddwn = grd.inputs.Dropdown(languages, type="value", default="Hindi", label="Select Target Language")
 
 
28
 
 
 
29
 
30
- iface = grd.Interface(fn=translate, inputs=["text",ddwn] , outputs="text")
31
  iface.launch(enable_queue=True)
 
25
 
26
  #print(translate('helo how are you'))
27
  ddwn = grd.inputs.Dropdown(languages, type="value", default="Hindi", label="Select Target Language")
28
+ txt = grd.inputs.Textbox( lines=20, placeholder="Enter Text to translate", default="", label="Enter Text in Source Language")
29
+ txt_ouptut = grd.inputs.Textbox( lines=20, placeholder="", default="", label="Translated text in Target Language")
30
 
31
+ example=[['I want to translate this sentence in Hindi','Hindi'],
32
+ ['I am feeling very good today.', 'Bengali']]
33
 
34
+ iface = grd.Interface(fn=translate, inputs=[txt,ddwn] , outputs=txt_output, title='Translation for Indic Languages', description = 'This is a demo based on IndicTrans.', article = 'Original repo [link](https://github.com/AI4Bharat/indicTrans) by AI4Bharat. <b>Note: This space can only perform translation from English to Indic languages. Support for other combinations will be provided soon.', examples=example)
35
  iface.launch(enable_queue=True)