5Grains commited on
Commit
448a801
·
1 Parent(s): b54d7bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -59,8 +59,9 @@ def draw_plot(pred_img, seg):
59
  grid_spec = gridspec.GridSpec(1, 2, width_ratios=[6, 1])
60
 
61
  plt.subplot(grid_spec[0])
62
- plt.imshow(pred_img)
63
  plt.axis('off')
 
64
  LABEL_NAMES = np.asarray(labels_list)
65
  FULL_LABEL_MAP = np.arange(len(LABEL_NAMES)).reshape(len(LABEL_NAMES), 1)
66
  FULL_COLOR_MAP = label_to_color_image(FULL_LABEL_MAP)
 
59
  grid_spec = gridspec.GridSpec(1, 2, width_ratios=[6, 1])
60
 
61
  plt.subplot(grid_spec[0])
62
+ plt.imshow(pred_img.astype(np.uint8)) # Convert to uint8 before displaying
63
  plt.axis('off')
64
+
65
  LABEL_NAMES = np.asarray(labels_list)
66
  FULL_LABEL_MAP = np.arange(len(LABEL_NAMES)).reshape(len(LABEL_NAMES), 1)
67
  FULL_COLOR_MAP = label_to_color_image(FULL_LABEL_MAP)