gradio-demo / app.py
muhammadayman's picture
Update app.py
17ddd13
raw
history blame
448 Bytes
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)