Spaces:
Runtime error
Runtime error
Commit
·
7b0aeff
1
Parent(s):
ea52805
app.py
CHANGED
@@ -6,7 +6,7 @@ classifier = pipeline("text-classification", model="mrm8488/bert-tiny-finetuned-
|
|
6 |
|
7 |
def spam_detector(text):
|
8 |
result = classifier(text)
|
9 |
-
return "Spam" if result[
|
10 |
|
11 |
# Create Gradio UI
|
12 |
app = gr.Interface(
|
|
|
6 |
|
7 |
def spam_detector(text):
|
8 |
result = classifier(text)
|
9 |
+
return "Spam" if result[0]['label'] == 'spam' else "Not Spam"
|
10 |
|
11 |
# Create Gradio UI
|
12 |
app = gr.Interface(
|