nlmaldonadog's picture
Update app.py
fc73c91 verified
raw
history blame
352 Bytes
import gradio as gr
from transformers import pipeline
# Cargar el modelo
model = pipeline('text2text-generation', 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)