ancebuc's picture
Update app.py
e8355c3 verified
raw
history blame contribute delete
362 Bytes
import gradio as gr
from transformers import pipeline
def greet(text):
translation = pipeline('text2text-generation', model='ancebuc/mbart-translation-en-ro')
response = translation(text)[0]['generated_text']
return response
iface = gr.Interface(fn=greet,
inputs="text",
outputs="text")
iface.launch()