amitkayal commited on
Commit
cc3a014
·
1 Parent(s): e204026

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -82,8 +82,11 @@ def gradio_callback(view_grad_cam, num_gradcam_images, view_misclassified, num_m
82
  input_img, transparency = 0.5, target_layer_number = -1):
83
 
84
  confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
85
- visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
86
- return confidence, visualization
 
 
 
87
 
88
 
89
  title = "CIFAR10 trained on ResNet18 Model with GradCAM"
 
82
  input_img, transparency = 0.5, target_layer_number = -1):
83
 
84
  confidence = inference_confidences(input_img, transparency = 0.5, target_layer_number = -1)
85
+ if view_grad_cam:
86
+ visualization = inference_visualization(input_img, transparency = 0.5, target_layer_number = -1)
87
+ return confidence, visualization
88
+ else:
89
+ return confidence
90
 
91
 
92
  title = "CIFAR10 trained on ResNet18 Model with GradCAM"