AICEO / app.py
mgbam's picture
Update app.py
2a0fca8 verified
raw
history blame
1.29 kB
import streamlit as st
import os
from landing import show_landing
from dashboard.logs import show_logs
from agent_manager import AgentManager
from stripe_checkout import create_stripe_session
# Determine mode from query param or button
mode = st.experimental_get_query_params().get("mode", ["app"])[0]
# Top-level navigation
st.sidebar.title("AutoExec AI")
selection = st.sidebar.radio("Go to", ["🏠 Home", "πŸš€ Launch", "πŸ“Š Logs", "βš™οΈ Settings"])
if mode == "landing" or selection == "🏠 Home":
show_landing()
elif selection == "πŸš€ Launch":
st.header("πŸš€ Launch a New AI Business")
niche = st.text_input("Niche (e.g., fitness)")
business_type = st.selectbox("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.write(result)
elif selection == "πŸ“Š Logs":
show_logs()
elif selection == "βš™οΈ 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 subscription here.")