sdafd commited on
Commit
e6281e2
1 Parent(s): bb5b265

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -4,11 +4,7 @@ from transformers import pipeline
4
  def analyze_output(input_text):
5
  pipe = pipeline("text-classification", model="ZachBeesley/Spam-Detector")
6
  result = pipe(input_text)[0]
7
- if result["label"] == "LABEL_0":
8
- return f"Not Spam: {result['score']:.4f}"
9
- else:
10
- return f"Spam: {result['score']:.4f}"
11
-
12
  iface = gr.Interface(
13
  fn=analyze_output,
14
  inputs=gr.Textbox(),
 
4
  def analyze_output(input_text):
5
  pipe = pipeline("text-classification", model="ZachBeesley/Spam-Detector")
6
  result = pipe(input_text)[0]
7
+ return str(result)
 
 
 
 
8
  iface = gr.Interface(
9
  fn=analyze_output,
10
  inputs=gr.Textbox(),