Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,13 +48,14 @@ def measure_readability(message,history):
|
|
48 |
spammy=""
|
49 |
else:
|
50 |
text = message
|
51 |
-
pipe = pipeline("text-classification", model="Titeiiko/OTIS-Official-Spam-Model")
|
|
|
52 |
x = pipe(text)[0]
|
53 |
if x["label"] == "LABEL_0":
|
54 |
-
spammy = "Content is not spammy-ish based on 4.39 million parameter AI Model called
|
55 |
##{"type":"Not Spam", "probability":x["score"]}
|
56 |
else:
|
57 |
-
spammy = "Content is spammy-ish based on
|
58 |
##{"type":"Spam", "probability":x["score"]}
|
59 |
|
60 |
vline1 = "==== Content Info ==== " + os.linesep
|
|
|
48 |
spammy=""
|
49 |
else:
|
50 |
text = message
|
51 |
+
#pipe = pipeline("text-classification", model="Titeiiko/OTIS-Official-Spam-Model")
|
52 |
+
pipe = pipeline("text-classification", model="mshenoda/roberta-spam")
|
53 |
x = pipe(text)[0]
|
54 |
if x["label"] == "LABEL_0":
|
55 |
+
spammy = "Content is not spammy-ish based on 4.39 million parameter AI Model called Roberta-Spam"
|
56 |
##{"type":"Not Spam", "probability":x["score"]}
|
57 |
else:
|
58 |
+
spammy = "Content is spammy-ish based on 125 million parameter AI Model called Roberta-Spam"
|
59 |
##{"type":"Spam", "probability":x["score"]}
|
60 |
|
61 |
vline1 = "==== Content Info ==== " + os.linesep
|