ongkn commited on
Commit
a141a20
·
unverified ·
1 Parent(s): 7946495

added one more level

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -53,8 +53,10 @@ def classify_image(input):
53
  input_tensor=tensorResized,
54
  input_image=faceResized,
55
  reshape_transform=gradCam.reshape_transform_vit_huggingface)
56
- if result[0]["label"] == "pos" and result[0]["score"] > 0.9 and result[0]["score"] < 0.95:
57
  return result[0]["label"], result[0]["score"], str("Nice!"), face, dffImage, gradCamImage
 
 
58
  elif result[0]["label"] == "pos" and result[0]["score"] > 0.95:
59
  return result[0]["label"], result[0]["score"], str("WHOA!!!!"), face, dffImage, gradCamImage
60
  else:
 
53
  input_tensor=tensorResized,
54
  input_image=faceResized,
55
  reshape_transform=gradCam.reshape_transform_vit_huggingface)
56
+ if result[0]["label"] == "pos" and result[0]["score"] > 0.85 and result[0]["score"] < 0.9:
57
  return result[0]["label"], result[0]["score"], str("Nice!"), face, dffImage, gradCamImage
58
+ elif result[0]["label"] == "pos" and result[0]["score"] > 0.9 and result[0]["score"] < 0.95:
59
+ return result[0]["label"], result[0]["score"], str("Pretty!"), face, dffImage, gradCamImage
60
  elif result[0]["label"] == "pos" and result[0]["score"] > 0.95:
61
  return result[0]["label"], result[0]["score"], str("WHOA!!!!"), face, dffImage, gradCamImage
62
  else: