Jupyter Notebook Voila扩展不显示HTML文件



我正在运行Jupyter Notebook并使用Voila扩展来显示仪表板视图。我有一个使用plot的交互式图表。express,我将其保存到HTML文件中,以便将其添加到IFrame中以显示在Voila仪表板中。我正在使用ipython来显示IFrame

from IPython.display import display, clear_output, IFrame, Image, HTML
display(IFrame(src="./test2.html", width=700, height=600))

这在笔记本中工作得很好,但当我运行Voila时,我得到一个403错误,说test2.html不是白名单。我如何在使用Jupyter Notebook Voila扩展时将文件列入白名单?

从这里:

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))

最新更新