Spaces:
Sleeping
Sleeping
import gradio as gr | |
with gr.Blocks() as demo: | |
btn1 = gr.Button("Increment") | |
btn2 = gr.Button("Increment") | |
numb = gr.Number() | |
state = gr.State(0) | |
btn1.click(lambda x:(x+1,x+1), state, [state, numb]) | |
btn2.click(lambda x:(x+1,x+1), state, [state, numb], queue=False) | |
demo.launch() |