style theme
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ import plotly.express as px
|
|
| 12 |
import plotly.graph_objects as go
|
| 13 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 14 |
import numpy as np
|
| 15 |
-
from gradio.themes.utils import fonts
|
| 16 |
|
| 17 |
from src.about import (
|
| 18 |
CITATION_BUTTON_LABEL,
|
|
@@ -71,6 +71,9 @@ except Exception as e:
|
|
| 71 |
LEADERBOARD_DF = pd.DataFrame()
|
| 72 |
|
| 73 |
custom_theme = gr.themes.Default(
|
|
|
|
|
|
|
|
|
|
| 74 |
font=(fonts.GoogleFont("Inter"), "sans-serif")
|
| 75 |
).set(
|
| 76 |
# font_size="16px",
|
|
@@ -78,57 +81,58 @@ custom_theme = gr.themes.Default(
|
|
| 78 |
body_background_fill_dark="#0f0f10",
|
| 79 |
body_text_color="#f4f4f5",
|
| 80 |
body_text_color_subdued="#a1a1aa",
|
| 81 |
-
block_background_fill="#
|
| 82 |
-
block_border_color="#
|
| 83 |
block_shadow="none",
|
| 84 |
-
|
|
|
|
| 85 |
button_primary_text_color="#f4f4f5",
|
| 86 |
-
button_primary_border_color="#
|
| 87 |
button_secondary_background_fill="#f4f4f5",
|
| 88 |
button_secondary_text_color="#0f0f10",
|
| 89 |
button_secondary_border_color="#f4f4f5",
|
| 90 |
-
input_background_fill="#
|
| 91 |
-
input_border_color="#
|
| 92 |
input_placeholder_color="#71717a",
|
| 93 |
-
table_border_color="#
|
| 94 |
-
table_even_background_fill="#
|
| 95 |
-
table_odd_background_fill="#
|
| 96 |
table_text_color="#f4f4f5",
|
| 97 |
link_text_color="#ffffff",
|
| 98 |
-
border_color_primary="#
|
| 99 |
-
background_fill_secondary="#
|
| 100 |
color_accent="#f4f4f5",
|
| 101 |
-
border_color_accent="#
|
| 102 |
-
button_primary_background_fill_hover="#
|
| 103 |
block_title_text_color="#f4f4f5",
|
| 104 |
accordion_text_color="#f4f4f5",
|
| 105 |
-
panel_background_fill="#
|
| 106 |
-
panel_border_color="#
|
| 107 |
# Explicitly setting primary/secondary/accent colors/borders
|
| 108 |
background_fill_primary="#0f0f10",
|
| 109 |
background_fill_primary_dark="#0f0f10",
|
| 110 |
-
background_fill_secondary_dark="#
|
| 111 |
-
border_color_primary_dark="#
|
| 112 |
-
border_color_accent_dark="#
|
| 113 |
-
border_color_accent_subdued="#
|
| 114 |
-
border_color_accent_subdued_dark="#
|
| 115 |
color_accent_soft="#a1a1aa",
|
| 116 |
color_accent_soft_dark="#a1a1aa",
|
| 117 |
# Explicitly setting input hover/focus states
|
| 118 |
-
input_background_fill_dark="#
|
| 119 |
-
input_background_fill_focus="#
|
| 120 |
-
input_background_fill_focus_dark="#
|
| 121 |
-
input_background_fill_hover="#
|
| 122 |
-
input_background_fill_hover_dark="#
|
| 123 |
-
input_border_color_dark="#
|
| 124 |
input_border_color_focus="#f4f4f5",
|
| 125 |
input_border_color_focus_dark="#f4f4f5",
|
| 126 |
-
input_border_color_hover="#
|
| 127 |
-
input_border_color_hover_dark="#
|
| 128 |
input_placeholder_color_dark="#71717a",
|
| 129 |
# Explicitly set dark variants for table backgrounds
|
| 130 |
-
table_even_background_fill_dark="#
|
| 131 |
-
table_odd_background_fill_dark="#
|
| 132 |
# Explicitly set dark text variants
|
| 133 |
body_text_color_dark="#f4f4f5",
|
| 134 |
body_text_color_subdued_dark="#a1a1aa",
|
|
@@ -136,10 +140,10 @@ custom_theme = gr.themes.Default(
|
|
| 136 |
accordion_text_color_dark="#f4f4f5",
|
| 137 |
table_text_color_dark="#f4f4f5",
|
| 138 |
# Explicitly set dark panel/block variants
|
| 139 |
-
panel_background_fill_dark="#
|
| 140 |
-
panel_border_color_dark="#
|
| 141 |
-
block_background_fill_dark="#
|
| 142 |
-
block_border_color_dark="#
|
| 143 |
)
|
| 144 |
|
| 145 |
# Define the update_column_choices function before initializing the leaderboard components
|
|
|
|
| 12 |
import plotly.graph_objects as go
|
| 13 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 14 |
import numpy as np
|
| 15 |
+
from gradio.themes.utils import fonts, colors
|
| 16 |
|
| 17 |
from src.about import (
|
| 18 |
CITATION_BUTTON_LABEL,
|
|
|
|
| 71 |
LEADERBOARD_DF = pd.DataFrame()
|
| 72 |
|
| 73 |
custom_theme = gr.themes.Default(
|
| 74 |
+
primary_hue=colors.slate,
|
| 75 |
+
secondary_hue=colors.slate,
|
| 76 |
+
neutral_hue=colors.neutral,
|
| 77 |
font=(fonts.GoogleFont("Inter"), "sans-serif")
|
| 78 |
).set(
|
| 79 |
# font_size="16px",
|
|
|
|
| 81 |
body_background_fill_dark="#0f0f10",
|
| 82 |
body_text_color="#f4f4f5",
|
| 83 |
body_text_color_subdued="#a1a1aa",
|
| 84 |
+
block_background_fill="#1e1e1e", # Cooler Grey
|
| 85 |
+
block_border_color="#333333", # Cooler Grey
|
| 86 |
block_shadow="none",
|
| 87 |
+
# Swapped primary and secondary button styles
|
| 88 |
+
button_primary_background_fill="#333333", # Cooler Grey
|
| 89 |
button_primary_text_color="#f4f4f5",
|
| 90 |
+
button_primary_border_color="#333333", # Cooler Grey
|
| 91 |
button_secondary_background_fill="#f4f4f5",
|
| 92 |
button_secondary_text_color="#0f0f10",
|
| 93 |
button_secondary_border_color="#f4f4f5",
|
| 94 |
+
input_background_fill="#1e1e1e", # Cooler Grey
|
| 95 |
+
input_border_color="#333333", # Cooler Grey
|
| 96 |
input_placeholder_color="#71717a",
|
| 97 |
+
table_border_color="#333333", # Cooler Grey
|
| 98 |
+
table_even_background_fill="#2d2d2d", # Cooler Grey (Slightly lighter)
|
| 99 |
+
table_odd_background_fill="#1e1e1e", # Cooler Grey
|
| 100 |
table_text_color="#f4f4f5",
|
| 101 |
link_text_color="#ffffff",
|
| 102 |
+
border_color_primary="#333333", # Cooler Grey
|
| 103 |
+
background_fill_secondary="#333333", # Cooler Grey
|
| 104 |
color_accent="#f4f4f5",
|
| 105 |
+
border_color_accent="#333333", # Cooler Grey
|
| 106 |
+
button_primary_background_fill_hover="#424242", # Cooler Grey
|
| 107 |
block_title_text_color="#f4f4f5",
|
| 108 |
accordion_text_color="#f4f4f5",
|
| 109 |
+
panel_background_fill="#1e1e1e", # Cooler Grey
|
| 110 |
+
panel_border_color="#333333", # Cooler Grey
|
| 111 |
# Explicitly setting primary/secondary/accent colors/borders
|
| 112 |
background_fill_primary="#0f0f10",
|
| 113 |
background_fill_primary_dark="#0f0f10",
|
| 114 |
+
background_fill_secondary_dark="#333333", # Cooler Grey
|
| 115 |
+
border_color_primary_dark="#333333", # Cooler Grey
|
| 116 |
+
border_color_accent_dark="#333333", # Cooler Grey
|
| 117 |
+
border_color_accent_subdued="#424242", # Cooler Grey
|
| 118 |
+
border_color_accent_subdued_dark="#424242", # Cooler Grey
|
| 119 |
color_accent_soft="#a1a1aa",
|
| 120 |
color_accent_soft_dark="#a1a1aa",
|
| 121 |
# Explicitly setting input hover/focus states
|
| 122 |
+
input_background_fill_dark="#1e1e1e", # Cooler Grey
|
| 123 |
+
input_background_fill_focus="#424242", # Cooler Grey
|
| 124 |
+
input_background_fill_focus_dark="#424242",# Cooler Grey
|
| 125 |
+
input_background_fill_hover="#2d2d2d", # Cooler Grey
|
| 126 |
+
input_background_fill_hover_dark="#2d2d2d", # Cooler Grey
|
| 127 |
+
input_border_color_dark="#333333", # Cooler Grey
|
| 128 |
input_border_color_focus="#f4f4f5",
|
| 129 |
input_border_color_focus_dark="#f4f4f5",
|
| 130 |
+
input_border_color_hover="#424242", # Cooler Grey
|
| 131 |
+
input_border_color_hover_dark="#424242", # Cooler Grey
|
| 132 |
input_placeholder_color_dark="#71717a",
|
| 133 |
# Explicitly set dark variants for table backgrounds
|
| 134 |
+
table_even_background_fill_dark="#2d2d2d", # Cooler Grey
|
| 135 |
+
table_odd_background_fill_dark="#1e1e1e", # Cooler Grey
|
| 136 |
# Explicitly set dark text variants
|
| 137 |
body_text_color_dark="#f4f4f5",
|
| 138 |
body_text_color_subdued_dark="#a1a1aa",
|
|
|
|
| 140 |
accordion_text_color_dark="#f4f4f5",
|
| 141 |
table_text_color_dark="#f4f4f5",
|
| 142 |
# Explicitly set dark panel/block variants
|
| 143 |
+
panel_background_fill_dark="#1e1e1e", # Cooler Grey
|
| 144 |
+
panel_border_color_dark="#333333", # Cooler Grey
|
| 145 |
+
block_background_fill_dark="#1e1e1e", # Cooler Grey
|
| 146 |
+
block_border_color_dark="#333333", # Cooler Grey
|
| 147 |
)
|
| 148 |
|
| 149 |
# Define the update_column_choices function before initializing the leaderboard components
|