Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
abidlabs
/
global-state-test
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
aa7ac0c
global-state-test
/
app.py
abidlabs
HF Staff
Update app.py
aa7ac0c
over 2 years ago
raw
Copy download link
history
blame
214 Bytes
import
gradio
as
gr
state =
0
def
update_state
(
num
):
global
state
state = num
with
gr.Blocks()
as
demo:
number = gr.Number(value=state)
number.change(update_state, number,
None
)
demo.launch()