我正在运行一个木星笔记本和使用Voila扩展显示仪表板视图。我有一个使用plotly.express的交互式图表,我将它保存到一个HTML中,这样我就可以将它添加到一个IFrame中,以显示在Voila仪表板中。我使用IPhython来显示IFrame
from IPython.display import display, clear_output, IFrame, Image, HTML
display(IFrame(src="./test2.html", width=700, height=600))这在笔记本中很好,但是当我运行Voila时,我得到一个403错误,说明test2.html没有被白化。如何在使用木星笔记本Voila扩展名的同时白化文件?
发布于 2022-04-19 15:29:42
来自这里
import ipywidgets as widgets
from IPython.display import display, IFrame
out = widgets.Output()
@out.capture()
def render():
display(IFrame(src='./test2.html',width=700, height=600))https://stackoverflow.com/questions/71924109
复制相似问题