from transformers import pipeline import gradio as gr PIPE = pipeline("text-classification", model='hackathon-somos-nlp-2023/roberta-base-bne-finetuned-suicide-es') def detect_suicide_comment(comentario): return PIPE(comentario) iface = gr.Interface(fn=detect_suicide_comment, inputs="text", outputs="text") iface.launch()