Skip to content

Commit

Permalink
streamlit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesun committed Dec 9, 2023
1 parent 16b0329 commit 1bcc747
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- coolstudy-volume:/data
ports:
- "8501:8501"
command: ["streamlit","run", "/CoolStudy.py"]
command: ["streamlit","run", "CoolStudy.py", "--server.port=8501"]
networks:
coolstudy_network:

Expand Down
22 changes: 22 additions & 0 deletions pages/01_🤖Streamlit_组件学习.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import streamlit as st


st.set_page_config(page_title="Streamlit 组件学习", page_icon="🤖")


st.sidebar.markdown("# 🤖Streamlit 组件学习")

with st.expander("全部代码"):
st.code(open(__file__, "r", encoding="utf-8").read(), language="python")

with st.expander("文本组件"):
st.text('固定宽度的文本')
st.markdown('markdown 格式文本 _Markdown_')
st.latex(r'''公式 e^{i\pi} + 1 = 0 ''')
st.write('Python 对象')
st.write(['st', 'is <', 3])
st.title('标题文本')
st.header('副标题文本')
st.subheader('二级副标题文本')
st.code('st.code("Hello, Streamlit!") # 代码块')

0 comments on commit 1bcc747

Please sign in to comment.