drhead commited on
Commit
a6b4c50
·
verified ·
1 Parent(s): f65a662

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -239,7 +239,8 @@ def create_cam_visualization_pil(image_pil, cam, alpha=0.6, vis_threshold=0.2):
239
  Returns:
240
  PIL.Image.Image with overlay
241
  """
242
-
 
243
  w, h = image_pil.size
244
 
245
  # Resize CAM to match image
 
239
  Returns:
240
  PIL.Image.Image with overlay
241
  """
242
+ if cam is None:
243
+ return image_pil
244
  w, h = image_pil.size
245
 
246
  # Resize CAM to match image