feat: 新增模块化Streamlit本地工具箱
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""本地工具箱入口:streamlit run app.py。"""
|
||||
import streamlit as st
|
||||
from ui import home_page, market_page, building_page, tasks_page, results_page
|
||||
|
||||
st.set_page_config(page_title="MarketGrid 工具箱", page_icon="🗺️", layout="wide")
|
||||
pages = {
|
||||
"home": st.Page(home_page.render, title="工具箱首页", icon="🏠", default=True),
|
||||
"market": st.Page(market_page.render, title="市场网格出图", icon="🗺️", url_path="market"),
|
||||
"buildings": st.Page(building_page.render, title="楼宇数据查询", icon="🏢", url_path="buildings"),
|
||||
"tasks": st.Page(tasks_page.render, title="任务中心", icon="⏳", url_path="tasks"),
|
||||
"results": st.Page(results_page.render, title="成果浏览", icon="📦", url_path="results"),
|
||||
}
|
||||
st.session_state["pages"] = pages
|
||||
with st.sidebar:
|
||||
st.title("MarketGrid")
|
||||
st.caption("本地空间数据工具箱")
|
||||
st.navigation({"工具": [pages["home"], pages["market"], pages["buildings"]],
|
||||
"工作记录": [pages["tasks"], pages["results"]]}).run()
|
||||
Reference in New Issue
Block a user