Hemant0000 commited on
Commit
ee0fc9d
·
verified ·
1 Parent(s): 9faa847

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -136,7 +136,7 @@ def display_gradcam(img_path, heatmap, alpha=0.4):
136
  img = img.resize((224, 224)) # Resize the image to match model input size
137
 
138
  heatmap = np.uint8(255 * heatmap) # Convert heatmap to 0-255 scale
139
- heatmap = Image.fromarray(heatmap).resize((img.size), Image.ANTIALIAS)
140
  heatmap = np.array(heatmap)
141
 
142
  # Create figure to plot the image and heatmap
 
136
  img = img.resize((224, 224)) # Resize the image to match model input size
137
 
138
  heatmap = np.uint8(255 * heatmap) # Convert heatmap to 0-255 scale
139
+ heatmap = Image.fromarray(heatmap).resize((img.size), Image.LANCZOS)
140
  heatmap = np.array(heatmap)
141
 
142
  # Create figure to plot the image and heatmap