jatamura commited on
Commit
2a6b790
·
verified ·
1 Parent(s): 330b441

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -109,7 +109,7 @@ def server(input, output, session: Session):
109
 
110
  @output(id="plot_" + str(i))
111
  @render.plot
112
- def f():
113
  fig, ax = plt.subplots()
114
 
115
  ax = plt.Axes(fig, [0., 0., 1., 1.])
@@ -131,6 +131,7 @@ def server(input, output, session: Session):
131
  out = v.overlay_instances(masks = r["instances"].pred_masks.to("cpu"),
132
  assigned_colors = colours,
133
  alpha = input[id]())
 
134
  ax.imshow(cv2.cvtColor(out.get_image()[:, :, ::-1], cv2.COLOR_BGR2RGB))
135
 
136
  return fig
 
109
 
110
  @output(id="plot_" + str(i))
111
  @render.plot
112
+ def plot_prediction():
113
  fig, ax = plt.subplots()
114
 
115
  ax = plt.Axes(fig, [0., 0., 1., 1.])
 
131
  out = v.overlay_instances(masks = r["instances"].pred_masks.to("cpu"),
132
  assigned_colors = colours,
133
  alpha = input[id]())
134
+ print(out)
135
  ax.imshow(cv2.cvtColor(out.get_image()[:, :, ::-1], cv2.COLOR_BGR2RGB))
136
 
137
  return fig