Spaces:
Sleeping
Sleeping
Tirath5504
commited on
Commit
•
ec74a93
1
Parent(s):
90c3f92
Update app.py
Browse files
app.py
CHANGED
@@ -44,9 +44,9 @@ def predict(image):
|
|
44 |
|
45 |
if profanityFound:
|
46 |
return ["hate", "Profanity Found"]
|
47 |
-
elif engResult[0] != "NEITHER"
|
48 |
return ["hate", f"Result: {engResult}, Text: {ocr_text}"]
|
49 |
-
elif hingResult[0] != "NAG"
|
50 |
return ["hate", f"Result: {hingResult}, Text: {ocr_text}"]
|
51 |
else:
|
52 |
return ["not_hate", "No hate found, yay!"]
|
|
|
44 |
|
45 |
if profanityFound:
|
46 |
return ["hate", "Profanity Found"]
|
47 |
+
elif engResult[0] != "NEITHER" and engResult[1] > 0.5:
|
48 |
return ["hate", f"Result: {engResult}, Text: {ocr_text}"]
|
49 |
+
elif hingResult[0] != "NAG" and hingResult[1] > 0.5:
|
50 |
return ["hate", f"Result: {hingResult}, Text: {ocr_text}"]
|
51 |
else:
|
52 |
return ["not_hate", "No hate found, yay!"]
|