File size: 329 Bytes
8475c22
 
 
 
2aa9dad
8475c22
 
cb110ca
 
8475c22
 
a3a02f1
c6cbb95
a3a02f1
8475c22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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(input):
    return pipe(input)


iface = gr.Interface(
    fn=detect_suicide_comment, inputs="text", outputs="text"
)
iface.launch()