Hi community, can someone please help to create a minimal example for the new Progress widget in bokeh 3.7. My use case is the indeterminate mode while a computation runs in a Python callback. Here is a non-working minimal example.
from time import sleep
from bokeh.io import curdoc
from bokeh.models import Button, Progress
from bokeh.layouts import column
def func():
progress.disabled = False
sleep(3) # run computation
progress.disabled = True
button = Button(width=300, button_type='primary', label='press me')
button.on_click(func)
progress = Progress(width=300, mode='indeterminate', disabled=True)
curdoc().add_root(column(button, progress))
The Progress widget will run as soon as the application opens (a bar moves back and forth real-time) if initialized with disabled=False, however changing the same attribute in the Python callback triggered by the Button has no effect. The objective is to enable the widget while the Python callback runs, then to disable. It is important in my use case to manage the Progress widget from the Python callback.
Thank you very much for creating the new feature, and for any help you can offer here.