I'm trying to export a notebook to HTML, inside the notebook there are multiple interactive panels.
import panel as pn
import hvplot as hv
import holoviews as hv2
from bokeh.io import output_notebook, push_notebook, show, save, output_file
from bokeh.resources import INLINE
def plot_ts(feature=Spends[0], target=Target[0]):
fig = df[target].plot.line(title=target)
fig += df[feature].plot.area(title=feature)
return fig.cols(1)
kw = dict(feature=sorted(list(Spends + Misc)))
panel1 = pn.interact(plot_ts, **kw)
panel1
Right now I'm running the following line:
!jupyter nbconvert --to html index.ipynb --no-input --no-prompt
The problem is my panels become stale (the corresponding data is not embed to them).
If I save panels one by one with the following line, I get the panels with the embed data.
panel1.save('test.html', embed=True, resources=INLINE)
I tried saving all my panels this way and then merge the different HTML files using Selenium but it doesn't work.
I tried appending panels to each others
all_panels.append(panel1).append(panel2).append(panel3)
all_panels.save("all_panels.html", embed=True)
The resulting HTML files is buggy, some panels work some others don't.
If anyone as any ideas how to make this work, it would be amazing.
Thanks