Update app.py
Browse files
app.py
CHANGED
|
@@ -1,23 +1,36 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import
|
| 3 |
-
from landing import
|
| 4 |
-
from agent_manager import run_agents
|
| 5 |
from dashboard.logs import show_logs
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
if
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
show_logs()
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.")
|