Tirath5504 commited on
Commit
ec74a93
1 Parent(s): 90c3f92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.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!"]
 
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!"]