Jupyter:嵌入实时交互式小部件 [英] Jupyter: embed live interactive widgets

查看:1159
本文介绍了Jupyter:嵌入实时交互式小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Jupyter博客此处,现在可以嵌入静态网页中的交互式小部件:

According to the Jupyter blog here, it is now possible to embed interactive widgets in a static webpage:


现在可以通过插入包含序列化的html片段将实时交互式小部件嵌入到静态网页或博客中小部件状态。这也适用于自定义小部件库。请参阅 http://jupyter.org/embed-jupyter-widgets.html

当我打开上面的例子时,在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:嵌入实时交互式小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆