Spaces:
Sleeping
Sleeping
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() |