Holoviews/Bokeh slider disappers in Streamlit

I also posted this in the streamlit forum.

I’m trying to use a Holoviews/Bokeh dynamic map which will give me a Bokeh based slider in Streamlit.

This code comes from the top example here. When the equivalent is run in jupyter, I get a Bokeh slider that allows me to modify the graph. However, in Streamlit the slider disappears and I see the static plot.

Can anyone tell me how to get the slider back?

import streamlit as st
import numpy as np
import holoviews as hv

frequencies = [0.5, 0.75, 1.0, 1.25]

def sine_curve(phase, freq):
    xvals = [0.1 * i for i in range(100)]
    return hv.Curve((xvals, [np.sin(phase + freq * x) for x in xvals]))

dmap = hv.DynamicMap(sine_curve, kdims=["phase", "frequency"])
a = hv.render(dmap.redim.range(phase=(0.5, 1), frequency=(0.5, 1.25)), backend="bokeh")

1 Like

See reply in Streamlit Post https://discuss.streamlit.io/t/geoviews-bokeh-slider-disappers-in-streamlit/10238/12?u=marc

1 Like