|
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 |
|
|
|
|
|
if "page" not in st.session_state: |
|
st.session_state.page = "Home" |
|
|
|
|
|
PAGES = ["Home", "Launch", "Logs", "Settings"] |
|
|
|
|
|
|
|
st.sidebar.title("AutoExec AI") |
|
st.sidebar.radio( |
|
"Go to", |
|
PAGES, |
|
index=PAGES.index(st.session_state.page), |
|
key="page", |
|
) |
|
|
|
|
|
page = st.session_state.page |
|
|
|
|
|
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.") |
|
|