Let’s say I have a global state variable called
Then I use it to create a number component:
num = gr.Number(value=count)
I can keep updating
count is supposed to change but there is a problem when reloading the page.
num would contain 0 instead of current value of
How do I make
num store the latest value of
I also want this to be possible in Jupyter notebook when running a cell with
%%blocks magic command (I like to open the localhost URL in browser to maximize screen space. It means that I can also reload the page.).