Open MarcSkovMadsen opened 4 years ago
@MarcSkovMadsen This may just work now, if not it may work if we enable CDN resources.
Hi, @MarcSkovMadsen I just copied exactly what you did and run it but I got the following, do you know how can it be fixed?:
You are generating standalone HTML/JS output, but trying to use real Python callbacks (i.e. with on_change or on_event). This combination cannot work.
Only JavaScript callbacks may be used with standalone output. For more information on JavaScript callbacks with Bokeh, see:
https://docs.bokeh.org/en/latest/docs/user_guide/interaction/callbacks.html
Alternatively, to use real Python callbacks, a Bokeh server application may be used. For more information on building and running Bokeh applications, see:
https://docs.bokeh.org/en/latest/docs/user_guide/server.html
I would really like to see this functionality in streamlit. There is one use case where client-server bokeh/panel/holoviz is almost essential and that is streaming large raster data in an interactive plot with Datashader. I have 2 apps already that need this functionality which I would really like to build with streamlit. I assume this may require running/embedding a bokeh server, which is something I've been able to do in the past with Django
You might want to raise a corresponding issue on the streamlit repo and link it here, as there may be changes needed at either end to make it work smoothly.
Is this something that someone started on? I would see it as a brilliant feature if panel and streamlit could be fused that way to provide the benefits of both. For instance when plotting data with altair in panel within a streamlit app, selections on the chart could be funnelled back, e.g. to filter data etc. This is currently not possible using streamlit alone (at least not for sophisticated altair charts)
Hi @robna
I can't see how the Streamlit architecture could enable something like datashader. And with the 2023 roadmap where they want to move away from having state on the server it would get even more difficult.
But try requesting this on the Streamlit GitHub.
There are a lot of different ways to handle state, but at least plotly Dash supports Datashader using a stateless model: https://dash.plotly.com/holoviews#visualizing-large-datasets-with-datashader
Being stateless means being unable to use certain optimizations that rely on intermediate state being held on the server, but apart from performance the same UI can be presented even if the server is stateless.
thx Marc and jbednar, actually since I posted last time I have read a bit or two about Panel (which I have not been exposed to before). So my resume is in fact that, it would make more sense to "translate" my apps completely from streamlit to panel, as I think the advantages outweigh the effort ;)
I don't know if you are interested, but if you are you can actually enable the use of Panel in Streamlit. I think there would only be small details to solve.
Try running the below app.py file with
streamlit run app.py
You will see it works as long as you are using
hv_plot
only.If you uncheck you get errors like the below.
If the technical problems are solved it could look like
I'm running Streamlit 0.55 and Panel 0.8.0.
My guess is that it's actually possible to do more. Both Streamlit and Panel are running on the Tornado server so my guess is that all the callback/ reactive power of Panel could be turned on in Streamlit.