Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -219,6 +219,19 @@ CUSTOM_CSS = """
|
|
| 219 |
"""
|
| 220 |
|
| 221 |
def recommend_preamble_solution(deployment_type, existing_ai, monthly_budget):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
if deployment_type == "On-Premises":
|
| 223 |
return (
|
| 224 |
"Enterprise",
|
|
@@ -231,25 +244,39 @@ def recommend_preamble_solution(deployment_type, existing_ai, monthly_budget):
|
|
| 231 |
Starting at $27,000/month"""
|
| 232 |
)
|
| 233 |
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
return (
|
| 246 |
-
"
|
| 247 |
-
"""###
|
| 248 |
-
Perfect for
|
| 249 |
-
-
|
| 250 |
-
-
|
| 251 |
-
-
|
| 252 |
-
-
|
|
|
|
| 253 |
)
|
| 254 |
|
| 255 |
def calculate_roi(inputs):
|
|
@@ -435,7 +462,7 @@ def create_app():
|
|
| 435 |
should_show = (
|
| 436 |
deployment_type != "On-Premises" and
|
| 437 |
(existing_ai == "Yes, we have existing AI applications" or
|
| 438 |
-
budget_value
|
| 439 |
)
|
| 440 |
return gr.update(visible=should_show)
|
| 441 |
|
|
@@ -473,4 +500,9 @@ def create_app():
|
|
| 473 |
app = create_app()
|
| 474 |
|
| 475 |
if __name__ == "__main__":
|
| 476 |
-
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
"""
|
| 220 |
|
| 221 |
def recommend_preamble_solution(deployment_type, existing_ai, monthly_budget):
|
| 222 |
+
"""
|
| 223 |
+
Updated recommendation logic:
|
| 224 |
+
- If budget < $27,000/mo:
|
| 225 |
+
- For existing AI: Recommend Guardrails
|
| 226 |
+
- For new platform: Recommend SaaS
|
| 227 |
+
- If budget >= $27,000/mo or On-Premises: Recommend Enterprise
|
| 228 |
+
"""
|
| 229 |
+
try:
|
| 230 |
+
budget_value = float(monthly_budget) if monthly_budget is not None else 0
|
| 231 |
+
except (ValueError, TypeError):
|
| 232 |
+
budget_value = 0
|
| 233 |
+
|
| 234 |
+
# Always recommend Enterprise for on-premises deployment
|
| 235 |
if deployment_type == "On-Premises":
|
| 236 |
return (
|
| 237 |
"Enterprise",
|
|
|
|
| 244 |
Starting at $27,000/month"""
|
| 245 |
)
|
| 246 |
|
| 247 |
+
# For budgets under $27,000/month
|
| 248 |
+
if budget_value < 27000:
|
| 249 |
+
if existing_ai == "Yes, we have existing AI applications":
|
| 250 |
+
return (
|
| 251 |
+
"Guardrails",
|
| 252 |
+
"""### β‘ Guardrails
|
| 253 |
+
Perfect for integrating with existing AI:
|
| 254 |
+
- Quick API integration
|
| 255 |
+
- Usage-based pricing
|
| 256 |
+
- $0.005 per API call
|
| 257 |
+
- Flexible scaling options"""
|
| 258 |
+
)
|
| 259 |
+
else:
|
| 260 |
+
return (
|
| 261 |
+
"SaaS",
|
| 262 |
+
"""### π SaaS Platform
|
| 263 |
+
Perfect for teams getting started with AI:
|
| 264 |
+
- Full platform features
|
| 265 |
+
- Quick cloud deployment
|
| 266 |
+
- Regular updates
|
| 267 |
+
- $50 per user/month"""
|
| 268 |
+
)
|
| 269 |
+
|
| 270 |
+
# For budgets $27,000/month and above
|
| 271 |
return (
|
| 272 |
+
"Enterprise",
|
| 273 |
+
"""### π’ Enterprise License
|
| 274 |
+
Perfect for organizations that need:
|
| 275 |
+
- Full enterprise features
|
| 276 |
+
- Complete compliance controls
|
| 277 |
+
- Dedicated support team
|
| 278 |
+
- Custom integrations
|
| 279 |
+
Starting at $27,000/month"""
|
| 280 |
)
|
| 281 |
|
| 282 |
def calculate_roi(inputs):
|
|
|
|
| 462 |
should_show = (
|
| 463 |
deployment_type != "On-Premises" and
|
| 464 |
(existing_ai == "Yes, we have existing AI applications" or
|
| 465 |
+
budget_value < 27000)
|
| 466 |
)
|
| 467 |
return gr.update(visible=should_show)
|
| 468 |
|
|
|
|
| 500 |
app = create_app()
|
| 501 |
|
| 502 |
if __name__ == "__main__":
|
| 503 |
+
app.launch()
|
| 504 |
+
|
| 505 |
+
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
|