I was working on a ML project with streamlit and I absolutely love it ! But one major drawback I found was that there’s literally no possible way/workaround to have bi-directional communication with bokeh graphs. It becomes really a bottleneck when you are dealing with geo-data and you want the user to draw a polygon or something and process the selected data. I came across this issue last night and have managed to put together a component that does just that, its far from optimal solution and just a workaround but it sure does the job. I hope someone finds it useful
Checkout the code example. And give the repo a star if you find it nice. https://github.com/ash2shukla/streamlit-bokeh-events
EDIT: changed repo link, package name to streamlit-bokeh-events, added debounce for event dispatch, added example.