Spaces:
Runtime error
Runtime error
Tirath5504
commited on
Commit
•
90c3f92
1
Parent(s):
28ad0c2
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" or engResult[1] < 0.
|
48 |
return ["hate", f"Result: {engResult}, Text: {ocr_text}"]
|
49 |
-
elif hingResult[0] != "NAG" or hingResult:
|
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" or engResult[1] < 0.5:
|
48 |
return ["hate", f"Result: {engResult}, Text: {ocr_text}"]
|
49 |
+
elif hingResult[0] != "NAG" or hingResult[1] < 0.5:
|
50 |
return ["hate", f"Result: {hingResult}, Text: {ocr_text}"]
|
51 |
else:
|
52 |
return ["not_hate", "No hate found, yay!"]
|