File size: 219 Bytes
54f59a2
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr

state = gr.State(0)

with gr.Blocks() as demo:
    btn1 = gr.Button()
    btn2 = gr.Button()

    btn1.click(lambda x:x+1, state, state)
    btn2.click(lambda x:x+1, state, state)    

demo.launch()