Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -272,47 +272,73 @@ def auto_refresh_from_dir(
|
|
| 272 |
def build_app() -> gr.Blocks:
|
| 273 |
row_css = """
|
| 274 |
/* Force light theme everywhere */
|
| 275 |
-
body {
|
| 276 |
background-color: #f5f7fa !important;
|
|
|
|
| 277 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
}
|
| 284 |
-
|
| 285 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
.gradio-container .block,
|
| 287 |
.gradio-container .form,
|
| 288 |
.gradio-container fieldset,
|
| 289 |
.gradio-container .input-block,
|
| 290 |
.gradio-container .wrap,
|
| 291 |
.gradio-container .gr-box,
|
| 292 |
-
.gradio-container .gr-form
|
| 293 |
-
.gradio-container .gr-input {
|
| 294 |
background-color: white !important;
|
| 295 |
-
border-color: #e1e4e8 !important;
|
| 296 |
-
}
|
| 297 |
-
|
| 298 |
-
.gradio-container label {
|
| 299 |
-
background-color: transparent !important;
|
| 300 |
-
color: #24292e !important;
|
| 301 |
-
}
|
| 302 |
-
|
| 303 |
-
/* Remove any potential dark wrappers */
|
| 304 |
-
.gradio-container > div,
|
| 305 |
-
.gradio-container .container {
|
| 306 |
-
background-color: transparent !important;
|
| 307 |
-
}
|
| 308 |
-
|
| 309 |
-
/* Force all text to be dark */
|
| 310 |
-
.gradio-container,
|
| 311 |
-
.gradio-container label,
|
| 312 |
-
.gradio-container p,
|
| 313 |
-
.gradio-container span,
|
| 314 |
-
.gradio-container div {
|
| 315 |
-
color: #24292e !important;
|
| 316 |
}
|
| 317 |
|
| 318 |
/* Table styling */
|
|
@@ -371,54 +397,6 @@ def build_app() -> gr.Blocks:
|
|
| 371 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 372 |
}
|
| 373 |
|
| 374 |
-
/* Search box styling */
|
| 375 |
-
.search-box {
|
| 376 |
-
background: white !important;
|
| 377 |
-
padding: 16px !important;
|
| 378 |
-
border-radius: 6px;
|
| 379 |
-
border: 2px solid #e1e4e8 !important;
|
| 380 |
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 381 |
-
margin-bottom: 16px;
|
| 382 |
-
}
|
| 383 |
-
|
| 384 |
-
.search-box * {
|
| 385 |
-
color: #24292e !important;
|
| 386 |
-
}
|
| 387 |
-
|
| 388 |
-
.search-box .wrap,
|
| 389 |
-
.search-box .block,
|
| 390 |
-
.search-box .container,
|
| 391 |
-
.search-box .group,
|
| 392 |
-
.search-box fieldset,
|
| 393 |
-
.search-box > div,
|
| 394 |
-
.search-box > div > div {
|
| 395 |
-
background: transparent !important;
|
| 396 |
-
padding: 0 !important;
|
| 397 |
-
border: none !important;
|
| 398 |
-
}
|
| 399 |
-
|
| 400 |
-
.search-box input {
|
| 401 |
-
background: white !important;
|
| 402 |
-
color: #24292e !important;
|
| 403 |
-
border: 1.5px solid #e1e4e8 !important;
|
| 404 |
-
border-radius: 4px !important;
|
| 405 |
-
}
|
| 406 |
-
|
| 407 |
-
.search-box input::placeholder {
|
| 408 |
-
color: #6a737d !important;
|
| 409 |
-
}
|
| 410 |
-
|
| 411 |
-
.search-box label {
|
| 412 |
-
background: transparent !important;
|
| 413 |
-
color: #24292e !important;
|
| 414 |
-
padding: 0 0 8px 0 !important;
|
| 415 |
-
}
|
| 416 |
-
|
| 417 |
-
.search-box span {
|
| 418 |
-
background: transparent !important;
|
| 419 |
-
color: #24292e !important;
|
| 420 |
-
}
|
| 421 |
-
|
| 422 |
/* Filter section styling */
|
| 423 |
.filter-section {
|
| 424 |
background: white !important;
|
|
@@ -432,15 +410,6 @@ def build_app() -> gr.Blocks:
|
|
| 432 |
color: #24292e !important;
|
| 433 |
}
|
| 434 |
|
| 435 |
-
.filter-section .wrap,
|
| 436 |
-
.filter-section .block,
|
| 437 |
-
.filter-section .container,
|
| 438 |
-
.filter-section .group,
|
| 439 |
-
.filter-section > div,
|
| 440 |
-
.filter-section > div > div {
|
| 441 |
-
background: transparent !important;
|
| 442 |
-
}
|
| 443 |
-
|
| 444 |
.filter-section .wrap {
|
| 445 |
padding: 20px !important;
|
| 446 |
}
|
|
@@ -463,16 +432,9 @@ def build_app() -> gr.Blocks:
|
|
| 463 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 464 |
}
|
| 465 |
|
| 466 |
-
.gradio-container .accordion
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
.gradio-container .accordion label {
|
| 471 |
-
background: transparent !important;
|
| 472 |
-
color: #24292e !important;
|
| 473 |
-
}
|
| 474 |
-
|
| 475 |
-
.gradio-container .accordion button {
|
| 476 |
background: transparent !important;
|
| 477 |
color: #24292e !important;
|
| 478 |
}
|
|
@@ -483,12 +445,6 @@ def build_app() -> gr.Blocks:
|
|
| 483 |
background: white !important;
|
| 484 |
}
|
| 485 |
|
| 486 |
-
/* Make text in info section dark */
|
| 487 |
-
.info-section p,
|
| 488 |
-
.info-section li,
|
| 489 |
-
.info-section ul,
|
| 490 |
-
.info-section h3,
|
| 491 |
-
.info-section strong,
|
| 492 |
.info-section * {
|
| 493 |
color: #24292e !important;
|
| 494 |
}
|
|
@@ -497,26 +453,6 @@ def build_app() -> gr.Blocks:
|
|
| 497 |
color: #0366d6 !important;
|
| 498 |
}
|
| 499 |
|
| 500 |
-
/* Override any dark backgrounds in groups and accordions */
|
| 501 |
-
.gradio-container .group,
|
| 502 |
-
.gradio-container .accordion,
|
| 503 |
-
.gradio-container .panel {
|
| 504 |
-
background-color: white !important;
|
| 505 |
-
}
|
| 506 |
-
|
| 507 |
-
/* Heading styling */
|
| 508 |
-
.gradio-container h1 {
|
| 509 |
-
color: #24292e !important;
|
| 510 |
-
font-weight: 700;
|
| 511 |
-
margin-bottom: 24px;
|
| 512 |
-
}
|
| 513 |
-
|
| 514 |
-
.gradio-container h3 {
|
| 515 |
-
color: #24292e !important;
|
| 516 |
-
font-weight: 600;
|
| 517 |
-
margin-bottom: 16px;
|
| 518 |
-
}
|
| 519 |
-
|
| 520 |
/* Checkbox styling */
|
| 521 |
.gradio-container input[type="checkbox"] {
|
| 522 |
accent-color: #0366d6 !important;
|
|
|
|
| 272 |
def build_app() -> gr.Blocks:
|
| 273 |
row_css = """
|
| 274 |
/* Force light theme everywhere */
|
| 275 |
+
body, .gradio-container {
|
| 276 |
background-color: #f5f7fa !important;
|
| 277 |
+
color: #24292e !important;
|
| 278 |
}
|
| 279 |
+
|
| 280 |
+
/* --------------------------------------
|
| 281 |
+
FIXED SEARCH BOX CSS STARTS HERE
|
| 282 |
+
--------------------------------------
|
| 283 |
+
*/
|
| 284 |
|
| 285 |
+
/* The outer Group container */
|
| 286 |
+
.search-box {
|
| 287 |
+
background: white !important;
|
| 288 |
+
padding: 16px !important;
|
| 289 |
+
border-radius: 6px;
|
| 290 |
+
border: 2px solid #e1e4e8 !important;
|
| 291 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 292 |
+
margin-bottom: 16px;
|
| 293 |
}
|
| 294 |
+
|
| 295 |
+
/* Reset the internal Gradio Block styles so they fit in the white box */
|
| 296 |
+
.search-box .block {
|
| 297 |
+
background: transparent !important;
|
| 298 |
+
border: none !important;
|
| 299 |
+
padding: 0 !important;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
/* Style the Label Text (🔍 Search) */
|
| 303 |
+
.search-box label span {
|
| 304 |
+
color: #24292e !important;
|
| 305 |
+
font-weight: 600;
|
| 306 |
+
font-size: 14px;
|
| 307 |
+
margin-bottom: 8px;
|
| 308 |
+
background: transparent !important;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
/* Style the actual Input Field */
|
| 312 |
+
.search-box input.scroll-hide {
|
| 313 |
+
background-color: white !important;
|
| 314 |
+
color: #24292e !important;
|
| 315 |
+
border: 1.5px solid #e1e4e8 !important;
|
| 316 |
+
border-radius: 4px !important;
|
| 317 |
+
padding: 10px !important;
|
| 318 |
+
box-shadow: none !important;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
/* Fix focus state */
|
| 322 |
+
.search-box input.scroll-hide:focus {
|
| 323 |
+
border-color: #0366d6 !important;
|
| 324 |
+
ring: 0 !important;
|
| 325 |
+
outline: none !important;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
/* --------------------------------------
|
| 329 |
+
END FIXED SEARCH BOX CSS
|
| 330 |
+
--------------------------------------
|
| 331 |
+
*/
|
| 332 |
+
|
| 333 |
+
/* Override all dark backgrounds (Global) */
|
| 334 |
.gradio-container .block,
|
| 335 |
.gradio-container .form,
|
| 336 |
.gradio-container fieldset,
|
| 337 |
.gradio-container .input-block,
|
| 338 |
.gradio-container .wrap,
|
| 339 |
.gradio-container .gr-box,
|
| 340 |
+
.gradio-container .gr-form {
|
|
|
|
| 341 |
background-color: white !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
}
|
| 343 |
|
| 344 |
/* Table styling */
|
|
|
|
| 397 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 398 |
}
|
| 399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
/* Filter section styling */
|
| 401 |
.filter-section {
|
| 402 |
background: white !important;
|
|
|
|
| 410 |
color: #24292e !important;
|
| 411 |
}
|
| 412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
.filter-section .wrap {
|
| 414 |
padding: 20px !important;
|
| 415 |
}
|
|
|
|
| 432 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
| 433 |
}
|
| 434 |
|
| 435 |
+
.gradio-container .accordion label,
|
| 436 |
+
.gradio-container .accordion button,
|
| 437 |
+
.gradio-container .accordion span {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
background: transparent !important;
|
| 439 |
color: #24292e !important;
|
| 440 |
}
|
|
|
|
| 445 |
background: white !important;
|
| 446 |
}
|
| 447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
.info-section * {
|
| 449 |
color: #24292e !important;
|
| 450 |
}
|
|
|
|
| 453 |
color: #0366d6 !important;
|
| 454 |
}
|
| 455 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
/* Checkbox styling */
|
| 457 |
.gradio-container input[type="checkbox"] {
|
| 458 |
accent-color: #0366d6 !important;
|