Spaces:
Runtime error
Runtime error
File size: 452 Bytes
5bab865 705cb77 bee31eb 5bab865 54642ab 5bab865 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from googletrans import Translator
import os
os.system("pip install gradio==2.9b12")
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)
|