如何在木星集线器环境中运行简化应用程序

发布于 2025-02-08 07:37:53 字数 436 浏览 2 评论 0原文

想象一下您在木星枢纽环境中工作。

您安装简化如下:

pip install --user streamlit

然后,我创建一个文件,如:

import streamlit as st

st.title('This is a Streamlit test in JH')

如果我在自己的本地笔记本电脑中,我可以转到命令行并写入:

streamlit run whatevername.py

该应用在浏览器的Localhost中显示。

如果我在木星中心工作,该如何可视化同一应用? 我希望能够以将笔记本与Voila呈现的方式相同的方式渲染。

编辑1: 这里的目的不仅是为用户渲染简化应用程序,而且还将其提供给Hub的其他用户。

Imagine you work in a Jupiter Hub environment.

You install streamlit as follows:

pip install --user streamlit

Then I create a file as:

import streamlit as st

st.title('This is a Streamlit test in JH')

If I am in my own local laptop I can go to the command line and write:

streamlit run whatevername.py

and the app is shown in the localhost of the browser.

How can I visualise the same app if I am working in a Jupiter Hub?
I would like to be able to render such an app in the same way the notebooks are visualised by rendering them with voila.

EDIT 1:
The intention here is not only to render the streamlit app for the user, but serve it to other users of the HUB.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文