Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -494,7 +494,8 @@ def clear_farmer_report():
|
|
| 494 |
# Initialize sheets on startup
|
| 495 |
initialize_sheets()
|
| 496 |
|
| 497 |
-
|
|
|
|
| 498 |
|
| 499 |
# Gradio Interface
|
| 500 |
with gr.Blocks(title="Farmer Ledger Tracker", theme=gr.themes.Soft()) as app:
|
|
@@ -613,7 +614,8 @@ with gr.Blocks(title="Farmer Ledger Tracker", theme=gr.themes.Soft()) as app:
|
|
| 613 |
)
|
| 614 |
|
| 615 |
# Tab 3: Analytics & Insights
|
| 616 |
-
analytics
|
|
|
|
| 617 |
|
| 618 |
# Auto-refresh dropdowns when app loads
|
| 619 |
app.load(
|
|
|
|
| 494 |
# Initialize sheets on startup
|
| 495 |
initialize_sheets()
|
| 496 |
|
| 497 |
+
# Initialize Analytics Tab
|
| 498 |
+
analytics = AnalyticsTab(get_sheet, get_farmers)
|
| 499 |
|
| 500 |
# Gradio Interface
|
| 501 |
with gr.Blocks(title="Farmer Ledger Tracker", theme=gr.themes.Soft()) as app:
|
|
|
|
| 614 |
)
|
| 615 |
|
| 616 |
# Tab 3: Analytics & Insights
|
| 617 |
+
analytics.create_tab()
|
| 618 |
+
|
| 619 |
|
| 620 |
# Auto-refresh dropdowns when app loads
|
| 621 |
app.load(
|