Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -466,7 +466,7 @@ def render_kpi_cards() -> str:
|
|
| 466 |
</div>"""
|
| 467 |
|
| 468 |
kpi_config = [
|
| 469 |
-
("n_titles",
|
| 470 |
("n_months", "π
", "Time Periods", "#7aa6f8"),
|
| 471 |
("total_units_sold", "π¦", "Units Sold", "#6ee7c7"),
|
| 472 |
("total_revenue", "π°", "Revenue", "#3dcba8"),
|
|
@@ -576,7 +576,7 @@ def build_sentiment_chart() -> go.Figure:
|
|
| 576 |
))
|
| 577 |
fig.update_layout(**_styled_layout(
|
| 578 |
height=max(400, len(df) * 28), barmode="stack",
|
| 579 |
-
title=dict(text="Sentiment Distribution by
|
| 580 |
))
|
| 581 |
fig.update_xaxes(title="Number of Reviews")
|
| 582 |
fig.update_yaxes(autorange="reversed")
|
|
@@ -597,7 +597,7 @@ def build_top_sellers_chart() -> go.Figure:
|
|
| 597 |
))
|
| 598 |
fig.update_layout(**_styled_layout(
|
| 599 |
height=max(400, len(df) * 30),
|
| 600 |
-
title=dict(text="Top
|
| 601 |
))
|
| 602 |
fig.update_yaxes(autorange="reversed")
|
| 603 |
fig.update_xaxes(title="Total Units Sold")
|
|
@@ -926,7 +926,7 @@ with gr.Blocks(title="AIBDM 2026 Workshop App") as demo:
|
|
| 926 |
gr.Markdown("#### Interactive Charts")
|
| 927 |
chart_sales = gr.Plot(label="Monthly Overview")
|
| 928 |
chart_sentiment = gr.Plot(label="Sentiment Distribution")
|
| 929 |
-
chart_top = gr.Plot(label="Top
|
| 930 |
|
| 931 |
gr.Markdown("#### Static Figures (from notebooks)")
|
| 932 |
gallery = gr.Gallery(
|
|
|
|
| 466 |
</div>"""
|
| 467 |
|
| 468 |
kpi_config = [
|
| 469 |
+
("n_titles", "π¦", "Products", "#a48de8"),
|
| 470 |
("n_months", "π
", "Time Periods", "#7aa6f8"),
|
| 471 |
("total_units_sold", "π¦", "Units Sold", "#6ee7c7"),
|
| 472 |
("total_revenue", "π°", "Revenue", "#3dcba8"),
|
|
|
|
| 576 |
))
|
| 577 |
fig.update_layout(**_styled_layout(
|
| 578 |
height=max(400, len(df) * 28), barmode="stack",
|
| 579 |
+
title=dict(text="Sentiment Distribution by Product"),
|
| 580 |
))
|
| 581 |
fig.update_xaxes(title="Number of Reviews")
|
| 582 |
fig.update_yaxes(autorange="reversed")
|
|
|
|
| 597 |
))
|
| 598 |
fig.update_layout(**_styled_layout(
|
| 599 |
height=max(400, len(df) * 30),
|
| 600 |
+
title=dict(text="Top Products by Demand"), showlegend=False,
|
| 601 |
))
|
| 602 |
fig.update_yaxes(autorange="reversed")
|
| 603 |
fig.update_xaxes(title="Total Units Sold")
|
|
|
|
| 926 |
gr.Markdown("#### Interactive Charts")
|
| 927 |
chart_sales = gr.Plot(label="Monthly Overview")
|
| 928 |
chart_sentiment = gr.Plot(label="Sentiment Distribution")
|
| 929 |
+
chart_top = gr.Plot(label="Top Products")
|
| 930 |
|
| 931 |
gr.Markdown("#### Static Figures (from notebooks)")
|
| 932 |
gallery = gr.Gallery(
|