Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def multiply (x,y):
|
| 2 |
+
return x*y
|
| 3 |
+
|
| 4 |
+
with gr.Blocks() as app:
|
| 5 |
+
|
| 6 |
+
gr.Label("Tabuada")
|
| 7 |
+
|
| 8 |
+
with gr.Row():
|
| 9 |
+
x_slider = gr.Slider(maximum=10, step=1, label="X")
|
| 10 |
+
y_slider = gr.Slider(maximum=12, step=1, label="y")
|
| 11 |
+
|
| 12 |
+
with gr.Row():
|
| 13 |
+
result = gr.Text()
|
| 14 |
+
y_slider.change(fn=multiply, inputs=[x_slider, y_slider], outputs=result)
|
| 15 |
+
|
| 16 |
+
app.launch()
|