import pandas as pd from fastai.text.all import * try: import transformers except ImportError: os.system('pip install transformers') import transformers import gradio as gr from transformers import pipeline repo_id = "lauragordo/mbart-traduct" traduct = pipeline('text2text-generation', model=repo_id) def predict(texto): return traduct(texto) gr.Interface(fn=predict, inputs="textbox", outputs="textbox", examples=["When is your birthday", "i like flowers"]).launch(share=True)