B45370's picture
Update app.py
7e237f7 verified
raw
history blame contribute delete
366 Bytes
import gradio as gr
import httpcore
setattr(httpcore, 'SyncHTTPTransport', 'AsyncHTTPProxy')
from googletrans import Translator
translator = Translator()
def frYoTranslate(message, history):
fr_text = message
translated = translator.translate(text = message, src = 'fr', dest = 'yo').text
return translated
gr.Interface(frYoTranslate, 'text', 'text').launch()