Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def classify_image(inp):
|
|
96 |
modulator = (modulator - modulator.min()) / (modulator.max() - modulator.min())
|
97 |
cam3 = show_cam_on_image(img_d, modulator, use_rgb=True)
|
98 |
|
99 |
-
return {labels[i]: float(prediction[i]) for i in range(1000)}, Image.fromarray(cam0), Image.fromarray(cam1), Image.fromarray(cam2), Image.fromarray(cam3)
|
100 |
|
101 |
|
102 |
image = gr.inputs.Image()
|
@@ -119,7 +119,10 @@ gr.Interface(
|
|
119 |
label="Modulator at layer 6"),
|
120 |
gr.outputs.Image(
|
121 |
type="pil",
|
122 |
-
label="Modulator at layer 3"),
|
|
|
|
|
|
|
123 |
],
|
124 |
examples=[["./donut.png"], ["./horses.png"], ["./pencil.png"]],
|
125 |
).launch()
|
|
|
96 |
modulator = (modulator - modulator.min()) / (modulator.max() - modulator.min())
|
97 |
cam3 = show_cam_on_image(img_d, modulator, use_rgb=True)
|
98 |
|
99 |
+
return {labels[i]: float(prediction[i]) for i in range(1000)}, Image.fromarray(cam0), Image.fromarray(cam1), Image.fromarray(cam2), Image.fromarray(cam3), Image.fromarray(img_d)
|
100 |
|
101 |
|
102 |
image = gr.inputs.Image()
|
|
|
119 |
label="Modulator at layer 6"),
|
120 |
gr.outputs.Image(
|
121 |
type="pil",
|
122 |
+
label="Modulator at layer 3"),
|
123 |
+
gr.outputs.Image(
|
124 |
+
type="pil",
|
125 |
+
label="Cropped Input"),
|
126 |
],
|
127 |
examples=[["./donut.png"], ["./horses.png"], ["./pencil.png"]],
|
128 |
).launch()
|