Spaces:
Running
Running
Mathias Heider
ui: design system + branded shell (agent/ui_theme.py, light theme, brand row, footer)
65f8872 Download app.py from aim4composites/AutonomousAgent: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/spaces/aim4composites/AutonomousAgent/resolve/main/app.py
- Command line
-
hf download hf://spaces/aim4composites/AutonomousAgent/app.py
-
curl -L -o app.py https://huggingface.co/spaces/aim4composites/AutonomousAgent/resolve/main/app.py
1.78 kB
| """AIM Composites β Autonomous Ingestion Agent Space. | |
| Streamlit shell: navigation + one-time boot (schema, query seeding, background | |
| scheduler). The agent itself lives in agent/orchestrator.py and keeps running | |
| whether or not anyone is viewing the app. | |
| """ | |
| import logging | |
| import os | |
| import streamlit as st | |
| logging.basicConfig(level=logging.INFO, | |
| format="%(asctime)s %(levelname)s %(name)s %(message)s") | |
| st.set_page_config( | |
| page_title="AIM Β· Autonomous Ingestion Agent", | |
| page_icon="π§ͺ", | |
| layout="wide", | |
| ) | |
| from agent.ui_common import boot # noqa: E402 | |
| from agent import ui_theme # noqa: E402 | |
| boot() # idempotent: agent schema, default queries, scheduler sync | |
| # --- design system: CSS + altair theme, once per run ------------------------ | |
| ui_theme.inject_css() | |
| ui_theme.register_altair_theme() | |
| pages = { | |
| "": [ | |
| st.Page("page_files/Dashboard.py", title="Dashboard", icon="π", default=True), | |
| st.Page("page_files/Run_Control.py", title="Run Control", icon="ποΈ"), | |
| st.Page("page_files/Recently_Added.py", title="Recently Added", icon="π"), | |
| st.Page("page_files/Database.py", title="Database", icon="ποΈ"), | |
| st.Page("page_files/Review_Queue.py", title="Review Queue", icon="π"), | |
| st.Page("page_files/Logs.py", title="Runs & Logs", icon="π"), | |
| ] | |
| } | |
| nav = st.navigation(pages, position="top") | |
| # Elements emitted before .run() render on every page above its content; | |
| # the footer container is emitted before .run() too (so pages that st.stop() | |
| # still get it) and pushed to the bottom with CSS flex `order`. | |
| with st.container(key="aim_brand"): | |
| ui_theme.brand_row(os.environ.get("DB_NAME", "")) | |
| with st.container(key="aim_footer"): | |
| ui_theme.footer() | |
| nav.run() | |