Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
gradio-tests
/
increment
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
d6a656f
increment
/
app.py
abidlabs
HF Staff
Update app.py
d6a656f
over 2 years ago
raw
Copy download link
history
blame
Safe
228 Bytes
import
gradio
as
gr
with
gr.Blocks()
as
demo:
btn1 = gr.Button()
btn2 = gr.Button()
state = gr.State(
0
)
btn1.click(
lambda
x:x+
1
, state, state)
btn2.click(
lambda
x:x+
1
, state, state)
demo.launch()