pbrusola commited on
Commit
8d322db
1 Parent(s): 9cf0bfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
 
1
+ import gradio as gr
2
+ with gr.Blocks() as demo:
3
+ radio = gr.Radio([1, 2, 4], label="Set the value of the number")
4
+ number = gr.Number(value=2, interactive=True)
5
+ radio.change(fn=lambda value: gr.update(value=value), inputs=radio, outputs=number)
6
+ demo.launch()
7
+
8
  import gradio as gr
9
  from transformers import pipeline
10