Spaces:
Sleeping
Sleeping
File size: 391 Bytes
54f59a2 c084358 d6a656f c084358 d6a656f ef51059 54f59a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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], api_name="increment_with_queue")
btn2.click(lambda x:(x+1,x+1), state, [state, numb], queue=False, api_name="increment_without_queue")
demo.launch() |