GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Multi_Agent_App/app.py at main · eshwal/Multi_Agent_App

Expand file tree

/

app.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
212 lines (172 loc) · 6.08 KB
/

app.py

Copy path

File metadata and controls

212 lines (172 loc) · 6.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
"""
Streamlit UI for Product Idea Analyzer
Place this file in your project root directory
Run with: streamlit run streamlit_app.py
"""
import streamlit as st
import asyncio
import sys
import os
from pathlib import Path
# Add src to path for imports
sys.path.insert(0, str(Path(__file__).parent / "src"))
from product_idea.main import IdeaFlow
# Page configuration
st.set_page_config(
page_title="Product Idea Analyzer",
page_icon="🚀",
layout="wide",
initial_sidebar_state="expanded"
)
# Custom CSS
st.markdown("""
<style>
.main {
padding: 2rem;
}
.stTabs [data-baseweb="tab-list"] button {
font-size: 1.1em;
font-weight: 600;
}
</style>
""", unsafe_allow_html=True)
# Header
st.title("🚀 AI Product Idea Analyzer")
st.markdown("""
**Analyze your product ideas using AI agents**
This tool:
- 📊 Researches market size, trends, and opportunities
- 🏆 Analyzes competitor landscape and strategies
- 📋 Generates comprehensive analysis report
---
""")
# Sidebar - About & Instructions
with st.sidebar:
st.header("📌 Instructions")
st.markdown("""
1. Enter your product idea
2. Click "Analyze Idea"
3. Wait for AI agents to research
4. Review results and download report
**Example ideas:**
- AI-powered fitness app
- Sustainable packaging solution
- Personal finance assistant
- Virtual event platform
""")
st.divider()
st.header("⚙️ Configuration")
# Check API keys
api_status = "✅ Ready" if os.getenv("MISTRAL_API_KEY") and os.getenv("SERPER_API_KEY") else "❌ Missing Keys"
st.write(f"API Status: {api_status}")
if api_status == "❌ Missing Keys":
st.warning("""
Missing API keys in `.env`:
- MISTRAL_API_KEY
- SERPER_API_KEY
""")
# Main input section
col1, col2 = st.columns([4, 1])
with col1:
product_idea = st.text_input(
"Enter your product idea:",
placeholder="e.g., AI-powered fitness app for remote workers",
key="product_idea_input"
)
with col2:
st.write("") # Spacing
analyze_button = st.button("Analyze Idea", type="primary", use_container_width=True)
# Analysis section
if analyze_button:
if not product_idea.strip():
st.error("❌ Please enter a product idea first!")
elif not os.getenv("MISTRAL_API_KEY") or not os.getenv("SERPER_API_KEY"):
st.error("❌ Missing API keys. Please set MISTRAL_API_KEY and SERPER_API_KEY in `.env`")
else:
st.divider()
# Progress indicators
progress_placeholder = st.empty()
status_placeholder = st.empty()
try:
# Initialize and run flow
with status_placeholder.container():
st.info("🔍 Starting analysis...")
# Run async flow
flow = IdeaFlow()
# Update status for market research
with status_placeholder.container():
st.info("📊 Researching market data...")
# Run the flow
result = asyncio.run(flow.kickoff_async(inputs={'topic':product_idea}))
# Success message
with status_placeholder.container():
st.success("✅ Analysis complete!")
st.divider()
# Display results in tabs
st.subheader("📊 Analysis Results")
tab1, tab2, tab3 = st.tabs([
"📊 Market Research",
"🏆 Competitor Analysis",
"📋 Final Report"
])
with tab1:
st.markdown("### Market Research & Analysis")
if flow.state.market_data:
st.markdown(flow.state.market_data)
else:
st.warning("No market data available")
with tab2:
st.markdown("### Competitor Research & Analysis")
if flow.state.competitors:
st.markdown(flow.state.competitors)
else:
st.warning("No competitor data available")
with tab3:
st.markdown("### Final Report & Recommendations")
if flow.state.final_report:
st.markdown(flow.state.final_report)
else:
st.warning("No final report available")
st.divider()
# Download section
st.subheader("📥 Download Results")
col1, col2 = st.columns(2)
with col1:
# Full report download
full_report = f"""# Product Idea Analysis: {product_idea}
## Market Research
{flow.state.market_data}
## Competitor Analysis
{flow.state.competitors}
## Final Report
{flow.state.final_report}
"""
st.download_button(
label="📄 Download Full Report (MD)",
data=full_report,
file_name=f"{product_idea.replace(' ', '_')}_analysis.md",
mime="text/markdown",
use_container_width=True
)
with col2:
# Just final report
st.download_button(
label="📋 Download Executive Summary",
data=flow.state.final_report or "",
file_name=f"{product_idea.replace(' ', '_')}_summary.md",
mime="text/markdown",
use_container_width=True
)
except Exception as e:
st.error(f"❌ Analysis failed: {str(e)}")
st.info("💡 Tips: Check API keys, ensure topic is valid, try again")
with st.expander("Error Details"):
st.code(str(e))
# Footer
st.divider()
st.markdown("""
---
<div style='text-align: center'>
<p><small>Built with <strong>CrewAI</strong> • Powered by AI Agents</small></p>
</div>
""", unsafe_allow_html=True)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.