Upload folder using huggingface_hub
Browse files
home.py
CHANGED
|
@@ -482,17 +482,17 @@ def build_home_page(
|
|
| 482 |
)
|
| 483 |
|
| 484 |
with gr.Sidebar(open=False) as sheami_sidebar: # Sidebar
|
| 485 |
-
render_logo()
|
| 486 |
load_patients_btn = gr.Button(
|
| 487 |
"📂 Load Patients", variant="huggingface", visible=False
|
| 488 |
)
|
| 489 |
|
| 490 |
-
with gr.Row():
|
| 491 |
gr.Markdown("### 👥 Patients")
|
| 492 |
add_patient_btn = gr.Button(
|
| 493 |
-
"➕ Add", variant="huggingface",
|
| 494 |
)
|
| 495 |
-
patient_list = gr.Radio(choices=[], interactive=True, show_label=False)
|
| 496 |
|
| 497 |
with gr.Row():
|
| 498 |
with gr.Column(scale=3): # Main area
|
|
|
|
| 482 |
)
|
| 483 |
|
| 484 |
with gr.Sidebar(open=False) as sheami_sidebar: # Sidebar
|
| 485 |
+
# render_logo()
|
| 486 |
load_patients_btn = gr.Button(
|
| 487 |
"📂 Load Patients", variant="huggingface", visible=False
|
| 488 |
)
|
| 489 |
|
| 490 |
+
with gr.Row(equal_height=True):
|
| 491 |
gr.Markdown("### 👥 Patients")
|
| 492 |
add_patient_btn = gr.Button(
|
| 493 |
+
"➕ Add", variant="huggingface", scale=0
|
| 494 |
)
|
| 495 |
+
patient_list = gr.Radio(choices=[], interactive=True, show_label=False,elem_classes="pro-radio")
|
| 496 |
|
| 497 |
with gr.Row():
|
| 498 |
with gr.Column(scale=3): # Main area
|
ui.py
CHANGED
|
@@ -361,6 +361,96 @@ def handle_file_input_change(files):
|
|
| 361 |
|
| 362 |
def get_css():
|
| 363 |
return """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
.highlighted-text {
|
| 365 |
color: #FFD700; /* bright gold to stand out */
|
| 366 |
font-weight: bold; /* makes it pop */
|
|
|
|
| 361 |
|
| 362 |
def get_css():
|
| 363 |
return """
|
| 364 |
+
/* Container spacing */
|
| 365 |
+
.pro-radio .wrap {
|
| 366 |
+
display: flex;
|
| 367 |
+
flex-direction: column;
|
| 368 |
+
gap: 8px;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
/* Hide the default radio dot */
|
| 372 |
+
.pro-radio input[type="radio"] {
|
| 373 |
+
display: none !important;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
/* Base card look */
|
| 377 |
+
.pro-radio label {
|
| 378 |
+
display: block;
|
| 379 |
+
background: #fafafa;
|
| 380 |
+
color: #222;
|
| 381 |
+
font-family: "Inter", sans-serif;
|
| 382 |
+
font-size: 15px;
|
| 383 |
+
font-weight: 500;
|
| 384 |
+
padding: 12px 16px;
|
| 385 |
+
border-radius: 8px;
|
| 386 |
+
border: 1px solid #ddd;
|
| 387 |
+
cursor: pointer;
|
| 388 |
+
transition: all 0.2s ease;
|
| 389 |
+
outline: none !important;
|
| 390 |
+
box-shadow: none !important;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
/* Hover state */
|
| 394 |
+
.pro-radio label:hover {
|
| 395 |
+
background: #f0f0f0;
|
| 396 |
+
border-color: #bbb;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
/* Selected card */
|
| 400 |
+
.pro-radio input[type="radio"]:checked + span {
|
| 401 |
+
background: #e6f0ff; /* light blue background */
|
| 402 |
+
border: 1px solid #0066cc; /* blue border */
|
| 403 |
+
border-radius: 8px;
|
| 404 |
+
font-weight: 600;
|
| 405 |
+
color: #0066cc;
|
| 406 |
+
display: block;
|
| 407 |
+
padding: 12px 16px;
|
| 408 |
+
outline: none !important;
|
| 409 |
+
box-shadow: none !important;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
/* Kill any weird inner focus box */
|
| 413 |
+
.pro-radio span {
|
| 414 |
+
outline: none !important;
|
| 415 |
+
box-shadow: none !important;
|
| 416 |
+
border: none !important;
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
/* Remove Gradio's green selected background on the LABEL itself */
|
| 420 |
+
.pro-radio label:has(input[type="radio"]:checked),
|
| 421 |
+
.pro-radio label[aria-checked="true"],
|
| 422 |
+
.pro-radio label[data-selected="true"],
|
| 423 |
+
.pro-radio .selected,
|
| 424 |
+
.pro-radio [data-selected="true"] {
|
| 425 |
+
background: #fafafa !important; /* or transparent */
|
| 426 |
+
box-shadow: none !important;
|
| 427 |
+
border-color: #ddd !important;
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
/* Keep your selected look on the SPAN only (no inner blue box) */
|
| 431 |
+
.pro-radio input[type="radio"]:checked + span {
|
| 432 |
+
background: #e6f0ff;
|
| 433 |
+
border: 1px solid #0066cc;
|
| 434 |
+
border-radius: 8px;
|
| 435 |
+
display: block;
|
| 436 |
+
padding: 12px 16px;
|
| 437 |
+
color: #0066cc;
|
| 438 |
+
font-weight: 600;
|
| 439 |
+
outline: none !important;
|
| 440 |
+
box-shadow: none !important;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
/* Hide native dot + any focus rings */
|
| 444 |
+
.pro-radio input[type="radio"] { display: none !important; }
|
| 445 |
+
.pro-radio label,
|
| 446 |
+
.pro-radio label:focus,
|
| 447 |
+
.pro-radio label:focus-within,
|
| 448 |
+
.pro-radio input[type="radio"]:focus + span {
|
| 449 |
+
outline: none !important;
|
| 450 |
+
box-shadow: none !important;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
|
| 454 |
.highlighted-text {
|
| 455 |
color: #FFD700; /* bright gold to stand out */
|
| 456 |
font-weight: bold; /* makes it pop */
|