Update app.py
Browse files
app.py
CHANGED
|
@@ -2606,33 +2606,33 @@ with gr.Blocks(
|
|
| 2606 |
|
| 2607 |
output += f"""
|
| 2608 |
|
| 2609 |
-
|
| 2610 |
-
|
| 2611 |
-
|
| 2612 |
-
|
| 2613 |
-
|
| 2614 |
-
|
| 2615 |
-
|
| 2616 |
-
|
| 2617 |
-
|
| 2618 |
-
|
| 2619 |
-
|
| 2620 |
-
|
| 2621 |
-
|
| 2622 |
-
|
| 2623 |
-
|
| 2624 |
-
|
| 2625 |
-
|
| 2626 |
-
|
| 2627 |
-
|
| 2628 |
-
|
| 2629 |
-
|
| 2630 |
-
|
| 2631 |
-
|
| 2632 |
-
|
| 2633 |
-
|
| 2634 |
-
|
| 2635 |
-
|
| 2636 |
|
| 2637 |
# Create charts
|
| 2638 |
import plotly.graph_objects as go
|
|
|
|
| 2606 |
|
| 2607 |
output += f"""
|
| 2608 |
|
| 2609 |
+
---
|
| 2610 |
+
|
| 2611 |
+
### π‘ Key Insights
|
| 2612 |
+
|
| 2613 |
+
- **Biggest Single Opportunity:** ${biggest_opp:.2f} at {merchant}
|
| 2614 |
+
- **Most Common Category:** {category}
|
| 2615 |
+
- **Average Transaction:** ${avg_trans:.2f}
|
| 2616 |
+
- **Optimization Potential:** {potential:.1f}% more rewards possible
|
| 2617 |
+
|
| 2618 |
+
---
|
| 2619 |
+
|
| 2620 |
+
<div style="background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%); padding: 20px; border-radius: 12px; border-left: 4px solid #ffc107; margin: 20px 0;">
|
| 2621 |
+
<h4 style="margin: 0 0 10px 0; color: #856404;">π‘ What This Means</h4>
|
| 2622 |
+
<p style="margin: 0; color: #5d4037; font-size: 15px;">
|
| 2623 |
+
If you had used our AI recommendations for these {count} transactions, you would have earned
|
| 2624 |
+
<strong style="color: #e65100;">${extra:.2f} more</strong> in rewards.
|
| 2625 |
+
Over a full year, that's <strong style="color: #e65100;">${yearly:.0f}+</strong> in extra rewards!
|
| 2626 |
+
</p>
|
| 2627 |
+
</div>
|
| 2628 |
+
|
| 2629 |
+
---
|
| 2630 |
+
|
| 2631 |
+
<div style="background: #e8f5e9; padding: 20px; border-radius: 10px; border-left: 4px solid #4caf50;">
|
| 2632 |
+
<strong>π Powered by Modal:</strong> This analysis processed {count} transactions in parallel using serverless compute.
|
| 2633 |
+
In production, Modal can handle 1000+ transactions in seconds with automatic scaling.
|
| 2634 |
+
</div>
|
| 2635 |
+
"""
|
| 2636 |
|
| 2637 |
# Create charts
|
| 2638 |
import plotly.graph_objects as go
|