from bokeh.plotting import curdoc
from bokeh.models import Button
from bokeh.models.widgets import Div

def add_button():
    print('adding button')
layout.children.append(Button(label='Hi I am another button', button_type=
    'success'))
button = Button(label='Click to add a button', button_type='success')
button.on_click(add_button)
layout = layout([[button]])
curdoc().add_root(layout)
Adding objects dynamically in bokeh server application