Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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(),
|