from transformers import pipeline import gradio as gr repo_id = "pamunarr/mbart-traduccion" traductor = pipeline('text2text-generation', model=repo_id) gr.Interface(fn=lambda frase : traductor(frase)[0]["generated_text"], inputs="text", outputs="text").launch(share=False)