Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,19 +52,16 @@ with gradio.Blocks() as demo:
|
|
| 52 |
design = gradio.Slider(1, 100, step=1, value=1, label="Design Number")
|
| 53 |
|
| 54 |
with gradio.Row():
|
| 55 |
-
btn1 = gradio.Button("
|
| 56 |
-
btn1.click(fn=lambda x: gradio.Slider.update(value=x-1), inputs=[design], outputs=[design])
|
| 57 |
-
btn2 = gradio.Button("Forward
|
| 58 |
-
btn2.click(fn=lambda x: gradio.Slider.update(value=x+1), inputs=[design], outputs=[design])
|
| 59 |
|
| 60 |
with gradio.Column():
|
| 61 |
output = gradio.Plot(value=print_design(1, 1, 1))
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
participant.change(fn=print_design, inputs=[team, participant, design], outputs=[output])
|
| 67 |
-
team.change(fn=print_design, inputs=[team, participant, design], outputs=[output])
|
| 68 |
-
design.change(fn=print_design, inputs=[team, participant, design], outputs=[output])
|
| 69 |
|
| 70 |
demo.launch(debug=True)
|
|
|
|
| 52 |
design = gradio.Slider(1, 100, step=1, value=1, label="Design Number")
|
| 53 |
|
| 54 |
with gradio.Row():
|
| 55 |
+
btn1 = gradio.Button("< Reverse", variant="secondary")
|
| 56 |
+
btn1.click(fn=lambda x: gradio.Slider.update(value=x-1), inputs=[design], outputs=[design], show_progress=False)
|
| 57 |
+
btn2 = gradio.Button("Forward >", variant="primary")
|
| 58 |
+
btn2.click(fn=lambda x: gradio.Slider.update(value=x+1), inputs=[design], outputs=[design], show_progress=False)
|
| 59 |
|
| 60 |
with gradio.Column():
|
| 61 |
output = gradio.Plot(value=print_design(1, 1, 1))
|
| 62 |
|
| 63 |
+
participant.change(fn=print_design, inputs=[team, participant, design], outputs=[output], show_progress=False)
|
| 64 |
+
team.change(fn=print_design, inputs=[team, participant, design], outputs=[output], show_progress=False)
|
| 65 |
+
design.change(fn=print_design, inputs=[team, participant, design], outputs=[output], show_progress=False)
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
demo.launch(debug=True)
|