drop down menu automatically updating

Hello everyone, I am trying to bring/update new values to the drop down menu. The code shows the list to be updating but the server menu is not showing any update. Here is the code

from bokeh.io import curdoc

from bokeh.layouts import column

from bokeh.models import ColumnDataSource, Select

from bokeh.plotting import figure

import numpy as np

xi=[‘1’,‘2’]

i=2

def update():

global menu

global i

global xi

i=i+1

xi.append(str(i))

print(xi)

menu = Select(options=xi,value=xi[0], title='Bars')

update()

curdoc().add_periodic_callback(update, 20000)

layout = column(menu)

curdoc().add_root(layout)