There are a few ways to interact with the Bokeh server, either by running apps directly in the server, or by connecting another python process with the client API. The sliders.py was written with the former in mind, and so was intended to be run like:
bokeh serve --show sliders.py
with no modifications. But if you are interested in using the client API, then yes you'd add the two lines you have, but you also need to add something like:
session.loop_until_closed()
at the very end. What's happening now is you run sliders.py, it publishes the plot, and then the script ends and the python process (the one you want to handle the callbacks!) terminates. The line above keeps the script running and continuing to respond to model changes.