Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import os
|
3 |
from landing import show_landing
|
@@ -5,32 +7,50 @@ from dashboard.logs import show_logs
|
|
5 |
from agent_manager import AgentManager
|
6 |
from stripe_checkout import create_stripe_session
|
7 |
|
8 |
-
|
9 |
-
|
|
|
|
|
10 |
|
11 |
-
#
|
12 |
-
st.sidebar.
|
13 |
-
selection = st.sidebar.radio(
|
|
|
|
|
|
|
|
|
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
|
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.
|
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# app.py
|
2 |
+
|
3 |
import streamlit as st
|
4 |
import os
|
5 |
from landing import show_landing
|
|
|
7 |
from agent_manager import AgentManager
|
8 |
from stripe_checkout import create_stripe_session
|
9 |
|
10 |
+
st.set_page_config(page_title="AutoExec AI", layout="wide")
|
11 |
+
|
12 |
+
# Read any query params (e.g., ?mode=landing) using the new API
|
13 |
+
mode = st.query_params.get("mode", ["app"])[0]
|
14 |
|
15 |
+
# Sidebar navigation
|
16 |
+
st.sidebar.header("AutoExec AI")
|
17 |
+
selection = st.sidebar.radio(
|
18 |
+
"Go to",
|
19 |
+
["π Home", "π Launch", "π Logs", "βοΈ Settings"],
|
20 |
+
index=0 if mode in ("app", "landing") else None
|
21 |
+
)
|
22 |
|
23 |
+
# Route: Landing or Home
|
24 |
if mode == "landing" or selection == "π Home":
|
25 |
show_landing()
|
26 |
|
27 |
+
# Route: Launch
|
28 |
elif selection == "π Launch":
|
29 |
st.header("π Launch a New AI Business")
|
30 |
+
niche = st.text_input("Niche (e.g. fitness)")
|
31 |
+
business_type = st.selectbox("Business Type", ["Dropshipping", "Print-on-Demand", "Newsletter", "Course"])
|
32 |
if st.button("Generate & Deploy"):
|
33 |
manager = AgentManager(niche, business_type)
|
34 |
result = manager.run_all()
|
35 |
st.success("β
Business Launched!")
|
36 |
+
st.json(result)
|
37 |
|
38 |
+
# Route: Logs
|
39 |
elif selection == "π Logs":
|
40 |
show_logs()
|
41 |
|
42 |
+
# Route: Settings & Billing
|
43 |
elif selection == "βοΈ Settings":
|
44 |
st.header("βοΈ Settings & Billing")
|
45 |
if st.button("Create Stripe Checkout Session"):
|
46 |
url = create_stripe_session()
|
47 |
st.markdown(f"[Pay & Activate]({url})")
|
48 |
+
st.markdown(
|
49 |
+
"""
|
50 |
+
**Secrets in use**:
|
51 |
+
- `OPENAI_API_KEY`
|
52 |
+
- `GEMINI_API_KEY`
|
53 |
+
- `STRIPE_API_KEY`
|
54 |
+
- `API_KEY` (for protected API routes)
|
55 |
+
"""
|
56 |
+
)
|