Spaces:
Build error
Build error
update dashboard.py
Browse files- app.py +5 -1
- dashboard.py +10 -10
app.py
CHANGED
|
@@ -232,7 +232,11 @@ def create_interface():
|
|
| 232 |
with gr.Blocks(
|
| 233 |
title="Wildberries Analytics Dashboard",
|
| 234 |
theme=gr.themes.Soft(),
|
| 235 |
-
css="
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
) as demo:
|
| 237 |
|
| 238 |
gr.Markdown("""
|
|
|
|
| 232 |
with gr.Blocks(
|
| 233 |
title="Wildberries Analytics Dashboard",
|
| 234 |
theme=gr.themes.Soft(),
|
| 235 |
+
css="""
|
| 236 |
+
footer {visibility: hidden}
|
| 237 |
+
.plot-container {min-height: 950px !important}
|
| 238 |
+
.gradio-plot {min-height: 950px !important}
|
| 239 |
+
"""
|
| 240 |
) as demo:
|
| 241 |
|
| 242 |
gr.Markdown("""
|
dashboard.py
CHANGED
|
@@ -39,8 +39,8 @@ def create_sales_dashboard(sales_data: pd.DataFrame, period: str = "week") -> go
|
|
| 39 |
],
|
| 40 |
specs=[[{"secondary_y": True}, {"type": "bar"}],
|
| 41 |
[{"type": "pie"}, {"type": "histogram"}]],
|
| 42 |
-
vertical_spacing=0.
|
| 43 |
-
horizontal_spacing=0.
|
| 44 |
)
|
| 45 |
|
| 46 |
try:
|
|
@@ -131,10 +131,10 @@ def create_sales_dashboard(sales_data: pd.DataFrame, period: str = "week") -> go
|
|
| 131 |
title=f"📊 Sales Analytics Dashboard - Last {period.title()}",
|
| 132 |
title_x=0.5,
|
| 133 |
showlegend=False,
|
| 134 |
-
height=
|
| 135 |
-
font=dict(size=
|
| 136 |
template="plotly_white",
|
| 137 |
-
margin=dict(t=
|
| 138 |
)
|
| 139 |
|
| 140 |
# Update axes labels
|
|
@@ -174,8 +174,8 @@ def create_inventory_dashboard(forecast_data: pd.DataFrame) -> go.Figure:
|
|
| 174 |
],
|
| 175 |
specs=[[{"type": "pie"}, {"type": "bar"}],
|
| 176 |
[{"type": "bar"}, {"type": "scatter"}]],
|
| 177 |
-
vertical_spacing=0.
|
| 178 |
-
horizontal_spacing=0.
|
| 179 |
)
|
| 180 |
|
| 181 |
try:
|
|
@@ -294,10 +294,10 @@ def create_inventory_dashboard(forecast_data: pd.DataFrame) -> go.Figure:
|
|
| 294 |
title="📦 Inventory Risk Analysis Dashboard",
|
| 295 |
title_x=0.5,
|
| 296 |
showlegend=True,
|
| 297 |
-
height=
|
| 298 |
-
font=dict(size=
|
| 299 |
template="plotly_white",
|
| 300 |
-
margin=dict(t=
|
| 301 |
)
|
| 302 |
|
| 303 |
# Update axes
|
|
|
|
| 39 |
],
|
| 40 |
specs=[[{"secondary_y": True}, {"type": "bar"}],
|
| 41 |
[{"type": "pie"}, {"type": "histogram"}]],
|
| 42 |
+
vertical_spacing=0.20,
|
| 43 |
+
horizontal_spacing=0.15
|
| 44 |
)
|
| 45 |
|
| 46 |
try:
|
|
|
|
| 131 |
title=f"📊 Sales Analytics Dashboard - Last {period.title()}",
|
| 132 |
title_x=0.5,
|
| 133 |
showlegend=False,
|
| 134 |
+
height=900,
|
| 135 |
+
font=dict(size=11),
|
| 136 |
template="plotly_white",
|
| 137 |
+
margin=dict(t=100, b=60, l=60, r=60)
|
| 138 |
)
|
| 139 |
|
| 140 |
# Update axes labels
|
|
|
|
| 174 |
],
|
| 175 |
specs=[[{"type": "pie"}, {"type": "bar"}],
|
| 176 |
[{"type": "bar"}, {"type": "scatter"}]],
|
| 177 |
+
vertical_spacing=0.20,
|
| 178 |
+
horizontal_spacing=0.15
|
| 179 |
)
|
| 180 |
|
| 181 |
try:
|
|
|
|
| 294 |
title="📦 Inventory Risk Analysis Dashboard",
|
| 295 |
title_x=0.5,
|
| 296 |
showlegend=True,
|
| 297 |
+
height=900,
|
| 298 |
+
font=dict(size=11),
|
| 299 |
template="plotly_white",
|
| 300 |
+
margin=dict(t=100, b=60, l=60, r=60)
|
| 301 |
)
|
| 302 |
|
| 303 |
# Update axes
|