赞
踩
1.主程式如下 ,app.py
import app1
import app2
import streamlit as st
PAGES = {"範例一": app1,"範例二": app2}
st.sidebar.title('Navigation')
selection = st.sidebar.radio("Go to", list(PAGES.keys()))
page = PAGES[selection]
page.app()
2.產生另外兩個 py檔案 app1, app2
import streamlit as st
def app():
st.title('APP1')
st.write('Welcome to app1')
import streamlit as st
def app():
st.title(‘APP2’)
st.write(‘Welcome to app2’)
3.呈現畫面如下
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。