import streamlit as st | |
import runpy | |
st.set_page_config(layout="wide", page_title="My Multi-Page App") | |
# 动态加载子页面 | |
page = st.sidebar.radio("选择页面", ["天气查询助手", "博客写作助手"]) | |
if page == "天气查询助手": | |
runpy.run_path("examples/agent_api_web_demo.py", run_name="__main__") | |
elif page == "博客写作助手": | |
runpy.run_path("examples/multi_agents_api_web_demo.py", run_name="__main__") |