Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,10 +50,11 @@ app_ui = ui.page_fluid(
|
|
| 50 |
|
| 51 |
@module.ui
|
| 52 |
def plot_ui():
|
| 53 |
-
return ui.
|
| 54 |
|
| 55 |
@module.server
|
| 56 |
def plot_server(input, output, session, r, opacity):
|
|
|
|
| 57 |
@render.plot
|
| 58 |
def plot_prediction():
|
| 59 |
fig, ax = plt.subplots()
|
|
@@ -140,7 +141,7 @@ def server(input, output, session: Session):
|
|
| 140 |
id = "image_" + str(i)
|
| 141 |
opacity = ui.input_slider(id, "Opacity", 0, 1.0, 0.5)
|
| 142 |
|
| 143 |
-
|
| 144 |
|
| 145 |
ui_output.append(
|
| 146 |
ui.div(
|
|
|
|
| 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()
|
|
|
|
| 141 |
id = "image_" + str(i)
|
| 142 |
opacity = ui.input_slider(id, "Opacity", 0, 1.0, 0.5)
|
| 143 |
|
| 144 |
+
plot_server(f"plot_{i}",r=r, opacity=input[id]())
|
| 145 |
|
| 146 |
ui_output.append(
|
| 147 |
ui.div(
|