LysandreJik commited on
Commit
0a9d8ad
·
1 Parent(s): e3ecac1

Row layout

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -24,9 +24,12 @@ def plot(library: str, stacked: bool):
24
  return fig
25
 
26
 
27
- demo = gr.Interface(fn=plot, inputs=[
28
- gr.Dropdown(pipelines),
29
- gr.Checkbox(label='Stacked')
30
- ], outputs=gr.Plot())
 
 
 
31
 
32
  demo.launch()
 
24
  return fig
25
 
26
 
27
+ with gr.Blocks() as demo:
28
+ inputs = [gr.Dropdown(pipelines), gr.Checkbox(label='Stacked')]
29
+ with gr.Row():
30
+ outputs = [gr.Plot()]
31
+
32
+ submit = gr.Button('Submit')
33
+ submit.click(fn=plot, inputs=inputs, outputs=outputs)
34
 
35
  demo.launch()