Sa-m commited on
Commit
5bab865
1 Parent(s): f7aa0d7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from googletrans import Translator
2
+ import gradio as gr
3
+
4
+ translator = Translator()
5
+
6
+ def translation(text):
7
+ translation = translator.translate(text)
8
+ res=translation.text
9
+ return res
10
+
11
+
12
+ inp_text = gr.inputs.Textbox(label='Input')
13
+ output = gr.outputs.Textbox(label='Output')
14
+
15
+ gr.Interface(fn=translation, inputs=inp_text, outputs=output, title='Translation',theme='peach').launch(debug=True)
16
+
17
+