updating frontend
Browse files- frontend/app.py +8 -10
frontend/app.py
CHANGED
|
@@ -58,7 +58,7 @@ sidebar = html.Div(
|
|
| 58 |
className="flex-column"
|
| 59 |
),
|
| 60 |
|
| 61 |
-
# Theme Switch Component Setup
|
| 62 |
html.Div([
|
| 63 |
html.Hr(style={"marginBottom": "1.5rem"}),
|
| 64 |
html.Label([html.I(className="fas fa-adjust me-2"), "Interface Theme"], id="theme-label", className="small d-block mb-2 font-weight-bold"),
|
|
@@ -69,8 +69,7 @@ sidebar = html.Div(
|
|
| 69 |
{"label": " Light Mode", "value": "light"},
|
| 70 |
],
|
| 71 |
value="dark",
|
| 72 |
-
inline=True
|
| 73 |
-
id="theme-radio-items"
|
| 74 |
)
|
| 75 |
], style={"position": "absolute", "bottom": "4rem", "left": "1.5rem", "width": "80%"}),
|
| 76 |
|
|
@@ -212,7 +211,7 @@ def render_main_app():
|
|
| 212 |
dbc.Card([
|
| 213 |
dbc.CardHeader(html.B("Step 1: Upload Data")),
|
| 214 |
dbc.CardBody([
|
| 215 |
-
# Premium Upload Component layout restored
|
| 216 |
dcc.Upload(
|
| 217 |
id='upload-data',
|
| 218 |
children=html.Div([
|
|
@@ -228,7 +227,6 @@ def render_main_app():
|
|
| 228 |
),
|
| 229 |
html.Div(id='upload-status', className="mt-2"),
|
| 230 |
html.Hr(),
|
| 231 |
-
# Fixed text contrast to deep black-slate (#0f172a) text on brilliant teal background (#2dd4bf)
|
| 232 |
dbc.Button("Run Deep Sets Prediction", id="predict-btn", disabled=True, className="w-100 font-weight-bold shadow-sm",
|
| 233 |
style={"backgroundColor": "#2dd4bf", "borderColor": "#2dd4bf", "color": "#0f172a"})
|
| 234 |
])
|
|
@@ -260,14 +258,14 @@ def save_theme_preference(theme_val):
|
|
| 260 |
return theme_val
|
| 261 |
|
| 262 |
|
| 263 |
-
# --- MAIN LAYOUT RESPONSIVE STYLE CONFIGURATOR
|
| 264 |
@app.callback(
|
| 265 |
[Output('main-container', 'style'),
|
| 266 |
Output('sidebar-panel', 'style'),
|
| 267 |
Output('preview-table', 'style_header'),
|
| 268 |
Output('preview-table', 'style_cell'),
|
| 269 |
Output('theme-label', 'style'),
|
| 270 |
-
Output('theme-
|
| 271 |
Output('sidebar-subtitle', 'className'),
|
| 272 |
Output('sidebar-footer', 'className'),
|
| 273 |
Output('help-nav-link', 'className')],
|
|
@@ -285,8 +283,8 @@ def apply_theme_parameters(theme):
|
|
| 285 |
bg_main, color_main, bg_sidebar, border_sidebar = "#0f172a", "#f8fafc", "#1e293b", "1px solid rgba(45, 212, 191, 0.1)"
|
| 286 |
header_table, cell_table = '#1e293b', '#0f172a'
|
| 287 |
text_table, border_table = '#f8fafc', '#334155'
|
| 288 |
-
lbl_clr = {"color": "#f8fafc"}
|
| 289 |
-
radio_class = "text-white small"
|
| 290 |
sub_class, foot_class, link_class = "small text-white-50 mt-1", "text-white-50", "text-white-50"
|
| 291 |
|
| 292 |
container_css = {"background": bg_main, "color": color_main, "minHeight": "100vh", "transition": "all 0.3s ease"}
|
|
@@ -392,7 +390,7 @@ def run_predict(n_clicks, dataset_id, theme):
|
|
| 392 |
paper_bgcolor='rgba(0,0,0,0)',
|
| 393 |
plot_bgcolor='rgba(0,0,0,0)',
|
| 394 |
font_color=chart_text,
|
| 395 |
-
legend=dict(font=dict(color=chart_text), bgcolor='rgba(0,0,0,0)')
|
| 396 |
)
|
| 397 |
elif isinstance(fig, dict) and 'layout' in fig:
|
| 398 |
fig['layout']['paper_bgcolor'] = 'rgba(0,0,0,0)'
|
|
|
|
| 58 |
className="flex-column"
|
| 59 |
),
|
| 60 |
|
| 61 |
+
# Theme Switch Component Setup (Syntax Error Fixed Here)
|
| 62 |
html.Div([
|
| 63 |
html.Hr(style={"marginBottom": "1.5rem"}),
|
| 64 |
html.Label([html.I(className="fas fa-adjust me-2"), "Interface Theme"], id="theme-label", className="small d-block mb-2 font-weight-bold"),
|
|
|
|
| 69 |
{"label": " Light Mode", "value": "light"},
|
| 70 |
],
|
| 71 |
value="dark",
|
| 72 |
+
inline=True
|
|
|
|
| 73 |
)
|
| 74 |
], style={"position": "absolute", "bottom": "4rem", "left": "1.5rem", "width": "80%"}),
|
| 75 |
|
|
|
|
| 211 |
dbc.Card([
|
| 212 |
dbc.CardHeader(html.B("Step 1: Upload Data")),
|
| 213 |
dbc.CardBody([
|
| 214 |
+
# Premium Upload Component layout restored
|
| 215 |
dcc.Upload(
|
| 216 |
id='upload-data',
|
| 217 |
children=html.Div([
|
|
|
|
| 227 |
),
|
| 228 |
html.Div(id='upload-status', className="mt-2"),
|
| 229 |
html.Hr(),
|
|
|
|
| 230 |
dbc.Button("Run Deep Sets Prediction", id="predict-btn", disabled=True, className="w-100 font-weight-bold shadow-sm",
|
| 231 |
style={"backgroundColor": "#2dd4bf", "borderColor": "#2dd4bf", "color": "#0f172a"})
|
| 232 |
])
|
|
|
|
| 258 |
return theme_val
|
| 259 |
|
| 260 |
|
| 261 |
+
# --- MAIN LAYOUT RESPONSIVE STYLE CONFIGURATOR ---
|
| 262 |
@app.callback(
|
| 263 |
[Output('main-container', 'style'),
|
| 264 |
Output('sidebar-panel', 'style'),
|
| 265 |
Output('preview-table', 'style_header'),
|
| 266 |
Output('preview-table', 'style_cell'),
|
| 267 |
Output('theme-label', 'style'),
|
| 268 |
+
Output('theme-toggle', 'className'),
|
| 269 |
Output('sidebar-subtitle', 'className'),
|
| 270 |
Output('sidebar-footer', 'className'),
|
| 271 |
Output('help-nav-link', 'className')],
|
|
|
|
| 283 |
bg_main, color_main, bg_sidebar, border_sidebar = "#0f172a", "#f8fafc", "#1e293b", "1px solid rgba(45, 212, 191, 0.1)"
|
| 284 |
header_table, cell_table = '#1e293b', '#0f172a'
|
| 285 |
text_table, border_table = '#f8fafc', '#334155'
|
| 286 |
+
lbl_clr = {"color": "#f8fafc"}
|
| 287 |
+
radio_class = "text-white small"
|
| 288 |
sub_class, foot_class, link_class = "small text-white-50 mt-1", "text-white-50", "text-white-50"
|
| 289 |
|
| 290 |
container_css = {"background": bg_main, "color": color_main, "minHeight": "100vh", "transition": "all 0.3s ease"}
|
|
|
|
| 390 |
paper_bgcolor='rgba(0,0,0,0)',
|
| 391 |
plot_bgcolor='rgba(0,0,0,0)',
|
| 392 |
font_color=chart_text,
|
| 393 |
+
legend=dict(font=dict(color=chart_text), bgcolor='rgba(0,0,0,0)')
|
| 394 |
)
|
| 395 |
elif isinstance(fig, dict) and 'layout' in fig:
|
| 396 |
fig['layout']['paper_bgcolor'] = 'rgba(0,0,0,0)'
|