Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -469,10 +469,55 @@ def build_ui():
|
|
| 469 |
</div>
|
| 470 |
""")
|
| 471 |
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
# --- MMG Inputs ---
|
| 477 |
mmg_monthly_volume = gr.Slider(0, 20000, 7500, step=50, label="Monthly volume (MMG)", info="Mammography exams per month", visible=True)
|
| 478 |
mmg_read_minutes = gr.Number(label="Avg reading time today (minutes)", value=1.7, visible=True)
|
|
|
|
| 469 |
</div>
|
| 470 |
""")
|
| 471 |
|
| 472 |
+
/* Use-case chooser as cards */
|
| 473 |
+
#uc [role="radiogroup"] {
|
| 474 |
+
display: grid;
|
| 475 |
+
grid-template-columns: repeat(3, minmax(0,1fr));
|
| 476 |
+
gap: 12px;
|
| 477 |
+
}
|
| 478 |
+
@media (max-width: 820px) {
|
| 479 |
+
#uc [role="radiogroup"] { grid-template-columns: 1fr; }
|
| 480 |
+
}
|
| 481 |
+
#uc [role="radiogroup"] label {
|
| 482 |
+
border: 1px solid #eef2f7;
|
| 483 |
+
border-radius: 16px;
|
| 484 |
+
background: #fff;
|
| 485 |
+
padding: 14px 16px;
|
| 486 |
+
box-shadow: 0 8px 24px rgba(0,0,0,.06);
|
| 487 |
+
cursor: pointer;
|
| 488 |
+
display: flex;
|
| 489 |
+
align-items: center;
|
| 490 |
+
gap: 10px;
|
| 491 |
+
transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease;
|
| 492 |
+
}
|
| 493 |
+
#uc [role="radiogroup"] input[type="radio"] {
|
| 494 |
+
accent-color: #14b8a6; /* teal */
|
| 495 |
+
}
|
| 496 |
+
#uc [role="radiogroup"] label:hover {
|
| 497 |
+
transform: translateY(-1px);
|
| 498 |
+
box-shadow: 0 12px 28px rgba(0,0,0,.10);
|
| 499 |
+
}
|
| 500 |
+
#uc [role="radiogroup"] input[type="radio"]:checked + span {
|
| 501 |
+
font-weight: 700;
|
| 502 |
+
}
|
| 503 |
+
#uc .uc-hint {
|
| 504 |
+
margin-top: 6px;
|
| 505 |
+
opacity: .7;
|
| 506 |
+
font-size: .9em;
|
| 507 |
+
}
|
| 508 |
|
| 509 |
+
with gr.Row():
|
| 510 |
+
with gr.Column(elem_id="uc"):
|
| 511 |
+
gr.Markdown("### Choose your use case")
|
| 512 |
+
use_case = gr.Radio(
|
| 513 |
+
USE_CASES,
|
| 514 |
+
value=USE_CASES[0],
|
| 515 |
+
label=None,
|
| 516 |
+
interactive=True
|
| 517 |
+
)
|
| 518 |
+
gr.Markdown(
|
| 519 |
+
"<div class='uc-hint'>Pick one to load the matching calculator. You can switch anytime.</div>"
|
| 520 |
+
)
|
| 521 |
# --- MMG Inputs ---
|
| 522 |
mmg_monthly_volume = gr.Slider(0, 20000, 7500, step=50, label="Monthly volume (MMG)", info="Mammography exams per month", visible=True)
|
| 523 |
mmg_read_minutes = gr.Number(label="Avg reading time today (minutes)", value=1.7, visible=True)
|