JARVISXIRONMAN commited on
Commit
64e0a17
Β·
verified Β·
1 Parent(s): 7f5b4ee

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +152 -0
app.py ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import streamlit as st
4
+ import os
5
+ from components import canvas_chat, plan_generator, validator, decision_engine, pdf_chat, upload_files, ai_advisor_chat
6
+ from dotenv import load_dotenv
7
+
8
+ load_dotenv()
9
+ st.set_page_config(page_title="StratoPilot – (AI Business Copilot)", layout="wide")
10
+
11
+ # === Global Styling & Animations ===
12
+ st.markdown("""
13
+ <style>
14
+ .fade-container {
15
+ animation: fadeInSlide 0.9s ease-in-out;
16
+ opacity: 0;
17
+ animation-fill-mode: forwards;
18
+ }
19
+ @keyframes fadeInSlide {
20
+ from { opacity: 0; transform: translateY(20px); }
21
+ to { opacity: 1; transform: translateY(0); }
22
+ }
23
+
24
+ .stButton>button {
25
+ transition: all 0.3s ease-in-out;
26
+ border-radius: 12px;
27
+ font-weight: bold;
28
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
29
+ }
30
+
31
+ .stButton>button:hover {
32
+ transform: scale(1.05);
33
+ box-shadow: 0 0 15px rgba(249, 197, 78, 0.6);
34
+ }
35
+
36
+ h1, h2, h3 {
37
+ color: rgb(39, 124, 160);
38
+ }
39
+
40
+ .sidebar .sidebar-content {
41
+ padding: 1rem;
42
+ }
43
+
44
+ .sidebar .block-container {
45
+ padding-top: 2rem;
46
+ }
47
+
48
+ .hero-title {
49
+ font-size: 3rem;
50
+ font-weight: bold;
51
+ color: rgb(39, 124, 160);
52
+ }
53
+
54
+ .tagline {
55
+ font-size: 1.3rem;
56
+ color: rgb(67, 168, 137);
57
+ margin-top: -0.5rem;
58
+ }
59
+
60
+ .feature-box {
61
+ background-color: rgba(249, 197, 78, 0.1);
62
+ border-left: 5px solid rgb(249, 197, 78);
63
+ padding: 1rem;
64
+ margin: 1rem 0;
65
+ border-radius: 10px;
66
+ }
67
+
68
+ .main > div {
69
+ padding-top: 2rem !important;
70
+ padding-bottom: 2rem !important;
71
+ padding-left: 3rem !important;
72
+ padding-right: 3rem !important;
73
+ }
74
+ </style>
75
+ """, unsafe_allow_html=True)
76
+
77
+ # === Sidebar Navigation ===
78
+ st.sidebar.title("🧭 StratoPilot")
79
+ st.sidebar.markdown("Automate your business strategy with AI πŸ€–")
80
+
81
+ page = st.sidebar.radio("πŸ“‚ Navigate", [
82
+ "🏠 Home",
83
+ "πŸ“€ Upload Business Docs",
84
+ "🧠 Canvas Assistant",
85
+ "πŸ“‘ Auto Plan Generator",
86
+ "πŸ’¬ PDF Q&A (RAG)",
87
+ "βœ… Validate Canvas",
88
+ "🎯 Strategy Suggestions",
89
+ "πŸ’¬ Ask AI Advisor"
90
+ ])
91
+
92
+ # === Page Routing ===
93
+ if page == "🏠 Home":
94
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
95
+
96
+ st.markdown("""
97
+ <div class="hero-title">πŸš€ StratoPilot – (Your AI Business Copilot)</div>
98
+ <div class="tagline">Build smart business plans, strategies, and insights with zero guesswork.</div>
99
+ """, unsafe_allow_html=True)
100
+
101
+ st.markdown("<br>", unsafe_allow_html=True)
102
+ st.markdown("## πŸ” What You Can Do with StratoPilot:")
103
+
104
+ features = [
105
+ ("πŸ“€ Upload Documents", "Upload PDFs or Drive link for business data"),
106
+ ("🧠 Canvas Builder", "AI guides you through the Business Model Canvas"),
107
+ ("πŸ“‘ Plan Generator", "Generate a detailed business plan or pitch deck"),
108
+ ("πŸ’¬ Ask Your Documents", "AI answers questions from uploaded files using RAG"),
109
+ ("βœ… Model Validator", "Get AI-powered feedback and suggestions"),
110
+ ("🎯 Strategic Suggestions", "Let AI recommend smart business actions"),
111
+ ("πŸ’¬ Ask AI Advisor", "Chat with AI to explore ideas, pivots, improvements")
112
+ ]
113
+
114
+ for icon, desc in features:
115
+ st.markdown(f'<div class="feature-box"><b>{icon}</b>: {desc}</div>', unsafe_allow_html=True)
116
+
117
+ st.markdown('</div>', unsafe_allow_html=True)
118
+
119
+ elif page == "πŸ“€ Upload Business Docs":
120
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
121
+ upload_files.run_upload_files()
122
+ st.markdown('</div>', unsafe_allow_html=True)
123
+
124
+ elif page == "🧠 Canvas Assistant":
125
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
126
+ canvas_chat.run_canvas_chat()
127
+ st.markdown('</div>', unsafe_allow_html=True)
128
+
129
+ elif page == "πŸ“‘ Auto Plan Generator":
130
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
131
+ plan_generator.run_plan_generator()
132
+ st.markdown('</div>', unsafe_allow_html=True)
133
+
134
+ elif page == "πŸ’¬ PDF Q&A (RAG)":
135
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
136
+ pdf_chat.run_pdf_qa()
137
+ st.markdown('</div>', unsafe_allow_html=True)
138
+
139
+ elif page == "βœ… Validate Canvas":
140
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
141
+ validator.run_validator()
142
+ st.markdown('</div>', unsafe_allow_html=True)
143
+
144
+ elif page == "🎯 Strategy Suggestions":
145
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
146
+ decision_engine.run_decision_engine()
147
+ st.markdown('</div>', unsafe_allow_html=True)
148
+
149
+ elif page == "πŸ’¬ Ask AI Advisor":
150
+ st.markdown('<div class="fade-container">', unsafe_allow_html=True)
151
+ ai_advisor_chat.run_ai_advisor_chat()
152
+ st.markdown('</div>', unsafe_allow_html=True)