nlmaldonadog's picture
:rocket: Deploy model
81f640a verified
raw
history blame
339 Bytes
import gradio as gr
from transformers import pipeline
# Cargar el modelo
model = pipeline('sec2sec', model='nlmaldonadog/mbart-clarification-P8')
def predict(text):
return model(text)[0]['generated_text']
iface = gr.Interface(fn=predict, inputs=[gr.Textbox(placeholder='Escribe aquí...')], outputs="text")
iface.launch(share=True)