Spaces:
Sleeping
Sleeping
Upload scenario_gui.py with huggingface_hub
Browse files- scenario_gui.py +20 -8
scenario_gui.py
CHANGED
|
@@ -318,11 +318,18 @@ label { color: var(--text-secondary) !important; font-size: 11px !important;
|
|
| 318 |
font-family: var(--font-ui) !important; text-transform: uppercase;
|
| 319 |
letter-spacing: 0.05em; }
|
| 320 |
|
| 321 |
-
/* Buttons — flat, squared,
|
| 322 |
-
.
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
border-radius: 0 !important;
|
| 327 |
font-family: var(--font-mono) !important;
|
| 328 |
font-size: 12px !important;
|
|
@@ -330,9 +337,10 @@ label { color: var(--text-secondary) !important; font-size: 11px !important;
|
|
| 330 |
letter-spacing: 0.08em;
|
| 331 |
text-transform: uppercase;
|
| 332 |
}
|
| 333 |
-
.btn-primary:hover, button.primary:hover {
|
| 334 |
-
background:
|
| 335 |
-
color:
|
|
|
|
| 336 |
}
|
| 337 |
|
| 338 |
/* Accordion — flat, squared */
|
|
@@ -1576,6 +1584,10 @@ def build_app():
|
|
| 1576 |
title="Dr Murphy")
|
| 1577 |
|
| 1578 |
with ctx as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1579 |
# Per-session state (gr.State — safe for multi-user HF Spaces)
|
| 1580 |
last_run_state = gr.State(value=None)
|
| 1581 |
saved_runs_state = gr.State(value=[])
|
|
|
|
| 318 |
font-family: var(--font-ui) !important; text-transform: uppercase;
|
| 319 |
letter-spacing: 0.05em; }
|
| 320 |
|
| 321 |
+
/* Buttons — flat, squared, slate blue theme (override Gradio 5.x orange) */
|
| 322 |
+
:root, body, body.dark, .dark {
|
| 323 |
+
--color-accent: #475569 !important;
|
| 324 |
+
--button-primary-background-fill: #475569 !important;
|
| 325 |
+
--button-primary-background-fill-hover: #334155 !important;
|
| 326 |
+
--button-primary-text-color: #ffffff !important;
|
| 327 |
+
--button-primary-border-color: #475569 !important;
|
| 328 |
+
}
|
| 329 |
+
.btn-primary, button.primary, .primary {
|
| 330 |
+
background: #475569 !important;
|
| 331 |
+
color: #ffffff !important;
|
| 332 |
+
border: 2px solid #475569 !important;
|
| 333 |
border-radius: 0 !important;
|
| 334 |
font-family: var(--font-mono) !important;
|
| 335 |
font-size: 12px !important;
|
|
|
|
| 337 |
letter-spacing: 0.08em;
|
| 338 |
text-transform: uppercase;
|
| 339 |
}
|
| 340 |
+
.btn-primary:hover, button.primary:hover, .primary:hover {
|
| 341 |
+
background: #334155 !important;
|
| 342 |
+
color: #ffffff !important;
|
| 343 |
+
border-color: #334155 !important;
|
| 344 |
}
|
| 345 |
|
| 346 |
/* Accordion — flat, squared */
|
|
|
|
| 1584 |
title="Dr Murphy")
|
| 1585 |
|
| 1586 |
with ctx as demo:
|
| 1587 |
+
# Inject CSS and JS for Gradio 5.x (can't use constructor args)
|
| 1588 |
+
if _gradio_major >= 5:
|
| 1589 |
+
gr.HTML(f"<style>{CSS}</style>")
|
| 1590 |
+
|
| 1591 |
# Per-session state (gr.State — safe for multi-user HF Spaces)
|
| 1592 |
last_run_state = gr.State(value=None)
|
| 1593 |
saved_runs_state = gr.State(value=[])
|