Sa-m's picture
Update app.py
334b67d
raw
history blame
422 Bytes
from googletrans import Translator
import gradio as gr
translator = Translator()
def translation(text):
translation = translator.translate(text)
res=translation.text
return res
inp_text = gr.inputs.Textbox(label='Input')
output = gr.outputs.Textbox(label='Output')
gr.Interface(fn=translation, inputs=inp_text, outputs=output, title='Translation',theme='peach').launch(enable_queue=True,cache_examples=True)