Spaces:
Sleeping
Sleeping
changes to font color
Browse files- app.py +13 -12
- styles.css +3 -3
app.py
CHANGED
@@ -17,21 +17,21 @@ except UnicodeDecodeError:
|
|
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__(
|
33 |
primary_hue=colors.red,
|
34 |
-
secondary_hue=colors.
|
35 |
neutral_hue=colors.gray,
|
36 |
text_size=gr.themes.sizes.text_lg
|
37 |
)
|
@@ -40,7 +40,7 @@ class CustomTheme(gr.themes.Base):
|
|
40 |
self.block_border_width = "0px"
|
41 |
self.block_shadow = "none"
|
42 |
# Set color variables for all panel backgrounds
|
43 |
-
self.background_fill_secondary = "
|
44 |
|
45 |
# Add additional CSS for the new styles
|
46 |
custom_css += """
|
@@ -49,6 +49,7 @@ custom_css += """
|
|
49 |
--block-background-fill: transparent !important;
|
50 |
--background-fill-primary: transparent !important;
|
51 |
--background-fill-secondary: transparent !important;
|
|
|
52 |
}
|
53 |
|
54 |
/* Target Gradio's internal structure directly */
|
@@ -61,7 +62,7 @@ custom_css += """
|
|
61 |
[id="search-panel"],
|
62 |
[class*="block"] [class*="checkbox-panel"],
|
63 |
[class*="block"] [class*="search-panel"] {
|
64 |
-
background-color:
|
65 |
}
|
66 |
|
67 |
/* Force all child elements to be transparent */
|
@@ -377,7 +378,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
377 |
// Fix checkbox panel
|
378 |
var checkboxPanels = document.querySelectorAll('.checkbox-panel');
|
379 |
for (var i = 0; i < checkboxPanels.length; i++) {
|
380 |
-
checkboxPanels[i].style.backgroundColor = '
|
381 |
|
382 |
// Find ALL child elements and make their backgrounds transparent
|
383 |
var children = checkboxPanels[i].querySelectorAll('*');
|
@@ -389,7 +390,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
389 |
// Fix search panel
|
390 |
var searchPanels = document.querySelectorAll('.search-panel');
|
391 |
for (var i = 0; i < searchPanels.length; i++) {
|
392 |
-
searchPanels[i].style.backgroundColor = '
|
393 |
|
394 |
// Find ALL child elements and make their backgrounds transparent
|
395 |
var children = searchPanels[i].querySelectorAll('*');
|
@@ -402,7 +403,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
402 |
var blocks = document.querySelectorAll('.block');
|
403 |
blocks.forEach(function(block) {
|
404 |
if (block.querySelector('.checkbox-panel') || block.classList.contains('checkbox-panel')) {
|
405 |
-
block.style.backgroundColor = '
|
406 |
|
407 |
// Make all direct children transparent
|
408 |
var children = block.children;
|
@@ -413,7 +414,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
413 |
}
|
414 |
}
|
415 |
if (block.querySelector('.search-panel') || block.classList.contains('search-panel')) {
|
416 |
-
block.style.backgroundColor = '
|
417 |
|
418 |
// Make all direct children transparent
|
419 |
var children = block.children;
|
@@ -448,7 +449,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
448 |
''')
|
449 |
|
450 |
# Add a direct HTML wrapper with inline style for the checkboxes
|
451 |
-
gr.HTML('<div style="background-color:
|
452 |
|
453 |
with gr.Row(elem_classes="checkbox-panel", elem_id="checkbox-panel"):
|
454 |
cb_mwoz = gr.Checkbox(label="mwoz", value=True)
|
@@ -458,7 +459,7 @@ with gr.Blocks(css=custom_css, title="TD-EVAL Leaderboard", theme=custom_theme)
|
|
458 |
gr.HTML('</div>')
|
459 |
|
460 |
# Add a direct HTML wrapper with inline style for the search
|
461 |
-
gr.HTML('<div style="background-color:
|
462 |
|
463 |
with gr.Row(elem_classes="search-panel", elem_id="search-panel"):
|
464 |
search_input = gr.Textbox(
|
|
|
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__(
|
33 |
primary_hue=colors.red,
|
34 |
+
secondary_hue=colors.gray,
|
35 |
neutral_hue=colors.gray,
|
36 |
text_size=gr.themes.sizes.text_lg
|
37 |
)
|
|
|
40 |
self.block_border_width = "0px"
|
41 |
self.block_shadow = "none"
|
42 |
# Set color variables for all panel backgrounds
|
43 |
+
self.background_fill_secondary = "#27272A" # Used for panels
|
44 |
|
45 |
# Add additional CSS for the new styles
|
46 |
custom_css += """
|
|
|
49 |
--block-background-fill: transparent !important;
|
50 |
--background-fill-primary: transparent !important;
|
51 |
--background-fill-secondary: transparent !important;
|
52 |
+
--panel-background-fill: #27272A !important;
|
53 |
}
|
54 |
|
55 |
/* Target Gradio's internal structure directly */
|
|
|
62 |
[id="search-panel"],
|
63 |
[class*="block"] [class*="checkbox-panel"],
|
64 |
[class*="block"] [class*="search-panel"] {
|
65 |
+
background-color: #27272A !important;
|
66 |
}
|
67 |
|
68 |
/* Force all child elements to be transparent */
|
|
|
378 |
// Fix checkbox panel
|
379 |
var checkboxPanels = document.querySelectorAll('.checkbox-panel');
|
380 |
for (var i = 0; i < checkboxPanels.length; i++) {
|
381 |
+
checkboxPanels[i].style.backgroundColor = '#27272A';
|
382 |
|
383 |
// Find ALL child elements and make their backgrounds transparent
|
384 |
var children = checkboxPanels[i].querySelectorAll('*');
|
|
|
390 |
// Fix search panel
|
391 |
var searchPanels = document.querySelectorAll('.search-panel');
|
392 |
for (var i = 0; i < searchPanels.length; i++) {
|
393 |
+
searchPanels[i].style.backgroundColor = '#27272A';
|
394 |
|
395 |
// Find ALL child elements and make their backgrounds transparent
|
396 |
var children = searchPanels[i].querySelectorAll('*');
|
|
|
403 |
var blocks = document.querySelectorAll('.block');
|
404 |
blocks.forEach(function(block) {
|
405 |
if (block.querySelector('.checkbox-panel') || block.classList.contains('checkbox-panel')) {
|
406 |
+
block.style.backgroundColor = '#27272A';
|
407 |
|
408 |
// Make all direct children transparent
|
409 |
var children = block.children;
|
|
|
414 |
}
|
415 |
}
|
416 |
if (block.querySelector('.search-panel') || block.classList.contains('search-panel')) {
|
417 |
+
block.style.backgroundColor = '#27272A';
|
418 |
|
419 |
// Make all direct children transparent
|
420 |
var children = block.children;
|
|
|
449 |
''')
|
450 |
|
451 |
# Add a direct HTML wrapper with inline style for the checkboxes
|
452 |
+
gr.HTML('<div style="background-color: #27272A; padding: 12px; border-radius: 6px; margin-bottom: 1rem;">')
|
453 |
|
454 |
with gr.Row(elem_classes="checkbox-panel", elem_id="checkbox-panel"):
|
455 |
cb_mwoz = gr.Checkbox(label="mwoz", value=True)
|
|
|
459 |
gr.HTML('</div>')
|
460 |
|
461 |
# Add a direct HTML wrapper with inline style for the search
|
462 |
+
gr.HTML('<div style="background-color: #27272A; padding: 12px; border-radius: 6px; margin-bottom: 1rem;">')
|
463 |
|
464 |
with gr.Row(elem_classes="search-panel", elem_id="search-panel"):
|
465 |
search_input = gr.Textbox(
|
styles.css
CHANGED
@@ -205,7 +205,7 @@ div.gradio-container [class*="row"] div.checkbox-panel,
|
|
205 |
div.checkbox-panel,
|
206 |
.checkbox-panel,
|
207 |
#checkbox-panel {
|
208 |
-
background-color:
|
209 |
padding: 12px !important;
|
210 |
border-radius: 6px !important;
|
211 |
margin-bottom: 1rem !important;
|
@@ -220,7 +220,7 @@ div.gradio-container [class*="row"] div.search-panel,
|
|
220 |
div.search-panel,
|
221 |
.search-panel,
|
222 |
#search-panel {
|
223 |
-
background-color:
|
224 |
padding: 12px !important;
|
225 |
border-radius: 6px !important;
|
226 |
margin-bottom: 1rem !important;
|
@@ -233,7 +233,7 @@ div[class*="block"].checkbox-panel,
|
|
233 |
div[class*="block"] div.search-panel,
|
234 |
div.search-panel[class*="block"],
|
235 |
div[class*="block"].search-panel {
|
236 |
-
background-color:
|
237 |
}
|
238 |
|
239 |
/* Target the gradio block wrapper directly */
|
|
|
205 |
div.checkbox-panel,
|
206 |
.checkbox-panel,
|
207 |
#checkbox-panel {
|
208 |
+
background-color: #27272A !important;
|
209 |
padding: 12px !important;
|
210 |
border-radius: 6px !important;
|
211 |
margin-bottom: 1rem !important;
|
|
|
220 |
div.search-panel,
|
221 |
.search-panel,
|
222 |
#search-panel {
|
223 |
+
background-color: #27272A !important;
|
224 |
padding: 12px !important;
|
225 |
border-radius: 6px !important;
|
226 |
margin-bottom: 1rem !important;
|
|
|
233 |
div[class*="block"] div.search-panel,
|
234 |
div.search-panel[class*="block"],
|
235 |
div[class*="block"].search-panel {
|
236 |
+
background-color: #27272A !important;
|
237 |
}
|
238 |
|
239 |
/* Target the gradio block wrapper directly */
|