siddhantuniyal commited on
Commit
0ff50a3
·
verified ·
1 Parent(s): 9fff2e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,9 +40,9 @@ def predict(image):
40
  api_name="/predict"
41
  )
42
 
43
- profanityFound = any(word in text.split() for word in profanity_hn)
44
 
45
- if not profanityFound and (engResult[0] == "NEITHER" or hingResult[0] == "NAG"):
46
  return ["not_hate" , "No Hate Symbols Detected"]
47
  else:
48
  return ["hate" , "No Hate Symbols Detected"]
@@ -55,4 +55,4 @@ iface = gr.Interface(fn=predict,
55
  )
56
 
57
  if __name__ == "__main__":
58
- iface.launch()
 
40
  api_name="/predict"
41
  )
42
 
43
+ profanityFound = any(word in ocr_text.split() for word in profanity_hn)
44
 
45
+ if not profanityFound and engResult[0] == "NEITHER" and hingResult[0] == "NAG":
46
  return ["not_hate" , "No Hate Symbols Detected"]
47
  else:
48
  return ["hate" , "No Hate Symbols Detected"]
 
55
  )
56
 
57
  if __name__ == "__main__":
58
+ iface.launch()