Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,8 @@ def classify_image(input):
|
|
39 |
img_pil=faceResized,
|
40 |
img_tensor=tensorResized,
|
41 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
42 |
-
n_components=
|
43 |
-
top_k=
|
44 |
)
|
45 |
result = gradCam.get_top_category(model, tensorResized)
|
46 |
cls = result[0]["label"]
|
@@ -64,7 +64,7 @@ iface = gr.Interface(
|
|
64 |
inputs="image",
|
65 |
outputs=["text", "number", "text", "image", "image", "image"],
|
66 |
title="Attraction Classifier - subjective",
|
67 |
-
description=f"Takes in a (224, 224) image and outputs an attraction class: {'pos', 'neg'}, along with a GradCam/DFF explanation. Face detection, cropping, and resizing are done internally. Uploaded images are not stored by us, but may be stored by HF. Refer to their [privacy policy](https://huggingface.co/privacy) for details.\nAssociated post: https://simtoon.ongakken.com/Projects/Personal/Girl+classifier/desc+-+girl+classifier"
|
68 |
)
|
69 |
|
70 |
iface.launch()
|
|
|
39 |
img_pil=faceResized,
|
40 |
img_tensor=tensorResized,
|
41 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
42 |
+
n_components=6,
|
43 |
+
top_k=15
|
44 |
)
|
45 |
result = gradCam.get_top_category(model, tensorResized)
|
46 |
cls = result[0]["label"]
|
|
|
64 |
inputs="image",
|
65 |
outputs=["text", "number", "text", "image", "image", "image"],
|
66 |
title="Attraction Classifier - subjective",
|
67 |
+
description=f"Takes in a (224, 224, 3) (RGB) image and outputs an attraction class: {'pos', 'neg'}, along with a GradCam/DFF explanation. Face detection, cropping, and resizing are done internally. Uploaded images are not stored by us, but may be stored by HF. Refer to their [privacy policy](https://huggingface.co/privacy) for details.\nAssociated post: https://simtoon.ongakken.com/Projects/Personal/Girl+classifier/desc+-+girl+classifier"
|
68 |
)
|
69 |
|
70 |
iface.launch()
|