shuv25 commited on
Commit
54d7f42
·
verified ·
1 Parent(s): 61036fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -25
app.py CHANGED
@@ -10,7 +10,7 @@ def create_agent_card(title, description, features, url, color, status="active")
10
  """Create a card for each agent"""
11
 
12
  if status == "active":
13
- status_badge = "<span style='background:#10b981; color:white; padding:4px 12px; border-radius:12px; font-size:0.85em; font-weight:600;'>ACTIVE</span>"
14
  else:
15
  status_badge = "<span style='background:#6b7280; color:white; padding:4px 12px; border-radius:12px; font-size:0.85em; font-weight:600;'>COMING SOON</span>"
16
 
@@ -22,7 +22,7 @@ def create_agent_card(title, description, features, url, color, status="active")
22
  display: block;
23
  text-align: center;
24
  padding: 14px;
25
- background: linear-gradient(135deg, #f97316, #ea580c);
26
  color: white;
27
  text-decoration: none;
28
  border-radius: 10px;
@@ -30,8 +30,8 @@ def create_agent_card(title, description, features, url, color, status="active")
30
  font-size: 1em;
31
  margin-top: 20px;
32
  transition: all 0.25s ease;
33
- ' onmouseover="this.style.background='linear-gradient(135deg, #fb923c, #f59e0b)'; this.style.transform='scale(1.03)'"
34
- onmouseout="this.style.background='linear-gradient(135deg, #f97316, #ea580c)'; this.style.transform='scale(1)'">
35
  🚀 Launch Agent
36
  </a>
37
  """
@@ -85,7 +85,7 @@ def create_agent_card(title, description, features, url, color, status="active")
85
 
86
 
87
  with gr.Blocks(
88
- theme=gr.themes.Soft(primary_hue="orange", secondary_hue="amber"),
89
  title="Spark-Agent System Hub",
90
  css="""
91
  body, html {
@@ -113,14 +113,14 @@ with gr.Blocks(
113
  <div style='
114
  text-align: center;
115
  padding: 50px 20px;
116
- background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
117
  border-radius: 20px;
118
  color: white;
119
  margin-bottom: 40px;
120
- box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
121
  '>
122
  <h1 style='margin: 0; font-size: 3em; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.2);'>
123
- Spark-Agent System Hub
124
  </h1>
125
  <p style='margin: 20px 0 0 0; font-size: 1.4em; opacity: 0.95; font-weight: 300;'>
126
  Specialized AI Agents for Different Tasks
@@ -136,7 +136,7 @@ with gr.Blocks(
136
  with gr.Row():
137
  with gr.Column():
138
  gr.HTML(create_agent_card(
139
- title="SparkDeliver AI",
140
  description="Real-time route planning, cost optimization, and traffic analysis using OpenStreetMap data. Get optimized delivery routes with accurate cost estimates.",
141
  features=[
142
  "Interactive maps with turn-by-turn directions",
@@ -145,13 +145,13 @@ with gr.Blocks(
145
  "Multiple route comparison and selection"
146
  ],
147
  url=AGENT_URLS["delivery"],
148
- color="linear-gradient(135deg, #f97316, #ea580c)",
149
  status="active"
150
  ))
151
 
152
  with gr.Column():
153
  gr.HTML(create_agent_card(
154
- title="SparkNova AI",
155
  description="""Data Analyzer is an AI-powered data analysis tool that automatically explore, visualize,
156
  and generate insights from uploaded CSV datasets through natural language queries""",
157
  features=[
@@ -162,15 +162,15 @@ with gr.Blocks(
162
  "Decision-Making Support"
163
  ],
164
  url=AGENT_URLS["agent2"],
165
- color="linear-gradient(135deg, #6366f1, #8b5cf6)",
166
  status="active"
167
  ))
168
 
169
  with gr.Column():
170
  gr.HTML(create_agent_card(
171
  title="SparkMart AI",
172
- description="""SparkMart AI, a chatbot e-commerce customer service by automating order related issues, resolving complaints,
173
- and offering personalized product recommendations or specific product recommendation.""",
174
  features=[
175
  "Intelligent Order Management",
176
  "Personalized Product Recommendations ",
@@ -179,7 +179,7 @@ with gr.Blocks(
179
  "General Query Assistance"
180
  ],
181
  url=AGENT_URLS["agent3"],
182
- color="linear-gradient(135deg, #4facfe, #00f2fe)",
183
  status="active"
184
  ))
185
 
@@ -221,22 +221,22 @@ with gr.Blocks(
221
  <div style='
222
  margin-top: 40px;
223
  padding: 30px;
224
- background: #fff7ed;
225
  border-radius: 15px;
226
- border-left: 5px solid #f97316;
227
  '>
228
  <h3 style='margin: 0 0 15px 0; color:#1f2937;'>System Status</h3>
229
  <div style='display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:20px;'>
230
- <div style='text-align:center; padding:15px; background:white; border-radius:10px;'>
231
- <div style='font-size:2em; color:#10b981; margin-bottom:8px;'>1</div>
232
  <div style='color:#6b7280; font-size:0.9em;'>Active Agents</div>
233
  </div>
234
- <div style='text-align:center; padding:15px; background:white; border-radius:10px;'>
235
- <div style='font-size:2em; color:#f59e0b; margin-bottom:8px;'>2</div>
236
  <div style='color:#6b7280; font-size:0.9em;'>In Development</div>
237
  </div>
238
- <div style='text-align:center; padding:15px; background:white; border-radius:10px;'>
239
- <div style='font-size:2em; color:#3b82f6; margin-bottom:8px;'>3</div>
240
  <div style='color:#6b7280; font-size:0.9em;'>Total Agents</div>
241
  </div>
242
  </div>
@@ -248,8 +248,9 @@ with gr.Blocks(
248
  text-align: center;
249
  padding: 30px;
250
  margin-top: 50px;
251
- background: #fff7ed;
252
  border-radius: 15px;
 
253
  '>
254
  <h3 style='margin: 0 0 15px 0; color:#1f2937;'>Built with Modern AI Stack</h3>
255
  <p style='margin: 0; color: #6b7280; font-size:0.95em;'>
@@ -262,4 +263,4 @@ with gr.Blocks(
262
  """)
263
 
264
  if __name__ == "__main__":
265
- demo.launch()
 
10
  """Create a card for each agent"""
11
 
12
  if status == "active":
13
+ status_badge = "<span style='background:#168c44; color:white; padding:4px 12px; border-radius:12px; font-size:0.85em; font-weight:600;'>ACTIVE</span>"
14
  else:
15
  status_badge = "<span style='background:#6b7280; color:white; padding:4px 12px; border-radius:12px; font-size:0.85em; font-weight:600;'>COMING SOON</span>"
16
 
 
22
  display: block;
23
  text-align: center;
24
  padding: 14px;
25
+ background: linear-gradient(135deg, #168c44, #0f6b33);
26
  color: white;
27
  text-decoration: none;
28
  border-radius: 10px;
 
30
  font-size: 1em;
31
  margin-top: 20px;
32
  transition: all 0.25s ease;
33
+ ' onmouseover="this.style.background='linear-gradient(135deg, #1aa850, #168c44)'; this.style.transform='scale(1.03)'"
34
+ onmouseout="this.style.background='linear-gradient(135deg, #168c44, #0f6b33)'; this.style.transform='scale(1)'">
35
  🚀 Launch Agent
36
  </a>
37
  """
 
85
 
86
 
87
  with gr.Blocks(
88
+ theme=gr.themes.Soft(primary_hue="green", secondary_hue="green"),
89
  title="Spark-Agent System Hub",
90
  css="""
91
  body, html {
 
113
  <div style='
114
  text-align: center;
115
  padding: 50px 20px;
116
+ background: linear-gradient(135deg, #168c44 0%, #1aa850 100%);
117
  border-radius: 20px;
118
  color: white;
119
  margin-bottom: 40px;
120
+ box-shadow: 0 20px 25px -5px rgba(22,140,68,0.3);
121
  '>
122
  <h1 style='margin: 0; font-size: 3em; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.2);'>
123
+ Saprk-Agent System Hub
124
  </h1>
125
  <p style='margin: 20px 0 0 0; font-size: 1.4em; opacity: 0.95; font-weight: 300;'>
126
  Specialized AI Agents for Different Tasks
 
136
  with gr.Row():
137
  with gr.Column():
138
  gr.HTML(create_agent_card(
139
+ title="Delivery Optimization Agent",
140
  description="Real-time route planning, cost optimization, and traffic analysis using OpenStreetMap data. Get optimized delivery routes with accurate cost estimates.",
141
  features=[
142
  "Interactive maps with turn-by-turn directions",
 
145
  "Multiple route comparison and selection"
146
  ],
147
  url=AGENT_URLS["delivery"],
148
+ color="#168c44",
149
  status="active"
150
  ))
151
 
152
  with gr.Column():
153
  gr.HTML(create_agent_card(
154
+ title="Data Analyzer Agent",
155
  description="""Data Analyzer is an AI-powered data analysis tool that automatically explore, visualize,
156
  and generate insights from uploaded CSV datasets through natural language queries""",
157
  features=[
 
162
  "Decision-Making Support"
163
  ],
164
  url=AGENT_URLS["agent2"],
165
+ color="#168c44",
166
  status="active"
167
  ))
168
 
169
  with gr.Column():
170
  gr.HTML(create_agent_card(
171
  title="SparkMart AI",
172
+ description="""SparkMart AI, a chatbot e-commerce customer service by automating order tracking, resolving complaints,
173
+ and offering personalized product recommendations or specific product recommendation.""",
174
  features=[
175
  "Intelligent Order Management",
176
  "Personalized Product Recommendations ",
 
179
  "General Query Assistance"
180
  ],
181
  url=AGENT_URLS["agent3"],
182
+ color="#168c44",
183
  status="active"
184
  ))
185
 
 
221
  <div style='
222
  margin-top: 40px;
223
  padding: 30px;
224
+ background: #f0fdf4;
225
  border-radius: 15px;
226
+ border-left: 5px solid #168c44;
227
  '>
228
  <h3 style='margin: 0 0 15px 0; color:#1f2937;'>System Status</h3>
229
  <div style='display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:20px;'>
230
+ <div style='text-align:center; padding:15px; background:white; border-radius:10px; border: 2px solid #dcfce7;'>
231
+ <div style='font-size:2em; color:#168c44; margin-bottom:8px;'>3</div>
232
  <div style='color:#6b7280; font-size:0.9em;'>Active Agents</div>
233
  </div>
234
+ <div style='text-align:center; padding:15px; background:white; border-radius:10px; border: 2px solid #dcfce7;'>
235
+ <div style='font-size:2em; color:#1aa850; margin-bottom:8px;'>0</div>
236
  <div style='color:#6b7280; font-size:0.9em;'>In Development</div>
237
  </div>
238
+ <div style='text-align:center; padding:15px; background:white; border-radius:10px; border: 2px solid #dcfce7;'>
239
+ <div style='font-size:2em; color:#0f6b33; margin-bottom:8px;'>3</div>
240
  <div style='color:#6b7280; font-size:0.9em;'>Total Agents</div>
241
  </div>
242
  </div>
 
248
  text-align: center;
249
  padding: 30px;
250
  margin-top: 50px;
251
+ background: #f0fdf4;
252
  border-radius: 15px;
253
+ border: 2px solid #dcfce7;
254
  '>
255
  <h3 style='margin: 0 0 15px 0; color:#1f2937;'>Built with Modern AI Stack</h3>
256
  <p style='margin: 0; color: #6b7280; font-size:0.95em;'>
 
263
  """)
264
 
265
  if __name__ == "__main__":
266
+ demo.launch()