【发布时间】:2021-08-30 18:45:02
【问题描述】:
我正在使用 Python 3.7 中的 Streamlit 库开发一个停车数据应用程序,我想使用自定义 JavaScript 来显示停车位的可用性以进行可视化。 是否可以在 streamlit web 应用程序中显示 HTML/javascript 元素
【问题讨论】:
-
祝你好运。收到错误消息时回来。
-
@furas 我问这是可能的,我似乎没有在 Streamlit 文档中找到任何关于它的信息。
-
然后检查源代码。
-
使用谷歌
streamlit add html我发现How to render already prepared html code with Streamlit?使用st.markdown(html_string, unsafe_allow_html=True)。它认为您可以使用它来添加 HTML 和 JavaScript。但在文档中我找到了Create a Streamlit Component,也许这会更有趣。
标签: javascript python streamlit