increment / app.py
abidlabs's picture
abidlabs HF Staff
Update app.py
c084358
raw
history blame
322 Bytes
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()