Spaces:
Sleeping
Sleeping
File size: 366 Bytes
587987d 3f7af67 587987d 7e237f7 |
1 2 3 4 5 6 7 8 9 10 11 |
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() |