Spaces:
Running
Running
Readability: black labels and table headers; #288B79 accent for buttons/sliders only
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +82 -12
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -29,10 +29,13 @@ KAIKAKU_DARK = "#0F2D2F"
|
|
| 29 |
KAIKAKU_DEEP = "#0A1F20"
|
| 30 |
KAIKAKU_MID = "#1A3D3F"
|
| 31 |
KAIKAKU_EDGE = "#2A4D4F"
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
# Light matplotlib defaults; mint is an accent only
|
| 38 |
plt.rcParams.update({
|
|
@@ -425,30 +428,97 @@ def parse_fridge(raw_text, sibling, min_score=70):
|
|
| 425 |
|
| 426 |
# ===== UI =====
|
| 427 |
|
| 428 |
-
#
|
|
|
|
| 429 |
THEME = gr.themes.Soft(
|
| 430 |
primary_hue=gr.themes.Color(
|
| 431 |
-
c50="#
|
| 432 |
-
c300="#
|
| 433 |
-
c600=
|
| 434 |
c900=KAIKAKU_DARK, c950=KAIKAKU_DEEP,
|
| 435 |
),
|
| 436 |
neutral_hue="slate",
|
| 437 |
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
)
|
| 439 |
|
| 440 |
CUSTOM_CSS = f"""
|
| 441 |
.gradio-container {{max-width: 1280px !important;}}
|
| 442 |
footer {{visibility: hidden;}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 443 |
.sibling-card {{
|
| 444 |
-
border-left: 3px solid {
|
| 445 |
padding: 10px 14px;
|
| 446 |
margin: 6px 0;
|
| 447 |
-
background: #
|
| 448 |
border-radius: 4px;
|
| 449 |
}}
|
| 450 |
-
.sibling-name {{color: {KAIKAKU_DARK}; font-weight: 700;}}
|
| 451 |
-
.sibling-desc {{color: #
|
| 452 |
"""
|
| 453 |
|
| 454 |
# Precompute initial figures so plots are populated on first page load
|
|
|
|
| 29 |
KAIKAKU_DEEP = "#0A1F20"
|
| 30 |
KAIKAKU_MID = "#1A3D3F"
|
| 31 |
KAIKAKU_EDGE = "#2A4D4F"
|
| 32 |
+
KAIKAKU_ACCENT = "#288B79" # darker teal-green - readable on white
|
| 33 |
+
KAIKAKU_ACCENT_HOVER = "#1E6E5F"
|
| 34 |
+
KAIKAKU_ACCENT_LIGHT = "#A8D5CA" # background tints only
|
| 35 |
+
KAIKAKU_MINT = KAIKAKU_ACCENT # backwards-compat aliases used elsewhere
|
| 36 |
+
KAIKAKU_MINT_BRIGHT = KAIKAKU_ACCENT_HOVER
|
| 37 |
+
KAIKAKU_TEXT = "#0F2D2F"
|
| 38 |
+
KAIKAKU_MUTED = "#5A7878"
|
| 39 |
|
| 40 |
# Light matplotlib defaults; mint is an accent only
|
| 41 |
plt.rcParams.update({
|
|
|
|
| 428 |
|
| 429 |
# ===== UI =====
|
| 430 |
|
| 431 |
+
# Theme: light background, BLACK text everywhere, accent color reserved for
|
| 432 |
+
# interactive UI (buttons, sliders, focused borders) and brand cues.
|
| 433 |
THEME = gr.themes.Soft(
|
| 434 |
primary_hue=gr.themes.Color(
|
| 435 |
+
c50="#E8F4F1", c100="#C8E6DE", c200=KAIKAKU_ACCENT_LIGHT,
|
| 436 |
+
c300="#7BBAA9", c400="#4DA08F", c500=KAIKAKU_ACCENT,
|
| 437 |
+
c600=KAIKAKU_ACCENT_HOVER, c700="#155547", c800="#0F3B33",
|
| 438 |
c900=KAIKAKU_DARK, c950=KAIKAKU_DEEP,
|
| 439 |
),
|
| 440 |
neutral_hue="slate",
|
| 441 |
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 442 |
+
).set(
|
| 443 |
+
# Force readable label/title text instead of letting Soft tint them with primary
|
| 444 |
+
block_label_text_color="#1f2937",
|
| 445 |
+
block_label_text_weight="600",
|
| 446 |
+
block_title_text_color="#0f172a",
|
| 447 |
+
block_title_text_weight="700",
|
| 448 |
+
body_text_color="#0f172a",
|
| 449 |
+
body_text_color_subdued="#475569",
|
| 450 |
+
# Primary button: dark accent + white text -> high contrast
|
| 451 |
+
button_primary_background_fill=KAIKAKU_ACCENT,
|
| 452 |
+
button_primary_background_fill_hover=KAIKAKU_ACCENT_HOVER,
|
| 453 |
+
button_primary_text_color="#ffffff",
|
| 454 |
+
button_primary_border_color=KAIKAKU_ACCENT,
|
| 455 |
+
button_secondary_background_fill="#f1f5f9",
|
| 456 |
+
button_secondary_background_fill_hover="#e2e8f0",
|
| 457 |
+
button_secondary_text_color=KAIKAKU_DARK,
|
| 458 |
+
slider_color=KAIKAKU_ACCENT,
|
| 459 |
+
color_accent=KAIKAKU_ACCENT,
|
| 460 |
)
|
| 461 |
|
| 462 |
CUSTOM_CSS = f"""
|
| 463 |
.gradio-container {{max-width: 1280px !important;}}
|
| 464 |
footer {{visibility: hidden;}}
|
| 465 |
+
|
| 466 |
+
/* Make sure NOTHING uses the faded light-mint label color */
|
| 467 |
+
.gradio-container label,
|
| 468 |
+
.gradio-container .label,
|
| 469 |
+
.gradio-container [data-testid="block-label"],
|
| 470 |
+
.gradio-container .block-label,
|
| 471 |
+
.gradio-container .gr-block-label {{
|
| 472 |
+
color: #0f172a !important;
|
| 473 |
+
font-weight: 600 !important;
|
| 474 |
+
background: transparent !important;
|
| 475 |
+
}}
|
| 476 |
+
|
| 477 |
+
/* Tab labels readable */
|
| 478 |
+
.gradio-container button[role="tab"] {{
|
| 479 |
+
color: #334155 !important;
|
| 480 |
+
font-weight: 500 !important;
|
| 481 |
+
}}
|
| 482 |
+
.gradio-container button[role="tab"][aria-selected="true"] {{
|
| 483 |
+
color: {KAIKAKU_ACCENT} !important;
|
| 484 |
+
border-bottom-color: {KAIKAKU_ACCENT} !important;
|
| 485 |
+
font-weight: 700 !important;
|
| 486 |
+
}}
|
| 487 |
+
|
| 488 |
+
/* Primary button: dark accent + white text */
|
| 489 |
+
.gradio-container button.primary,
|
| 490 |
+
.gradio-container .primary > button {{
|
| 491 |
+
background: {KAIKAKU_ACCENT} !important;
|
| 492 |
+
color: #ffffff !important;
|
| 493 |
+
border-color: {KAIKAKU_ACCENT} !important;
|
| 494 |
+
font-weight: 600 !important;
|
| 495 |
+
}}
|
| 496 |
+
.gradio-container button.primary:hover {{
|
| 497 |
+
background: {KAIKAKU_ACCENT_HOVER} !important;
|
| 498 |
+
border-color: {KAIKAKU_ACCENT_HOVER} !important;
|
| 499 |
+
}}
|
| 500 |
+
|
| 501 |
+
/* Dataframe headers: black, bold, readable */
|
| 502 |
+
.gradio-container table thead th,
|
| 503 |
+
.gradio-container .gr-dataframe thead th {{
|
| 504 |
+
color: #0f172a !important;
|
| 505 |
+
font-weight: 700 !important;
|
| 506 |
+
background: #f8fafc !important;
|
| 507 |
+
}}
|
| 508 |
+
.gradio-container table tbody td {{
|
| 509 |
+
color: #0f172a !important;
|
| 510 |
+
}}
|
| 511 |
+
|
| 512 |
+
/* Sibling card */
|
| 513 |
.sibling-card {{
|
| 514 |
+
border-left: 3px solid {KAIKAKU_ACCENT};
|
| 515 |
padding: 10px 14px;
|
| 516 |
margin: 6px 0;
|
| 517 |
+
background: #f8fafc;
|
| 518 |
border-radius: 4px;
|
| 519 |
}}
|
| 520 |
+
.sibling-name {{color: {KAIKAKU_DARK}; font-weight: 700; font-size: 1.02em;}}
|
| 521 |
+
.sibling-desc {{color: #334155; font-size: 0.95em; line-height: 1.5;}}
|
| 522 |
"""
|
| 523 |
|
| 524 |
# Precompute initial figures so plots are populated on first page load
|