Spaces:
Sleeping
Sleeping
File size: 352 Bytes
81f640a fc73c91 81f640a |
1 2 3 4 5 6 7 8 9 10 11 12 |
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)
|