Spaces:
Runtime error
Runtime error
OmerFarooq
commited on
Commit
•
96d3d00
1
Parent(s):
b61f228
Update app.py
Browse files
app.py
CHANGED
@@ -149,14 +149,14 @@ def get_grad(img):
|
|
149 |
text = "Raw Score: " + str(y_pred[0]) + "\nClassification: " + infer
|
150 |
return grad_img_c, grad_img_d, text
|
151 |
|
152 |
-
demo = gr.Interface(
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
)
|
160 |
|
161 |
with gr.Blocks() as demo:
|
162 |
with gr.Row().style(equal_height=True):
|
|
|
149 |
text = "Raw Score: " + str(y_pred[0]) + "\nClassification: " + infer
|
150 |
return grad_img_c, grad_img_d, text
|
151 |
|
152 |
+
# demo = gr.Interface(
|
153 |
+
# fn = get_grad,
|
154 |
+
# with gr.Row():
|
155 |
+
# inputs = gr.Image(type = "pil", shape = (224,224), width = 320, height = 320),
|
156 |
+
# outputs = [gr.Image(type = "numpy", width = 320, height = 320, label = "Grad_CAM w.r.t cat"), gr.Image(type = "numpy", width = 320, height = 320, label = "Grad_CAM w.r.t dog"), gr.Textbox(label = 'Prediction', info = '[P of cat, P of dog]')],
|
157 |
+
# description = "Visual Explanations from Deep Networks",
|
158 |
+
# title = "Gradient-Weighted Class Activation Mapping (Grad-CAM)"
|
159 |
+
# )
|
160 |
|
161 |
with gr.Blocks() as demo:
|
162 |
with gr.Row().style(equal_height=True):
|