问题描述
根据Jupyter博客,现在可以嵌入静态网页中的交互式小部件:
According to the Jupyter blog here, it is now possible to embed interactive widgets in a static webpage:
当我打开上面的例子时,在firefox或chrome中,我可以获得交互式小部件!
When I open the example above, in firefox or chrome, I get the interactive widgets alright!
但是,如果我创建一个具有相同python代码的新笔记本,请将笔记本保存为html,然后复制粘贴可嵌入的HTML代码段以呈现交互式小部件,它不工作。我最多只获得一个小部件状态的图像,但没有任何交互式。
However, if I create a new notebook with the same bit of python code, save the notebook as html, and then copy-paste the embeddable HTML snippet to render the interactive widgets, it is not working. At best I obtain an image of the widget state, but nothing interactive.
有没有人设法用交互式小部件复制HTML页面?有什么东西我不见了吗?
Has anyone managed to replicate the HTML page with interactive widgets? Is there something that I am missing?
推荐答案
我们为此制作了Kyso。您可以使用kyso.io将jupyter笔记本嵌入到网站中。更多这里,只要小工具受到BokehJS仪表板的支持,笔记本将会互动。
We made Kyso for exactly this. You can embed a jupyter notebook into a website using kyso.io. More here blog and as long as the widgets are supported by BokehJS dashboard, the notebook will be interactive.
PS。 (免责声明 - 我是kyso的创始人)
PS. (disclaimer - I’m a founder of kyso)
这篇关于Jupyter:嵌入实时交互式小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!