File size: 258 Bytes
0ba3470
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr

def update_value(val):
  return f'Value is set to {val}'

demo = gr.Blocks()

with demo:
  inp = gr.Slider(0, 100, label='Value')
  md = gr.Markdown('Select a value')

  inp.change(fn=update_value, inputs=inp, outputs=md)

demo.launch()