Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def classify_image(input):
|
|
50 |
input_tensor=tensorResized,
|
51 |
input_image=faceResized,
|
52 |
reshape_transform=gradCam.reshape_transform_vit_huggingface)
|
53 |
-
result = pipe(
|
54 |
if result[0]["label"] == "pos" and result[0]["score"] > 0.9 and result[0]["score"] < 0.95:
|
55 |
return result[0]["label"], result[0]["score"], str("Nice!"), face, dffImage, gradCamImage
|
56 |
elif result[0]["label"] == "pos" and result[0]["score"] > 0.95:
|
@@ -58,6 +58,7 @@ def classify_image(input):
|
|
58 |
else:
|
59 |
return result[0]["label"], result[0]["score"], "Indifferent", face, dffImage, gradCamImage
|
60 |
|
|
|
61 |
iface = gr.Interface(
|
62 |
fn=classify_image,
|
63 |
inputs="image",
|
|
|
50 |
input_tensor=tensorResized,
|
51 |
input_image=faceResized,
|
52 |
reshape_transform=gradCam.reshape_transform_vit_huggingface)
|
53 |
+
result = pipe(faceResized)
|
54 |
if result[0]["label"] == "pos" and result[0]["score"] > 0.9 and result[0]["score"] < 0.95:
|
55 |
return result[0]["label"], result[0]["score"], str("Nice!"), face, dffImage, gradCamImage
|
56 |
elif result[0]["label"] == "pos" and result[0]["score"] > 0.95:
|
|
|
58 |
else:
|
59 |
return result[0]["label"], result[0]["score"], "Indifferent", face, dffImage, gradCamImage
|
60 |
|
61 |
+
|
62 |
iface = gr.Interface(
|
63 |
fn=classify_image,
|
64 |
inputs="image",
|