Hi there! I have a text status bar that I’d like to update during a long compute. If I view the app in Jupyter, the updates to the status bar happen as python progresses through the code. If I deploy that app, the updates are blocked and are not visible until the python process is complete. I’m trying to understand why.
Here is a reproducible example:
import panel as pn
import param
import time
pn.extension()
class TestPanel(param.Parameterized):
def __init__(self, **params):
self.status_text = pn.widgets.StaticText(name='Status', value='Click "Evaluate"')
self.evaluate_button = pn.widgets.Button(name='Evaluate', button_type='warning')
self.evaluate_button.on_click(self.run_evaluate)
super().__init__(**params)
def run_evaluate(self, event=None):
self.status_text.value = 'start'
time.sleep(3)
self.status_text.value = 'continuing'
time.sleep(3)
self.status_text.value = 'end'
def panel(self):
return pn.Column(self.status_text, self.evaluate_button)
app = TestPanel()
app.panel().servable()
Any ideas what is happening or what I can do to fix it?