Spaces:
Sleeping
Sleeping
File size: 448 Bytes
9981df6 36a2e00 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from transformers import pipeline
translation_pipeline = pipeline("translation_en_to_fr")
def translate_gradio(input):
result = translation_pipeline(input)
return result[0]['translation_text']
translate_interface = gr.Interface(fn = translate_gradio,
inputs="text",
outputs="text" )
translate_interface.launch(inline = False) |