mgbam commited on
Commit
b7b397e
Β·
verified Β·
1 Parent(s): 80901e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -17
app.py CHANGED
@@ -1,23 +1,36 @@
1
  import streamlit as st
2
- import subprocess
3
- from landing import render_landing
4
- from agent_manager import run_agents
5
  from dashboard.logs import show_logs
 
 
6
 
7
- st.set_page_config(page_title="AutoExec AI SaaS", layout="wide")
 
8
 
9
- # Sidebar navigation
10
- tab = st.sidebar.selectbox("Navigation", ["Home", "Launch", "Agent Logs", "Settings"])
 
11
 
12
- if tab == "Home":
13
- render_landing()
14
- elif tab == "Launch":
15
- niche = st.text_input("Niche (e.g. fitness, productivity)")
16
- biz_type = st.selectbox("Business Type", ["Dropshipping", "Print-on-Demand", "Newsletter", "Course"])
17
- if st.button("πŸš€ Launch Business"):
18
- results = run_agents(niche, biz_type)
19
- st.write(results)
20
- elif tab == "Agent Logs":
 
 
 
 
 
21
  show_logs()
22
- elif tab == "Settings":
23
- st.write("Settings placeholder (e.g., API keys, billing)")
 
 
 
 
 
 
1
  import streamlit as st
2
+ import os
3
+ from landing import show_landing
 
4
  from dashboard.logs import show_logs
5
+ from agent_manager import AgentManager
6
+ from stripe_checkout import create_stripe_session
7
 
8
+ # Determine mode from query param or button
9
+ mode = st.experimental_get_query_params().get("mode", ["app"])[0]
10
 
11
+ # Top-level navigation
12
+ st.sidebar.title("AutoExec AI")
13
+ selection = st.sidebar.radio("Go to", ["🏠 Home", "πŸš€ Launch", "πŸ“Š Logs", "βš™οΈ Settings"])
14
 
15
+ if mode == "landing" or selection == "🏠 Home":
16
+ show_landing()
17
+
18
+ elif selection == "πŸš€ Launch":
19
+ st.header("πŸš€ Launch a New AI Business")
20
+ niche = st.text_input("Niche (e.g., fitness)")
21
+ business_type = st.selectbox("Type", ["Dropshipping", "Print-on-Demand", "Newsletter", "Course"])
22
+ if st.button("Generate & Deploy"):
23
+ manager = AgentManager(niche, business_type)
24
+ result = manager.run_all()
25
+ st.success("βœ… Business Launched!")
26
+ st.write(result)
27
+
28
+ elif selection == "πŸ“Š Logs":
29
  show_logs()
30
+
31
+ elif selection == "βš™οΈ Settings":
32
+ st.header("βš™οΈ Settings & Billing")
33
+ if st.button("Create Stripe Checkout Session"):
34
+ url = create_stripe_session()
35
+ st.markdown(f"[Pay & Activate]({url})")
36
+ st.markdown("Manage your API keys and subscription here.")