added one more level
Browse files
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.
|
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:
|