Spaces:
Runtime error
Runtime error
hussain-shk
commited on
Commit
•
cda5887
1
Parent(s):
83bccb7
added examples
Browse files
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 |
-
|
27 |
-
|
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=
|
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)
|