minor issue fix
Browse files
app.py
CHANGED
@@ -53,14 +53,14 @@ 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.85 and result[0]["score"]
|
57 |
-
return result[0]["label"], result[0]["score"],
|
58 |
-
elif result[0]["label"] == "pos" and result[0]["score"] > 0.9 and result[0]["score"]
|
59 |
-
return result[0]["label"], result[0]["score"],
|
60 |
-
elif result[0]["label"] == "pos" and result[0]["score"] > 0.95 and result[0]["score"]
|
61 |
-
return result[0]["label"], result[0]["score"],
|
62 |
elif result[0]["label"] == "pos" and result[0]["score"] > 0.99:
|
63 |
-
return result[0]["label"], result[0]["score"],
|
64 |
else:
|
65 |
return cls, result[0]["score"], "Indifferent", face, dffImage, gradCamImage
|
66 |
|
|
|
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"], "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"], "Pretty!", face, dffImage, gradCamImage
|
60 |
+
elif result[0]["label"] == "pos" and result[0]["score"] > 0.95 and result[0]["score"] <= 0.99:
|
61 |
+
return result[0]["label"], result[0]["score"], "WHOA!!!!", face, dffImage, gradCamImage
|
62 |
elif result[0]["label"] == "pos" and result[0]["score"] > 0.99:
|
63 |
+
return result[0]["label"], result[0]["score"], "**ABSOLUTELY MINDBLOWING**", face, dffImage, gradCamImage
|
64 |
else:
|
65 |
return cls, result[0]["score"], "Indifferent", face, dffImage, gradCamImage
|
66 |
|