I have PANEL application, where after clicking a button it performs some task. After 5 seconds of performing that task , I want to reload(refresh) the page.
tabs = pn.Tabs(dynamic=True)
update_status_text = pn.widgets.StaticText()
def approve_requests(event):
update_status_text.value = "APPROVED"
tabs.append(update_status_text)
## Performing other database transactions here
approve_button = pn.widgets.Button(name='APPROVE', button_type='primary')
approve_button.on_click(approve_requests)
tabs.servable()
time.sleep(5)
## Need to add refresh page code here so that the page I am showing resets.
I am showing a lot of things on the front page, but here I have added one single thing as an example so that anyone can reproduce this.