我正在开发一个简单的多页 Streamlit 应用程序,它允许对某些数据执行 CRUD 操作。我知道创建一个
pages
目录将允许我在我的应用程序中拥有多个页面,这就是我所做的,如下所示,
我的项目结构如下所示,
/Home.py
/pages/Add_Pikcups.py
/pages/View_Pickups.py
现在,我想在我的应用程序中有多个部分。例如,这些是“Pickups”部分下的页面,然后我还希望有一个“Drops”部分等等。
有什么方法可以自定义侧边栏以将页面显示为多个部分吗?
所以,我想要类似的东西,
皮卡
滴
不是要点,但我希望这个想法很清楚。
pages/drops.py
import streamlit as st
st.sidebar.radio('drops sub-menu', options=['add drops', 'view drops'])
st.sidebar.checkbox('special')
pages/pickups.py
import streamlit as st
st.sidebar.selectbox('Person incharge', options=['john', 'peter'], index=0)
st.sidebar.selectbox('location', options=['manila', 'tokyo'], index=1)