AttributeError: st.session_state has no attribute “history”. Did you forget to initialize it?

内容纲要

问题

AttributeError: st.session_state has no attribute "history". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization

原因

启动 streamlit gradio启动方式不对
不能再jupyter notebook中运行 streamlit 代码

解决方案

打开linux terminal命令行,输入以下命令启动相关脚本

streamlit run web_demo_gradio_stream.py

Leave a Comment

您的电子邮箱地址不会被公开。 必填项已用*标注

close
arrow_upward