I am new to Python3 and bokeh. I have a trouble with button in bokeh.
refresh = Button(label='refresh')
def change_click():
if refresh.label == 'refresh':
refresh.label = 'hello world'
else:
refresh.label = 'refresh'
refresh.on_click(change_click))
The above is my code, and I am coding in python with bokeh. What I want to make is that let the button's label change every time I click on it, but the label just change to 'hello world' when the program is loaded. And when I click the button, it will not change back to refresh even though the label is 'hello world'. Can some one give me an idea why is this happen and how can I fix it.
