dariolopez commited on
Commit
c6cbb95
·
1 Parent(s): cb110ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,10 +1,8 @@
1
- import os
2
  from transformers import pipeline
3
  import gradio as gr
4
 
5
 
6
  pipe = pipeline("text-classification", model='hackathon-somos-nlp-2023/roberta-base-bne-finetuned-suicide-es')
7
- hf_writer = gr.HuggingFaceDatasetSaver(os.environ['HF_API_TOKEN'], "text-classification-mistakes")
8
 
9
 
10
  def detect_suicide_comment(input):
@@ -12,6 +10,6 @@ def detect_suicide_comment(input):
12
 
13
 
14
  iface = gr.Interface(
15
- fn=detect_suicide_comment, inputs="text", outputs="text", allow_flagging="manual", flagging_callback=hf_writer
16
  )
17
  iface.launch()
 
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
 
5
  pipe = pipeline("text-classification", model='hackathon-somos-nlp-2023/roberta-base-bne-finetuned-suicide-es')
 
6
 
7
 
8
  def detect_suicide_comment(input):
 
10
 
11
 
12
  iface = gr.Interface(
13
+ fn=detect_suicide_comment, inputs="text", outputs="text"
14
  )
15
  iface.launch()