Tirath5504 commited on
Commit
1af7581
·
verified ·
1 Parent(s): 0f71548

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,7 +24,9 @@ def predict(image):
24
 
25
  label , confidence = imgResult[0]['label'] , float(imgResult[1]['label'])
26
 
27
- if confidence > 0.95:
 
 
28
  return ["hate" , f"label: {label}, confidence: {confidence}"]
29
  else:
30
 
 
24
 
25
  label , confidence = imgResult[0]['label'] , float(imgResult[1]['label'])
26
 
27
+ if label == 'finger_gun_to_the_head' and confidence > 0.98:
28
+ return ["hate" , f"label: {label}, confidence: {confidence}"]
29
+ elif label != 'finger_gun_to_the_head' and confidence > 0.95:
30
  return ["hate" , f"label: {label}, confidence: {confidence}"]
31
  else:
32