I’ve tried doing below to the file where my plot was created
html = file_html(layout, CDN)
file_path = "<HTML FILE PATH>"
with open(file_path, "w", encoding="utf-8") as file:
file.write(html)
Followed by these snippets which will be executed in the document for layouts etc
from bokeh.layouts import column
from bokeh.models.widgets import Div
from bokeh.io import curdoc
from bokeh.plotting import figure, output_file, show
with open("<HTML FILE PATH>", "r") as html_file:
html_content = html_file.read()
embedded_html_div = Div(text=html_content)
layout = column(embedded_html_div)
curdoc().add_root(layout)
However, I’m still struggling to incorporate the plot (i.e view it modify it, use it in a variable etc) into the new document as I’m unsure how to proceed from the embedded_html_div pt to actually getting the plot as it was in the original document. I’ve also tried bokeh serve operations but that just outputs a blank page, even though the actual plot is displayed fine when I open the html document obtained from the first block of snippets