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