Spaces:
Sleeping
Sleeping
changes to font color
Browse files- app.py +23 -165
- styles.css +62 -169
app.py
CHANGED
@@ -13,20 +13,20 @@ except UnicodeDecodeError:
|
|
13 |
with open("styles.css", "r", encoding="latin-1") as f:
|
14 |
custom_css = f.read()
|
15 |
|
16 |
-
# Add more specific selector for Gradio and add
|
17 |
additional_css = """
|
18 |
.gradio-container .checkbox-panel,
|
19 |
div.gradio-container [class*="block"] .checkbox-panel {
|
20 |
-
background-color: #
|
21 |
}
|
22 |
.gradio-container .search-panel,
|
23 |
div.gradio-container [class*="block"] .search-panel {
|
24 |
-
background-color: #
|
25 |
}
|
26 |
"""
|
27 |
custom_css += additional_css
|
28 |
|
29 |
-
# Create a custom theme with
|
30 |
class CustomTheme(gr.themes.Base):
|
31 |
def __init__(self):
|
32 |
super().__init__(
|
@@ -35,60 +35,27 @@ class CustomTheme(gr.themes.Base):
|
|
35 |
neutral_hue=colors.gray,
|
36 |
text_size=gr.themes.sizes.text_lg
|
37 |
)
|
38 |
-
#
|
39 |
self.block_border_width = "0px"
|
40 |
self.block_shadow = "none"
|
41 |
-
self.block_background_fill = "#FFFFFF"
|
42 |
-
self.background_fill_primary = "#FFFFFF"
|
43 |
-
self.background_fill_secondary = "#FFFFFF"
|
44 |
|
45 |
-
# Add additional CSS for the new styles,
|
46 |
custom_css += """
|
47 |
/* Only override specific panels by ID */
|
48 |
#checkbox-panel,
|
49 |
#search-panel {
|
50 |
-
background-color: #
|
51 |
}
|
52 |
-
|
53 |
/* Only affect immediate children of these specific panels */
|
54 |
#checkbox-panel > *,
|
55 |
#search-panel > * {
|
56 |
-
background-color:
|
57 |
}
|
58 |
-
|
59 |
/* Target checkbox inputs specifically */
|
60 |
#checkbox-panel input[type="checkbox"],
|
61 |
#search-panel input[type="text"] {
|
62 |
-
background-color: #FFFFFF !important;
|
63 |
-
}
|
64 |
-
"""
|
65 |
-
|
66 |
-
# CSS for the page
|
67 |
-
css = """
|
68 |
-
/* Additional style to ensure text color in textareas is black */
|
69 |
-
textarea, input, textarea[data-testid="textbox"] {
|
70 |
-
color: #000000 !important;
|
71 |
-
}
|
72 |
-
|
73 |
-
/* Fix for block labels in gradio */
|
74 |
-
span[data-testid="block-info"] {
|
75 |
-
color: #000000 !important;
|
76 |
background-color: transparent !important;
|
77 |
}
|
78 |
-
|
79 |
-
/* Additional style to ensure text color in textareas and inputs is black */
|
80 |
-
textarea, input, textarea[data-testid="textbox"] {
|
81 |
-
color: #000000 !important;
|
82 |
-
}
|
83 |
-
|
84 |
-
/* Force black text color for search textbox */
|
85 |
-
.search-panel textarea,
|
86 |
-
textarea.scroll-hide,
|
87 |
-
textarea.svelte-173056l,
|
88 |
-
textarea[data-testid="textbox"] {
|
89 |
-
color: #000000 !important;
|
90 |
-
caret-color: #000000 !important;
|
91 |
-
}
|
92 |
"""
|
93 |
|
94 |
def strip_timestamp(name):
|
@@ -287,15 +254,13 @@ def get_color_for_value(value, min_val, max_val):
|
|
287 |
norm = (value - min_val) / (max_val - min_val)
|
288 |
if norm < 0.5:
|
289 |
ratio = norm / 0.5
|
290 |
-
|
291 |
-
|
292 |
-
g = int(140 * ratio)
|
293 |
b = 0
|
294 |
else:
|
295 |
ratio = (norm - 0.5) / 0.5
|
296 |
-
|
297 |
-
|
298 |
-
g = 140
|
299 |
b = 0
|
300 |
return f"#{r:02X}{g:02X}{b:02X}"
|
301 |
|
@@ -385,7 +350,7 @@ def update_leaderboard(selected_mwoz, selected_tau_airline, selected_tau_retail,
|
|
385 |
# Create our custom theme instance
|
386 |
custom_theme = CustomTheme()
|
387 |
|
388 |
-
with gr.Blocks(css=
|
389 |
gr.Markdown("# 🏆 TD-EVAL Model Evaluation Leaderboard")
|
390 |
gr.HTML('<div class="subtitle">This leaderboard displays aggregated model performance across multiple evaluation metrics.</div>')
|
391 |
|
@@ -394,23 +359,10 @@ with gr.Blocks(css=css, title="TD-EVAL Leaderboard", theme=custom_theme) as demo
|
|
394 |
<script>
|
395 |
// Function to fix background colors
|
396 |
function fixBackgrounds() {
|
397 |
-
// Add a style tag to force all block-info spans to be black
|
398 |
-
var styleEl = document.createElement('style');
|
399 |
-
styleEl.textContent = `
|
400 |
-
span[data-testid="block-info"] { color: #000000 !important; }
|
401 |
-
.svelte-1gfkn6j { color: #000000 !important; }
|
402 |
-
.search-panel label,
|
403 |
-
.search-panel .label-wrap,
|
404 |
-
.search-panel span,
|
405 |
-
#search-panel span,
|
406 |
-
div[id="search-panel"] span { color: #000000 !important; }
|
407 |
-
`;
|
408 |
-
document.head.appendChild(styleEl);
|
409 |
-
|
410 |
// Only fix specific panels by ID
|
411 |
var checkboxPanel = document.getElementById('checkbox-panel');
|
412 |
if (checkboxPanel) {
|
413 |
-
checkboxPanel.style.backgroundColor = '#
|
414 |
|
415 |
// Only make checkboxes and their direct containers transparent
|
416 |
var checkboxes = checkboxPanel.querySelectorAll('input[type="checkbox"]');
|
@@ -419,85 +371,40 @@ with gr.Blocks(css=css, title="TD-EVAL Leaderboard", theme=custom_theme) as demo
|
|
419 |
if (parent) parent.style.backgroundColor = 'transparent';
|
420 |
checkbox.style.backgroundColor = 'transparent';
|
421 |
|
422 |
-
// Find and style the associated label to be
|
423 |
var label = checkbox.nextElementSibling;
|
424 |
if (label && label.tagName === 'LABEL') {
|
425 |
-
label.style.color = '#
|
426 |
}
|
427 |
|
428 |
// Also find any span elements that might contain the label text
|
429 |
var spans = parent.querySelectorAll('span');
|
430 |
spans.forEach(function(span) {
|
431 |
-
span.style.color = '#
|
432 |
});
|
433 |
|
434 |
// Find label elements in the parent container
|
435 |
var labels = parent.querySelectorAll('label');
|
436 |
labels.forEach(function(label) {
|
437 |
-
label.style.color = '#
|
438 |
});
|
439 |
-
|
440 |
-
// Apply custom styling for the checkbox to show orange checkmark
|
441 |
-
if (checkbox.checked) {
|
442 |
-
checkbox.style.position = 'relative';
|
443 |
-
checkbox.style.appearance = 'none';
|
444 |
-
checkbox.style.backgroundColor = '#F0F0F0';
|
445 |
-
checkbox.style.border = '1px solid #CCCCCC';
|
446 |
-
checkbox.style.borderRadius = '3px';
|
447 |
-
|
448 |
-
// Create or update the checkmark element
|
449 |
-
var checkmark = checkbox.querySelector('.orange-checkmark');
|
450 |
-
if (!checkmark) {
|
451 |
-
checkmark = document.createElement('span');
|
452 |
-
checkmark.className = 'orange-checkmark';
|
453 |
-
checkmark.style.position = 'absolute';
|
454 |
-
checkmark.style.left = '50%';
|
455 |
-
checkmark.style.top = '50%';
|
456 |
-
checkmark.style.transform = 'translate(-50%, -50%)';
|
457 |
-
checkmark.style.color = '#c34700';
|
458 |
-
checkmark.style.fontSize = '14px';
|
459 |
-
checkmark.style.fontWeight = 'bold';
|
460 |
-
checkmark.innerText = '✓';
|
461 |
-
checkbox.appendChild(checkmark);
|
462 |
-
}
|
463 |
-
}
|
464 |
});
|
465 |
}
|
466 |
|
467 |
var searchPanel = document.getElementById('search-panel');
|
468 |
if (searchPanel) {
|
469 |
-
searchPanel.style.backgroundColor = '#
|
470 |
|
471 |
// Only make search input and its direct container transparent
|
472 |
var searchInput = searchPanel.querySelector('input[type="text"]');
|
473 |
if (searchInput) {
|
474 |
var parent = searchInput.parentElement;
|
475 |
if (parent) parent.style.backgroundColor = 'transparent';
|
476 |
-
searchInput.style.backgroundColor = '
|
477 |
// Ensure the border is visible and matches text color
|
478 |
-
searchInput.style.border = '2px solid #
|
479 |
-
searchInput.style.color = '#
|
480 |
}
|
481 |
-
|
482 |
-
// Make sure the label is black
|
483 |
-
var searchLabels = searchPanel.querySelectorAll('label, .label-wrap, .label-wrap span');
|
484 |
-
searchLabels.forEach(function(label) {
|
485 |
-
label.style.color = '#000000';
|
486 |
-
});
|
487 |
-
|
488 |
-
// Target the specific span element that contains the label text
|
489 |
-
var blockInfoSpans = document.querySelectorAll('span[data-testid="block-info"]');
|
490 |
-
blockInfoSpans.forEach(function(span) {
|
491 |
-
span.style.color = '#000000';
|
492 |
-
});
|
493 |
-
|
494 |
-
// Also target elements with the svelte class
|
495 |
-
var svelteElements = document.querySelectorAll('.svelte-1gfkn6j');
|
496 |
-
svelteElements.forEach(function(element) {
|
497 |
-
if (element.textContent.includes('Search models')) {
|
498 |
-
element.style.color = '#000000';
|
499 |
-
}
|
500 |
-
});
|
501 |
}
|
502 |
}
|
503 |
|
@@ -529,8 +436,7 @@ with gr.Blocks(css=css, title="TD-EVAL Leaderboard", theme=custom_theme) as demo
|
|
529 |
search_input = gr.Textbox(
|
530 |
label="Search models",
|
531 |
placeholder="Type to filter…",
|
532 |
-
elem_classes="search-input"
|
533 |
-
elem_id="search-input"
|
534 |
)
|
535 |
|
536 |
hidden_sort_state = gr.State(value={"sort_by": "Average Score", "ascending": False})
|
@@ -613,53 +519,5 @@ with gr.Blocks(css=css, title="TD-EVAL Leaderboard", theme=custom_theme) as demo
|
|
613 |
|
614 |
demo.load(fn=update_leaderboard, inputs=[cb_mwoz, cb_tau_airline, cb_tau_retail, hidden_sort_state, search_input], outputs=leaderboard_display)
|
615 |
|
616 |
-
# JavaScript to change panel backgrounds
|
617 |
-
searchpanel_js = """
|
618 |
-
function applyStyles() {
|
619 |
-
// Add a style tag to the head to ensure textarea text color only
|
620 |
-
var styleElement = document.createElement('style');
|
621 |
-
styleElement.textContent = `
|
622 |
-
textarea,
|
623 |
-
textarea[data-testid="textbox"],
|
624 |
-
textarea.scroll-hide,
|
625 |
-
textarea.svelte-173056l {
|
626 |
-
color: #000000 !important;
|
627 |
-
caret-color: #000000 !important;
|
628 |
-
background-color: #FFFFFF !important;
|
629 |
-
}
|
630 |
-
|
631 |
-
/* Make all backgrounds white */
|
632 |
-
body, div, span, input, textarea, select, button {
|
633 |
-
background-color: #FFFFFF !important;
|
634 |
-
}
|
635 |
-
|
636 |
-
/* Ensure all text is black */
|
637 |
-
body, div, span, input, textarea, select, button, label, p, h1, h2, h3, h4, h5, h6 {
|
638 |
-
color: #000000 !important;
|
639 |
-
}
|
640 |
-
`;
|
641 |
-
document.head.appendChild(styleElement);
|
642 |
-
|
643 |
-
// Wait for the DOM to be fully loaded
|
644 |
-
var searchPanel = document.querySelector('.search-panel');
|
645 |
-
if (searchPanel) {
|
646 |
-
// Only focus on making the text black
|
647 |
-
var searchTextarea = searchPanel.querySelector('textarea[data-testid="textbox"]');
|
648 |
-
if (searchTextarea) {
|
649 |
-
// ONLY set color, not background
|
650 |
-
searchTextarea.setAttribute('style', 'color: #000000 !important; background-color: #FFFFFF !important;');
|
651 |
-
}
|
652 |
-
}
|
653 |
-
}
|
654 |
-
|
655 |
-
// Call the function when page loads
|
656 |
-
document.addEventListener('DOMContentLoaded', applyStyles);
|
657 |
-
// Also call it after a short delay to catch elements that might load later
|
658 |
-
setTimeout(applyStyles, 500);
|
659 |
-
// And set an interval to catch any dynamically loaded elements
|
660 |
-
setInterval(applyStyles, 2000);
|
661 |
-
"""
|
662 |
-
|
663 |
if __name__ == "__main__":
|
664 |
-
demo.load(js=searchpanel_js)
|
665 |
demo.launch()
|
|
|
13 |
with open("styles.css", "r", encoding="latin-1") as f:
|
14 |
custom_css = f.read()
|
15 |
|
16 |
+
# Add more specific selector for Gradio and add !important to improve the cascading
|
17 |
additional_css = """
|
18 |
.gradio-container .checkbox-panel,
|
19 |
div.gradio-container [class*="block"] .checkbox-panel {
|
20 |
+
background-color: #27272A !important;
|
21 |
}
|
22 |
.gradio-container .search-panel,
|
23 |
div.gradio-container [class*="block"] .search-panel {
|
24 |
+
background-color: #27272A !important;
|
25 |
}
|
26 |
"""
|
27 |
custom_css += additional_css
|
28 |
|
29 |
+
# Create a custom theme with dark gray for our panels
|
30 |
class CustomTheme(gr.themes.Base):
|
31 |
def __init__(self):
|
32 |
super().__init__(
|
|
|
35 |
neutral_hue=colors.gray,
|
36 |
text_size=gr.themes.sizes.text_lg
|
37 |
)
|
38 |
+
# Don't set any global background colors
|
39 |
self.block_border_width = "0px"
|
40 |
self.block_shadow = "none"
|
|
|
|
|
|
|
41 |
|
42 |
+
# Add additional CSS for the new styles, being more specific
|
43 |
custom_css += """
|
44 |
/* Only override specific panels by ID */
|
45 |
#checkbox-panel,
|
46 |
#search-panel {
|
47 |
+
background-color: #27272A !important;
|
48 |
}
|
|
|
49 |
/* Only affect immediate children of these specific panels */
|
50 |
#checkbox-panel > *,
|
51 |
#search-panel > * {
|
52 |
+
background-color: transparent !important;
|
53 |
}
|
|
|
54 |
/* Target checkbox inputs specifically */
|
55 |
#checkbox-panel input[type="checkbox"],
|
56 |
#search-panel input[type="text"] {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
background-color: transparent !important;
|
58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
"""
|
60 |
|
61 |
def strip_timestamp(name):
|
|
|
254 |
norm = (value - min_val) / (max_val - min_val)
|
255 |
if norm < 0.5:
|
256 |
ratio = norm / 0.5
|
257 |
+
r = 255
|
258 |
+
g = int(255 * ratio)
|
|
|
259 |
b = 0
|
260 |
else:
|
261 |
ratio = (norm - 0.5) / 0.5
|
262 |
+
r = int(255 * (1 - ratio))
|
263 |
+
g = 255
|
|
|
264 |
b = 0
|
265 |
return f"#{r:02X}{g:02X}{b:02X}"
|
266 |
|
|
|
350 |
# Create our custom theme instance
|
351 |
custom_theme = CustomTheme()
|
352 |
|
353 |
+
with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme) as demo:
|
354 |
gr.Markdown("# 🏆 TD-EVAL Model Evaluation Leaderboard")
|
355 |
gr.HTML('<div class="subtitle">This leaderboard displays aggregated model performance across multiple evaluation metrics.</div>')
|
356 |
|
|
|
359 |
<script>
|
360 |
// Function to fix background colors
|
361 |
function fixBackgrounds() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
// Only fix specific panels by ID
|
363 |
var checkboxPanel = document.getElementById('checkbox-panel');
|
364 |
if (checkboxPanel) {
|
365 |
+
checkboxPanel.style.backgroundColor = '#27272A';
|
366 |
|
367 |
// Only make checkboxes and their direct containers transparent
|
368 |
var checkboxes = checkboxPanel.querySelectorAll('input[type="checkbox"]');
|
|
|
371 |
if (parent) parent.style.backgroundColor = 'transparent';
|
372 |
checkbox.style.backgroundColor = 'transparent';
|
373 |
|
374 |
+
// Find and style the associated label to be white
|
375 |
var label = checkbox.nextElementSibling;
|
376 |
if (label && label.tagName === 'LABEL') {
|
377 |
+
label.style.color = '#FFFFFF';
|
378 |
}
|
379 |
|
380 |
// Also find any span elements that might contain the label text
|
381 |
var spans = parent.querySelectorAll('span');
|
382 |
spans.forEach(function(span) {
|
383 |
+
span.style.color = '#FFFFFF';
|
384 |
});
|
385 |
|
386 |
// Find label elements in the parent container
|
387 |
var labels = parent.querySelectorAll('label');
|
388 |
labels.forEach(function(label) {
|
389 |
+
label.style.color = '#FFFFFF';
|
390 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
});
|
392 |
}
|
393 |
|
394 |
var searchPanel = document.getElementById('search-panel');
|
395 |
if (searchPanel) {
|
396 |
+
searchPanel.style.backgroundColor = '#27272A';
|
397 |
|
398 |
// Only make search input and its direct container transparent
|
399 |
var searchInput = searchPanel.querySelector('input[type="text"]');
|
400 |
if (searchInput) {
|
401 |
var parent = searchInput.parentElement;
|
402 |
if (parent) parent.style.backgroundColor = 'transparent';
|
403 |
+
searchInput.style.backgroundColor = 'transparent';
|
404 |
// Ensure the border is visible and matches text color
|
405 |
+
searchInput.style.border = '2px solid #FFFFFF';
|
406 |
+
searchInput.style.color = '#FFFFFF';
|
407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
}
|
410 |
|
|
|
436 |
search_input = gr.Textbox(
|
437 |
label="Search models",
|
438 |
placeholder="Type to filter…",
|
439 |
+
elem_classes="search-input"
|
|
|
440 |
)
|
441 |
|
442 |
hidden_sort_state = gr.State(value={"sort_by": "Average Score", "ascending": False})
|
|
|
519 |
|
520 |
demo.load(fn=update_leaderboard, inputs=[cb_mwoz, cb_tau_airline, cb_tau_retail, hidden_sort_state, search_input], outputs=leaderboard_display)
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
if __name__ == "__main__":
|
|
|
523 |
demo.launch()
|
styles.css
CHANGED
@@ -3,16 +3,16 @@
|
|
3 |
------------------------------------------------------------------ */
|
4 |
body {
|
5 |
font-family: Arial, sans-serif;
|
6 |
-
background-color: #
|
7 |
margin: 20px;
|
8 |
-
color: #
|
9 |
}
|
10 |
|
11 |
/* ------------------------------------------------------------------
|
12 |
Headings & Subtitle
|
13 |
------------------------------------------------------------------ */
|
14 |
h1, h2, h3, .subtitle, .variants_container {
|
15 |
-
color: #
|
16 |
display: flex;
|
17 |
text-align: center;
|
18 |
justify-content: center;
|
@@ -26,7 +26,7 @@ h1 {
|
|
26 |
|
27 |
.subtitle {
|
28 |
margin-bottom: 50px;
|
29 |
-
color: #
|
30 |
}
|
31 |
|
32 |
/* ------------------------------------------------------------------
|
@@ -40,20 +40,20 @@ h1 {
|
|
40 |
justify-content: center;
|
41 |
padding: 15px;
|
42 |
width: fit-content;
|
43 |
-
color: #
|
44 |
-
background-color:
|
45 |
}
|
46 |
|
47 |
.variants_title {
|
48 |
font-size: 20px;
|
49 |
font-weight: 500;
|
50 |
-
color: #
|
51 |
}
|
52 |
|
53 |
-
/* Force all descendants of the variants container to
|
54 |
.variants_container,
|
55 |
.variants_container * {
|
56 |
-
color: #
|
57 |
}
|
58 |
|
59 |
|
@@ -69,36 +69,40 @@ table {
|
|
69 |
}
|
70 |
|
71 |
table th {
|
72 |
-
background-color: #
|
73 |
-
color: #
|
74 |
font-weight: bold;
|
75 |
font-size: 18px;
|
76 |
border: 1px solid #CCCCCC;
|
77 |
}
|
78 |
|
79 |
table tr:not(:first-child):nth-child(odd) {
|
80 |
-
background-color: #
|
|
|
81 |
}
|
82 |
|
83 |
table tr:not(:first-child):nth-child(even) {
|
84 |
-
background-color: #
|
|
|
85 |
}
|
86 |
|
87 |
table tr:not(:first-child):nth-child(odd) td {
|
88 |
-
color: #
|
89 |
border: 1px solid #CCCCCC;
|
90 |
-
|
|
|
91 |
|
92 |
-
table tr:not(:first-child):nth-child(even) td {
|
93 |
-
color: #
|
94 |
border: 1px solid #CCCCCC;
|
95 |
-
|
|
|
96 |
|
97 |
|
98 |
th, td {
|
99 |
padding: 8px;
|
100 |
text-align: center;
|
101 |
-
border: 1px solid
|
102 |
}
|
103 |
|
104 |
/* ------------------------------------------------------------------
|
@@ -106,7 +110,7 @@ th, td {
|
|
106 |
------------------------------------------------------------------ */
|
107 |
button {
|
108 |
background-color: #c34700b6;
|
109 |
-
color: #
|
110 |
border: none;
|
111 |
padding: 8px 12px;
|
112 |
border-radius: 4px;
|
@@ -118,32 +122,7 @@ button {
|
|
118 |
button:hover {
|
119 |
background-color: #c34800;
|
120 |
transform: translateY(-2px);
|
121 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.
|
122 |
-
}
|
123 |
-
|
124 |
-
/* Style the checkbox to have an orange checkmark */
|
125 |
-
input[type="checkbox"] {
|
126 |
-
accent-color: #FFFFFF;
|
127 |
-
}
|
128 |
-
|
129 |
-
/* Create a custom appearance for checked checkboxes */
|
130 |
-
input[type="checkbox"]:checked {
|
131 |
-
position: relative;
|
132 |
-
appearance: none;
|
133 |
-
background-color: #FFFFFF;
|
134 |
-
border: 1px solid #CCCCCC;
|
135 |
-
border-radius: 3px;
|
136 |
-
}
|
137 |
-
|
138 |
-
input[type="checkbox"]:checked::before {
|
139 |
-
content: '✓';
|
140 |
-
position: absolute;
|
141 |
-
left: 50%;
|
142 |
-
top: 50%;
|
143 |
-
transform: translate(-50%, -50%);
|
144 |
-
color: #c34700; /* Orange color for the checkmark */
|
145 |
-
font-size: 14px;
|
146 |
-
font-weight: bold;
|
147 |
}
|
148 |
|
149 |
/* ------------------------------------------------------------------
|
@@ -153,14 +132,14 @@ input[type="checkbox"]:checked::before {
|
|
153 |
text-align: center;
|
154 |
margin: 10px 0;
|
155 |
padding: 5px;
|
156 |
-
background-color: #
|
157 |
border-radius: 5px;
|
158 |
font-size: 16px;
|
159 |
}
|
160 |
|
161 |
.sort-info,
|
162 |
.sort-info * {
|
163 |
-
color: #
|
164 |
}
|
165 |
|
166 |
|
@@ -169,7 +148,7 @@ input[type="checkbox"]:checked::before {
|
|
169 |
------------------------------------------------------------------ */
|
170 |
.gradio-container .checkbox-container {
|
171 |
margin-right: 10px;
|
172 |
-
background-color: #
|
173 |
padding: 8px;
|
174 |
border-radius: 5px;
|
175 |
}
|
@@ -178,8 +157,8 @@ input[type="checkbox"]:checked::before {
|
|
178 |
Search Input
|
179 |
------------------------------------------------------------------ */
|
180 |
input[type="text"] {
|
181 |
-
background-color: #
|
182 |
-
color: #
|
183 |
border: 1px solid #CCCCCC;
|
184 |
border-radius: 5px;
|
185 |
padding: 10px;
|
@@ -189,33 +168,19 @@ input[type="text"] {
|
|
189 |
}
|
190 |
|
191 |
input[type="text"]:focus {
|
192 |
-
border-color: #
|
193 |
outline: none;
|
194 |
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.
|
195 |
-
}
|
196 |
-
|
197 |
-
/* Target the textarea used for search input */
|
198 |
-
textarea[data-testid="textbox"],
|
199 |
-
.scroll-hide,
|
200 |
-
.svelte-173056l {
|
201 |
-
color: #000000 !important;
|
202 |
-
background-color: #FFFFFF !important;
|
203 |
-
}
|
204 |
-
|
205 |
-
/* Apply the style when typing and focused */
|
206 |
-
textarea[data-testid="textbox"]:focus {
|
207 |
-
color: #000000 !important;
|
208 |
-
background-color: #FFFFFF !important;
|
209 |
}
|
210 |
|
211 |
/* ------------------------------------------------------------------
|
212 |
No‐results Message
|
213 |
------------------------------------------------------------------ */
|
214 |
.no-results {
|
215 |
-
color: #
|
216 |
text-align: center;
|
217 |
padding: 30px;
|
218 |
-
background-color: #
|
219 |
border-radius: 10px;
|
220 |
font-size: 18px;
|
221 |
margin-top: 20px;
|
@@ -225,6 +190,10 @@ textarea[data-testid="textbox"]:focus {
|
|
225 |
Checkbox Panel and Search Panel - High Specificity Rules
|
226 |
------------------------------------------------------------------ */
|
227 |
|
|
|
|
|
|
|
|
|
228 |
|
229 |
/* Only target the specific checkbox and search panels */
|
230 |
#checkbox-panel,
|
@@ -232,7 +201,7 @@ div.checkbox-panel,
|
|
232 |
div[id="checkbox-panel"],
|
233 |
.gradio-container div[id="checkbox-panel"],
|
234 |
.gradio-container .checkbox-panel {
|
235 |
-
background-color: #
|
236 |
padding: 12px !important;
|
237 |
border-radius: 6px !important;
|
238 |
margin-bottom: 1rem !important;
|
@@ -243,27 +212,27 @@ div.search-panel,
|
|
243 |
div[id="search-panel"],
|
244 |
.gradio-container div[id="search-panel"],
|
245 |
.gradio-container .search-panel {
|
246 |
-
background-color: #
|
247 |
padding: 12px !important;
|
248 |
border-radius: 6px !important;
|
249 |
margin-bottom: 1rem !important;
|
250 |
}
|
251 |
|
252 |
-
/* Make inner components
|
253 |
#checkbox-panel *, .checkbox-panel * {
|
254 |
-
background-color:
|
255 |
}
|
256 |
|
257 |
#search-panel *, .search-panel * {
|
258 |
-
background-color:
|
259 |
}
|
260 |
|
261 |
/* Override other styles that might be affecting the color */
|
262 |
div[class*="block"] {
|
263 |
-
background-color:
|
264 |
}
|
265 |
|
266 |
-
/*
|
267 |
.checkbox-panel .form,
|
268 |
.checkbox-panel .block,
|
269 |
.checkbox-panel .container,
|
@@ -272,118 +241,42 @@ div[class*="block"] {
|
|
272 |
.search-panel .block,
|
273 |
.search-panel .container,
|
274 |
.search-panel input[type="text"] {
|
275 |
-
background-color:
|
276 |
-
}
|
277 |
-
|
278 |
-
/* Make the textbox border visible with the same color as the text */
|
279 |
-
.search-panel input[type="text"] {
|
280 |
-
border: 2px solid #000000 !important;
|
281 |
-
background-color: #FFFFFF !important;
|
282 |
-
color: #000000 !important;
|
283 |
}
|
284 |
|
285 |
-
/*
|
286 |
-
.search-panel input[type="text"],
|
287 |
-
.search-panel input[type="text"]::placeholder,
|
288 |
-
.search-panel textarea[data-testid="textbox"],
|
289 |
-
.search-panel textarea[data-testid="textbox"]::placeholder {
|
290 |
-
color: rgba(0,0,0,0.7) !important;
|
291 |
-
}
|
292 |
|
293 |
-
/*
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
color: #000000 !important;
|
298 |
}
|
299 |
|
300 |
-
/*
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
color: #
|
305 |
}
|
306 |
|
307 |
-
/*
|
308 |
-
#search-panel input[type="text"],
|
309 |
-
div[id="search-panel"] input[type="text"],
|
310 |
.search-panel input[type="text"],
|
311 |
-
|
312 |
-
|
313 |
-
.search-panel textarea {
|
314 |
-
color: #000000 !important;
|
315 |
}
|
316 |
|
317 |
-
/* Style the checkbox labels to ensure they have
|
318 |
.checkbox-panel label,
|
319 |
.checkbox-panel .label-wrap,
|
320 |
.checkbox-panel .label-wrap span {
|
321 |
-
color: #
|
322 |
}
|
323 |
|
324 |
/* Make the checkbox text fully opaque and sharp */
|
325 |
.checkbox-panel input[type="checkbox"] + label,
|
326 |
.checkbox-panel input[type="checkbox"] ~ label,
|
327 |
.checkbox-panel input[type="checkbox"] ~ div label {
|
328 |
-
color: #
|
329 |
opacity: 1 !important;
|
330 |
font-weight: normal;
|
331 |
-
}
|
332 |
-
|
333 |
-
/* Root level variable override */
|
334 |
-
:root {
|
335 |
-
--block-background-fill: #FFFFFF !important;
|
336 |
-
--panel-background-fill: #FFFFFF !important;
|
337 |
-
}
|
338 |
-
|
339 |
-
/* Target the specific Gradio label element */
|
340 |
-
span[data-testid="block-info"],
|
341 |
-
.svelte-1gfkn6j,
|
342 |
-
span.svelte-1gfkn6j,
|
343 |
-
[data-testid="block-info"] {
|
344 |
-
color: #000000 !important;
|
345 |
-
}
|
346 |
-
|
347 |
-
/* Force all span elements in the search panel to be black */
|
348 |
-
.search-panel span,
|
349 |
-
#search-panel span,
|
350 |
-
div[id="search-panel"] span {
|
351 |
-
color: #000000 !important;
|
352 |
-
}
|
353 |
-
|
354 |
-
/* Target the specific search input by ID */
|
355 |
-
#search-input,
|
356 |
-
#search-input label,
|
357 |
-
#search-input span,
|
358 |
-
[id="search-input"] + div label,
|
359 |
-
[id="search-input"] ~ div span,
|
360 |
-
[id="search-input"] + label {
|
361 |
-
color: #000000 !important;
|
362 |
-
}
|
363 |
-
|
364 |
-
/* Ultra-specific selector targeting the label span */
|
365 |
-
div[id="search-panel"] span[data-testid="block-info"] {
|
366 |
-
color: #000000 !important;
|
367 |
-
font-weight: bold !important;
|
368 |
-
}
|
369 |
-
|
370 |
-
/* Fix for block labels in gradio */
|
371 |
-
span[data-testid="block-info"] {
|
372 |
-
color: #000000 !important;
|
373 |
-
background-color: #FFFFFF !important;
|
374 |
-
}
|
375 |
-
|
376 |
-
/* Additional style to ensure text color in textareas and inputs is black */
|
377 |
-
textarea, input, textarea[data-testid="textbox"] {
|
378 |
-
color: #000000 !important;
|
379 |
-
}
|
380 |
-
|
381 |
-
/* Force black text color for search textbox */
|
382 |
-
.search-panel textarea,
|
383 |
-
textarea.scroll-hide,
|
384 |
-
textarea.svelte-173056l,
|
385 |
-
textarea[data-testid="textbox"] {
|
386 |
-
color: #000000 !important;
|
387 |
-
caret-color: #000000 !important;
|
388 |
-
background-color: #FFFFFF !important;
|
389 |
}
|
|
|
3 |
------------------------------------------------------------------ */
|
4 |
body {
|
5 |
font-family: Arial, sans-serif;
|
6 |
+
background-color: #000000;
|
7 |
margin: 20px;
|
8 |
+
color: #FFFFFF;
|
9 |
}
|
10 |
|
11 |
/* ------------------------------------------------------------------
|
12 |
Headings & Subtitle
|
13 |
------------------------------------------------------------------ */
|
14 |
h1, h2, h3, .subtitle, .variants_container {
|
15 |
+
color: #CCCCCC;
|
16 |
display: flex;
|
17 |
text-align: center;
|
18 |
justify-content: center;
|
|
|
26 |
|
27 |
.subtitle {
|
28 |
margin-bottom: 50px;
|
29 |
+
color: #CCCCCC !important;
|
30 |
}
|
31 |
|
32 |
/* ------------------------------------------------------------------
|
|
|
40 |
justify-content: center;
|
41 |
padding: 15px;
|
42 |
width: fit-content;
|
43 |
+
color: #CCCCCC!important;
|
44 |
+
background-color:transparent;
|
45 |
}
|
46 |
|
47 |
.variants_title {
|
48 |
font-size: 20px;
|
49 |
font-weight: 500;
|
50 |
+
color: #CCCCCC !important;
|
51 |
}
|
52 |
|
53 |
+
/* Force all descendants of the variants container to be dark */
|
54 |
.variants_container,
|
55 |
.variants_container * {
|
56 |
+
color: #CCCCCC!important;
|
57 |
}
|
58 |
|
59 |
|
|
|
69 |
}
|
70 |
|
71 |
table th {
|
72 |
+
background-color: #27272A;
|
73 |
+
color: #FFFFFF;
|
74 |
font-weight: bold;
|
75 |
font-size: 18px;
|
76 |
border: 1px solid #CCCCCC;
|
77 |
}
|
78 |
|
79 |
table tr:not(:first-child):nth-child(odd) {
|
80 |
+
background-color: #27272aef;
|
81 |
+
|
82 |
}
|
83 |
|
84 |
table tr:not(:first-child):nth-child(even) {
|
85 |
+
background-color: #27272add;
|
86 |
+
|
87 |
}
|
88 |
|
89 |
table tr:not(:first-child):nth-child(odd) td {
|
90 |
+
color: #ffffff;
|
91 |
border: 1px solid #CCCCCC;
|
92 |
+
|
93 |
+
}
|
94 |
|
95 |
+
table tr:not(:first-child):nth-child(even) td {
|
96 |
+
color: #ffffff;
|
97 |
border: 1px solid #CCCCCC;
|
98 |
+
|
99 |
+
}
|
100 |
|
101 |
|
102 |
th, td {
|
103 |
padding: 8px;
|
104 |
text-align: center;
|
105 |
+
border: 1px solid white;
|
106 |
}
|
107 |
|
108 |
/* ------------------------------------------------------------------
|
|
|
110 |
------------------------------------------------------------------ */
|
111 |
button {
|
112 |
background-color: #c34700b6;
|
113 |
+
color: #ffffff;
|
114 |
border: none;
|
115 |
padding: 8px 12px;
|
116 |
border-radius: 4px;
|
|
|
122 |
button:hover {
|
123 |
background-color: #c34800;
|
124 |
transform: translateY(-2px);
|
125 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
|
128 |
/* ------------------------------------------------------------------
|
|
|
132 |
text-align: center;
|
133 |
margin: 10px 0;
|
134 |
padding: 5px;
|
135 |
+
background-color: #27272A;
|
136 |
border-radius: 5px;
|
137 |
font-size: 16px;
|
138 |
}
|
139 |
|
140 |
.sort-info,
|
141 |
.sort-info * {
|
142 |
+
color: #CCCCCC !important;
|
143 |
}
|
144 |
|
145 |
|
|
|
148 |
------------------------------------------------------------------ */
|
149 |
.gradio-container .checkbox-container {
|
150 |
margin-right: 10px;
|
151 |
+
background-color: #27272A;
|
152 |
padding: 8px;
|
153 |
border-radius: 5px;
|
154 |
}
|
|
|
157 |
Search Input
|
158 |
------------------------------------------------------------------ */
|
159 |
input[type="text"] {
|
160 |
+
background-color: #27272A;
|
161 |
+
color: #FFFFFF;
|
162 |
border: 1px solid #CCCCCC;
|
163 |
border-radius: 5px;
|
164 |
padding: 10px;
|
|
|
168 |
}
|
169 |
|
170 |
input[type="text"]:focus {
|
171 |
+
border-color: #FFFFFF;
|
172 |
outline: none;
|
173 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
|
176 |
/* ------------------------------------------------------------------
|
177 |
No‐results Message
|
178 |
------------------------------------------------------------------ */
|
179 |
.no-results {
|
180 |
+
color: #FFFFFF;
|
181 |
text-align: center;
|
182 |
padding: 30px;
|
183 |
+
background-color: #27272A;
|
184 |
border-radius: 10px;
|
185 |
font-size: 18px;
|
186 |
margin-top: 20px;
|
|
|
190 |
Checkbox Panel and Search Panel - High Specificity Rules
|
191 |
------------------------------------------------------------------ */
|
192 |
|
193 |
+
/* Reset the global styles to ensure we're only affecting what we want */
|
194 |
+
html body .gradio-container {
|
195 |
+
/* Default background stays as is */
|
196 |
+
}
|
197 |
|
198 |
/* Only target the specific checkbox and search panels */
|
199 |
#checkbox-panel,
|
|
|
201 |
div[id="checkbox-panel"],
|
202 |
.gradio-container div[id="checkbox-panel"],
|
203 |
.gradio-container .checkbox-panel {
|
204 |
+
background-color: #27272A !important;
|
205 |
padding: 12px !important;
|
206 |
border-radius: 6px !important;
|
207 |
margin-bottom: 1rem !important;
|
|
|
212 |
div[id="search-panel"],
|
213 |
.gradio-container div[id="search-panel"],
|
214 |
.gradio-container .search-panel {
|
215 |
+
background-color: #27272A !important;
|
216 |
padding: 12px !important;
|
217 |
border-radius: 6px !important;
|
218 |
margin-bottom: 1rem !important;
|
219 |
}
|
220 |
|
221 |
+
/* Make inner components transparent to let background show through */
|
222 |
#checkbox-panel *, .checkbox-panel * {
|
223 |
+
background-color: transparent !important;
|
224 |
}
|
225 |
|
226 |
#search-panel *, .search-panel * {
|
227 |
+
background-color: transparent !important;
|
228 |
}
|
229 |
|
230 |
/* Override other styles that might be affecting the color */
|
231 |
div[class*="block"] {
|
232 |
+
background-color: initial; /* Reset to default */
|
233 |
}
|
234 |
|
235 |
+
/* Only make transparent what we need to be transparent */
|
236 |
.checkbox-panel .form,
|
237 |
.checkbox-panel .block,
|
238 |
.checkbox-panel .container,
|
|
|
241 |
.search-panel .block,
|
242 |
.search-panel .container,
|
243 |
.search-panel input[type="text"] {
|
244 |
+
background-color: transparent !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
|
247 |
+
/* Remove overly broad selectors affecting too many elements */
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
+
/* Root level variable override */
|
250 |
+
:root {
|
251 |
+
--block-background-fill: transparent !important;
|
252 |
+
--panel-background-fill: green !important;
|
|
|
253 |
}
|
254 |
|
255 |
+
/* Make the textbox border visible with the same color as the text */
|
256 |
+
.search-panel input[type="text"] {
|
257 |
+
border: 2px solid #FFFFFF !important;
|
258 |
+
background-color: transparent !important;
|
259 |
+
color: #FFFFFF !important;
|
260 |
}
|
261 |
|
262 |
+
/* Ensure input text and placeholder have consistent styling */
|
|
|
|
|
263 |
.search-panel input[type="text"],
|
264 |
+
.search-panel input[type="text"]::placeholder {
|
265 |
+
color: rgba(255,255,255,0.9) !important;
|
|
|
|
|
266 |
}
|
267 |
|
268 |
+
/* Style the checkbox labels to ensure they have white text */
|
269 |
.checkbox-panel label,
|
270 |
.checkbox-panel .label-wrap,
|
271 |
.checkbox-panel .label-wrap span {
|
272 |
+
color: #FFFFFF !important;
|
273 |
}
|
274 |
|
275 |
/* Make the checkbox text fully opaque and sharp */
|
276 |
.checkbox-panel input[type="checkbox"] + label,
|
277 |
.checkbox-panel input[type="checkbox"] ~ label,
|
278 |
.checkbox-panel input[type="checkbox"] ~ div label {
|
279 |
+
color: #FFFFFF !important;
|
280 |
opacity: 1 !important;
|
281 |
font-weight: normal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|