jatamura commited on
Commit
728abb8
·
verified ·
1 Parent(s): bbfc25f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -49,14 +49,14 @@ app_ui = ui.page_fluid(
49
  )
50
 
51
  @module.ui
52
- def plot_ui():
53
  return ui.column(4, ui.output_plot("plot_prediction"))
54
 
55
  @module.server
56
  def plot_server(input, output, session, r, opacity):
57
  @output
58
- @render.plot
59
- def plot_prediction():
60
  fig, ax = plt.subplots()
61
 
62
  ax = plt.Axes(fig, [0., 0., 1., 1.])
@@ -146,7 +146,7 @@ def server(input, output, session: Session):
146
  ui.div(
147
  ui.row(
148
  ui.column(4, ui.img(src=f"data:image/png;base64,{r['image_base64']}")),
149
- plot_ui(f"plot_{i}"),
150
  ),
151
  opacity,
152
  ui.h5(r['filename'], style="margin-top: 15px;"),
 
49
  )
50
 
51
  @module.ui
52
+ def plot_ui(*args):
53
  return ui.column(4, ui.output_plot("plot_prediction"))
54
 
55
  @module.server
56
  def plot_server(input, output, session, r, opacity):
57
  @output
58
+ @render.ui
59
+ def plot_prediction(*args):
60
  fig, ax = plt.subplots()
61
 
62
  ax = plt.Axes(fig, [0., 0., 1., 1.])
 
146
  ui.div(
147
  ui.row(
148
  ui.column(4, ui.img(src=f"data:image/png;base64,{r['image_base64']}")),
149
+ plot_ui(f"plot_{i}", r, opacity),
150
  ),
151
  opacity,
152
  ui.h5(r['filename'], style="margin-top: 15px;"),