OmerFarooq commited on
Commit
88f95a5
1 Parent(s): 3618416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -150,11 +150,12 @@ def get_grad(img):
150
  return grad_img_c, grad_img_d, text
151
 
152
  demo = gr.Interface(
153
- fn = get_grad,
154
- inputs = gr.Image(type = "pil", shape = (224,224)),
155
- 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]')],
156
- description = "Visual Explanations from Deep Networks",
157
- title = "Gradient-Weighted Class Activation Mapping (Grad-CAM)"
158
- )
 
159
  demo.launch()
160
 
 
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
  demo.launch()
161