Download app.py from mgbam/AICEO: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/mgbam/AICEO/resolve/ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/app.py
- Command line
-
hf download hf://spaces/mgbam/AICEO@ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/app.py
-
curl -L -o app.py https://huggingface.co/spaces/mgbam/AICEO/resolve/ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/app.py
1.56 kB
| import streamlit as st | |
| from landing import show_landing | |
| from agent_manager import AgentManager | |
| from dashboard.logs import show_logs | |
| from stripe_checkout import create_stripe_session | |
| # Initialize default page if not already set | |
| if "page" not in st.session_state: | |
| st.session_state.page = "Home" | |
| # Define the list of pages | |
| PAGES = ["Home", "Launch", "Logs", "Settings"] | |
| # Create a radio widget in the sidebar, keyed to 'page' | |
| # This widget *updates* st.session_state.page automatically | |
| st.sidebar.title("AutoExec AI") | |
| st.sidebar.radio( | |
| "Go to", | |
| PAGES, | |
| index=PAGES.index(st.session_state.page), | |
| key="page", | |
| ) | |
| # Read the current page (streamlit will have set session_state.page for us) | |
| page = st.session_state.page | |
| # Route to the correct content | |
| if page == "Home": | |
| show_landing() | |
| elif page == "Launch": | |
| st.header("π Launch a New AI Business") | |
| niche = st.text_input("Niche (e.g., fitness)") | |
| business_type = st.selectbox( | |
| "Business Type", | |
| ["Dropshipping", "Print-on-Demand", "Newsletter", "Course"] | |
| ) | |
| if st.button("Generate & Deploy"): | |
| manager = AgentManager(niche, business_type) | |
| result = manager.run_all() | |
| st.success("β Business Launched!") | |
| st.json(result) | |
| elif page == "Logs": | |
| show_logs() | |
| elif page == "Settings": | |
| st.header("βοΈ Settings & Billing") | |
| if st.button("Create Stripe Checkout Session"): | |
| url = create_stripe_session() | |
| st.markdown(f"[Pay & Activate]({url})") | |
| st.markdown("Manage your API keys and subscriptions here.") | |