Scoll is nice but animation to cover bottom start
Browse files
app.py
CHANGED
|
@@ -365,6 +365,26 @@ h1, h2, h3, p, .markdown {
|
|
| 365 |
min-height: 200px !important;
|
| 366 |
overflow-y: auto !important;
|
| 367 |
resize: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
}
|
| 369 |
|
| 370 |
.failed-tests {
|
|
@@ -380,6 +400,17 @@ h1, h2, h3, p, .markdown {
|
|
| 380 |
max-height: 200px !important;
|
| 381 |
}
|
| 382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
"""
|
| 384 |
|
| 385 |
# Create the Gradio interface with sidebar and dark theme
|
|
@@ -439,6 +470,9 @@ with gr.Blocks(title="Model Test Results Dashboard", css=dark_theme_css) as demo
|
|
| 439 |
button.click(
|
| 440 |
fn=lambda name=model_name: plot_model_stats(name),
|
| 441 |
outputs=[plot_output, amd_failed_tests_output, nvidia_failed_tests_output]
|
|
|
|
|
|
|
|
|
|
| 442 |
)
|
| 443 |
|
| 444 |
# Initialize with the first model
|
|
|
|
| 365 |
min-height: 200px !important;
|
| 366 |
overflow-y: auto !important;
|
| 367 |
resize: none !important;
|
| 368 |
+
scrollbar-width: thin !important;
|
| 369 |
+
scrollbar-color: #333333 #000000 !important;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
/* WebKit scrollbar styling for failed tests */
|
| 373 |
+
.failed-tests textarea::-webkit-scrollbar {
|
| 374 |
+
width: 8px !important;
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
.failed-tests textarea::-webkit-scrollbar-track {
|
| 378 |
+
background: #000000 !important;
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
.failed-tests textarea::-webkit-scrollbar-thumb {
|
| 382 |
+
background-color: #333333 !important;
|
| 383 |
+
border-radius: 4px !important;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
.failed-tests textarea::-webkit-scrollbar-thumb:hover {
|
| 387 |
+
background-color: #555555 !important;
|
| 388 |
}
|
| 389 |
|
| 390 |
.failed-tests {
|
|
|
|
| 400 |
max-height: 200px !important;
|
| 401 |
}
|
| 402 |
|
| 403 |
+
/* JavaScript to reset scroll position */
|
| 404 |
+
.scroll-reset {
|
| 405 |
+
animation: resetScroll 0.1s ease;
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
@keyframes resetScroll {
|
| 409 |
+
0% { scroll-behavior: auto; }
|
| 410 |
+
100% { scroll-behavior: auto; }
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
|
| 414 |
"""
|
| 415 |
|
| 416 |
# Create the Gradio interface with sidebar and dark theme
|
|
|
|
| 470 |
button.click(
|
| 471 |
fn=lambda name=model_name: plot_model_stats(name),
|
| 472 |
outputs=[plot_output, amd_failed_tests_output, nvidia_failed_tests_output]
|
| 473 |
+
).then(
|
| 474 |
+
fn=None,
|
| 475 |
+
js="() => { setTimeout(() => { document.querySelectorAll('textarea').forEach(t => { if (t.closest('.failed-tests')) { t.scrollTo({ top: 0, behavior: 'smooth' }); } }); }, 100); }"
|
| 476 |
)
|
| 477 |
|
| 478 |
# Initialize with the first model
|