ZhouChuYue
commited on
Commit
·
6ec0521
1
Parent(s):
3728ea4
feat: switch L3 Generator to light theme and update text colors
Browse files
app.py
CHANGED
|
@@ -175,172 +175,191 @@ custom_css = """
|
|
| 175 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
|
| 176 |
|
| 177 |
:root {
|
| 178 |
-
--
|
| 179 |
-
--
|
| 180 |
-
--
|
| 181 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
body {
|
| 185 |
-
background-color:
|
| 186 |
-
color: var(--text
|
| 187 |
}
|
| 188 |
|
| 189 |
.gradio-container {
|
| 190 |
font-family: 'Inter', sans-serif !important;
|
| 191 |
-
background:
|
| 192 |
max-width: 1200px !important;
|
| 193 |
}
|
| 194 |
|
| 195 |
-
|
| 196 |
/* Title & Header */
|
| 197 |
.main-title {
|
| 198 |
font-family: 'Inter', sans-serif !important;
|
| 199 |
font-weight: 800 !important;
|
| 200 |
-
font-size:
|
| 201 |
-
background: linear-gradient(
|
| 202 |
-webkit-background-clip: text !important;
|
| 203 |
-webkit-text-fill-color: transparent !important;
|
| 204 |
text-align: center !important;
|
| 205 |
-
margin-bottom: 0.
|
| 206 |
-
/* Reset color for gradient text */
|
| 207 |
-
color: transparent !important;
|
| 208 |
}
|
| 209 |
|
| 210 |
.subtitle {
|
| 211 |
text-align: center !important;
|
| 212 |
-
color: var(--
|
| 213 |
-
font-size: 1.
|
| 214 |
-
margin-bottom:
|
| 215 |
-
font-weight:
|
| 216 |
}
|
| 217 |
|
| 218 |
/* Panels */
|
| 219 |
.glass-panel {
|
| 220 |
-
background: var(--
|
| 221 |
-
|
| 222 |
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 223 |
border-radius: 16px !important;
|
| 224 |
padding: 24px !important;
|
| 225 |
-
box-shadow: 0
|
| 226 |
}
|
| 227 |
|
| 228 |
-
/* Labels
|
| 229 |
.block > label > span,
|
| 230 |
.form > label > span,
|
| 231 |
.gr-form > label > span,
|
| 232 |
.label-wrap > span {
|
| 233 |
-
color:
|
| 234 |
-
font-weight:
|
| 235 |
font-size: 1rem !important;
|
| 236 |
margin-bottom: 0.5rem !important;
|
| 237 |
-
text-shadow:
|
| 238 |
-
background-color: transparent !important;
|
| 239 |
-
padding: 0 !important;
|
| 240 |
}
|
| 241 |
|
| 242 |
-
/* Radio group title
|
| 243 |
fieldset legend, fieldset legend span,
|
| 244 |
.gr-radio > label, .gr-radio > label span,
|
| 245 |
.gradio-container .label-wrap, .gradio-container .label-wrap span {
|
| 246 |
-
color:
|
| 247 |
-
font-weight:
|
| 248 |
-
text-shadow:
|
| 249 |
}
|
| 250 |
|
| 251 |
/* Info Text (Description) */
|
| 252 |
span.description, .description {
|
| 253 |
-
color:
|
| 254 |
-
font-weight:
|
| 255 |
-
text-shadow:
|
| 256 |
opacity: 1 !important;
|
| 257 |
}
|
| 258 |
|
| 259 |
-
/*
|
| 260 |
fieldset label span {
|
| 261 |
margin-bottom: 0 !important;
|
| 262 |
text-shadow: none !important;
|
| 263 |
-
font-weight:
|
| 264 |
-
color:
|
| 265 |
display: flex !important;
|
| 266 |
align-items: center !important;
|
| 267 |
}
|
| 268 |
|
| 269 |
-
/* Selected radio button text should be white */
|
| 270 |
fieldset label.selected span {
|
| 271 |
color: #ffffff !important;
|
| 272 |
}
|
| 273 |
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
.gr-input, textarea, input, .gr-box, .gr-check-radio, .gr-dropdown {
|
| 276 |
font-family: 'JetBrains Mono', monospace !important;
|
| 277 |
-
background-color:
|
| 278 |
-
border: 1px solid
|
| 279 |
-
color:
|
| 280 |
box-shadow: none !important;
|
| 281 |
}
|
| 282 |
|
| 283 |
-
/* Focus state */
|
| 284 |
.gr-input:focus, textarea:focus, input:focus {
|
| 285 |
-
border-color:
|
| 286 |
-
|
| 287 |
}
|
| 288 |
|
| 289 |
-
/*
|
| 290 |
-
.gradio-container .block, .gradio-container .panel {
|
| 291 |
-
background-color: transparent !important;
|
| 292 |
-
border: none !important;
|
| 293 |
-
}
|
| 294 |
-
|
| 295 |
-
/* Fix for dropdown options background */
|
| 296 |
ul.options, .gr-dropdown-options {
|
| 297 |
-
background-color:
|
| 298 |
-
color:
|
| 299 |
-
border: 1px solid
|
| 300 |
}
|
| 301 |
|
| 302 |
/* Markdown prose */
|
| 303 |
.prose, .prose p, .prose h1, .prose h2, .prose h3, .prose strong, .prose li {
|
| 304 |
-
color: var(--text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
}
|
| 306 |
|
| 307 |
/* Buttons */
|
| 308 |
.gr-button-primary {
|
| 309 |
-
background: linear-gradient(135deg,
|
| 310 |
border: none !important;
|
| 311 |
color: white !important;
|
| 312 |
font-weight: 600 !important;
|
| 313 |
}
|
| 314 |
|
| 315 |
.gr-button-secondary {
|
| 316 |
-
background:
|
| 317 |
-
border: 1px solid
|
| 318 |
-
color: var(--text
|
| 319 |
}
|
| 320 |
.gr-button-secondary:hover {
|
| 321 |
-
background:
|
| 322 |
}
|
| 323 |
|
| 324 |
/* Tabs */
|
| 325 |
.tabs button {
|
| 326 |
-
color: var(--
|
| 327 |
}
|
| 328 |
.tabs button.selected {
|
| 329 |
-
color:
|
| 330 |
-
border-bottom-color:
|
| 331 |
}
|
| 332 |
|
| 333 |
/* Radio buttons */
|
| 334 |
.gr-radio-label {
|
| 335 |
-
color: var(--text
|
| 336 |
}
|
| 337 |
|
| 338 |
/* Footer */
|
| 339 |
.footer-text, .footer-text p {
|
| 340 |
-
color: var(--
|
| 341 |
}
|
| 342 |
.footer-text a {
|
| 343 |
-
color:
|
| 344 |
}
|
| 345 |
"""
|
| 346 |
|
|
|
|
| 175 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
|
| 176 |
|
| 177 |
:root {
|
| 178 |
+
--bg: #f8fafc;
|
| 179 |
+
--surface: #ffffff;
|
| 180 |
+
--surface-2: #f1f5f9;
|
| 181 |
+
--border: #e2e8f0;
|
| 182 |
+
--text: #0f172a;
|
| 183 |
+
--muted: #64748b;
|
| 184 |
+
--accent: #4f46e5;
|
| 185 |
+
--accent-2: #6366f1;
|
| 186 |
}
|
| 187 |
|
| 188 |
body {
|
| 189 |
+
background-color: var(--bg);
|
| 190 |
+
color: var(--text);
|
| 191 |
}
|
| 192 |
|
| 193 |
.gradio-container {
|
| 194 |
font-family: 'Inter', sans-serif !important;
|
| 195 |
+
background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%) !important;
|
| 196 |
max-width: 1200px !important;
|
| 197 |
}
|
| 198 |
|
|
|
|
| 199 |
/* Title & Header */
|
| 200 |
.main-title {
|
| 201 |
font-family: 'Inter', sans-serif !important;
|
| 202 |
font-weight: 800 !important;
|
| 203 |
+
font-size: 2.6rem !important;
|
| 204 |
+
background: linear-gradient(90deg, #0f172a, #4f46e5, #7c3aed) !important;
|
| 205 |
-webkit-background-clip: text !important;
|
| 206 |
-webkit-text-fill-color: transparent !important;
|
| 207 |
text-align: center !important;
|
| 208 |
+
margin-bottom: 0.4rem !important;
|
|
|
|
|
|
|
| 209 |
}
|
| 210 |
|
| 211 |
.subtitle {
|
| 212 |
text-align: center !important;
|
| 213 |
+
color: var(--muted) !important;
|
| 214 |
+
font-size: 1.05rem !important;
|
| 215 |
+
margin-bottom: 2.5rem !important;
|
| 216 |
+
font-weight: 400 !important;
|
| 217 |
}
|
| 218 |
|
| 219 |
/* Panels */
|
| 220 |
.glass-panel {
|
| 221 |
+
background: var(--surface) !important;
|
| 222 |
+
border: 1px solid var(--border) !important;
|
|
|
|
| 223 |
border-radius: 16px !important;
|
| 224 |
padding: 24px !important;
|
| 225 |
+
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
|
| 226 |
}
|
| 227 |
|
| 228 |
+
/* Labels */
|
| 229 |
.block > label > span,
|
| 230 |
.form > label > span,
|
| 231 |
.gr-form > label > span,
|
| 232 |
.label-wrap > span {
|
| 233 |
+
color: var(--text) !important;
|
| 234 |
+
font-weight: 600 !important;
|
| 235 |
font-size: 1rem !important;
|
| 236 |
margin-bottom: 0.5rem !important;
|
| 237 |
+
text-shadow: none !important;
|
|
|
|
|
|
|
| 238 |
}
|
| 239 |
|
| 240 |
+
/* Radio group title */
|
| 241 |
fieldset legend, fieldset legend span,
|
| 242 |
.gr-radio > label, .gr-radio > label span,
|
| 243 |
.gradio-container .label-wrap, .gradio-container .label-wrap span {
|
| 244 |
+
color: var(--text) !important;
|
| 245 |
+
font-weight: 600 !important;
|
| 246 |
+
text-shadow: none !important;
|
| 247 |
}
|
| 248 |
|
| 249 |
/* Info Text (Description) */
|
| 250 |
span.description, .description {
|
| 251 |
+
color: var(--muted) !important;
|
| 252 |
+
font-weight: 500 !important;
|
| 253 |
+
text-shadow: none !important;
|
| 254 |
opacity: 1 !important;
|
| 255 |
}
|
| 256 |
|
| 257 |
+
/* Radio/Checkbox alignment */
|
| 258 |
fieldset label span {
|
| 259 |
margin-bottom: 0 !important;
|
| 260 |
text-shadow: none !important;
|
| 261 |
+
font-weight: 500 !important;
|
| 262 |
+
color: var(--text) !important;
|
| 263 |
display: flex !important;
|
| 264 |
align-items: center !important;
|
| 265 |
}
|
| 266 |
|
|
|
|
| 267 |
fieldset label.selected span {
|
| 268 |
color: #ffffff !important;
|
| 269 |
}
|
| 270 |
|
| 271 |
+
fieldset label.selected {
|
| 272 |
+
background: var(--accent) !important;
|
| 273 |
+
border-color: var(--accent) !important;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
/* Inputs & Textareas */
|
| 277 |
.gr-input, textarea, input, .gr-box, .gr-check-radio, .gr-dropdown {
|
| 278 |
font-family: 'JetBrains Mono', monospace !important;
|
| 279 |
+
background-color: var(--surface) !important;
|
| 280 |
+
border: 1px solid var(--border) !important;
|
| 281 |
+
color: var(--text) !important;
|
| 282 |
box-shadow: none !important;
|
| 283 |
}
|
| 284 |
|
|
|
|
| 285 |
.gr-input:focus, textarea:focus, input:focus {
|
| 286 |
+
border-color: var(--accent) !important;
|
| 287 |
+
box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15) !important;
|
| 288 |
}
|
| 289 |
|
| 290 |
+
/* Dropdown options */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
ul.options, .gr-dropdown-options {
|
| 292 |
+
background-color: var(--surface) !important;
|
| 293 |
+
color: var(--text) !important;
|
| 294 |
+
border: 1px solid var(--border) !important;
|
| 295 |
}
|
| 296 |
|
| 297 |
/* Markdown prose */
|
| 298 |
.prose, .prose p, .prose h1, .prose h2, .prose h3, .prose strong, .prose li {
|
| 299 |
+
color: var(--text) !important;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
/* Outputs */
|
| 303 |
+
.output-textbox textarea {
|
| 304 |
+
background-color: var(--surface-2) !important;
|
| 305 |
+
border: 1px solid var(--border) !important;
|
| 306 |
+
border-radius: 8px !important;
|
| 307 |
+
color: var(--text) !important;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.markdown-box {
|
| 311 |
+
background: var(--surface-2) !important;
|
| 312 |
+
border: 1px solid var(--border) !important;
|
| 313 |
+
border-radius: 8px !important;
|
| 314 |
+
padding: 16px !important;
|
| 315 |
+
color: var(--text) !important;
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
.markdown-box * {
|
| 319 |
+
color: var(--text) !important;
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.markdown-box code, .markdown-box pre {
|
| 323 |
+
background: #e2e8f0 !important;
|
| 324 |
}
|
| 325 |
|
| 326 |
/* Buttons */
|
| 327 |
.gr-button-primary {
|
| 328 |
+
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%) !important;
|
| 329 |
border: none !important;
|
| 330 |
color: white !important;
|
| 331 |
font-weight: 600 !important;
|
| 332 |
}
|
| 333 |
|
| 334 |
.gr-button-secondary {
|
| 335 |
+
background: var(--surface-2) !important;
|
| 336 |
+
border: 1px solid var(--border) !important;
|
| 337 |
+
color: var(--text) !important;
|
| 338 |
}
|
| 339 |
.gr-button-secondary:hover {
|
| 340 |
+
background: #e2e8f0 !important;
|
| 341 |
}
|
| 342 |
|
| 343 |
/* Tabs */
|
| 344 |
.tabs button {
|
| 345 |
+
color: var(--muted) !important;
|
| 346 |
}
|
| 347 |
.tabs button.selected {
|
| 348 |
+
color: var(--accent) !important;
|
| 349 |
+
border-bottom-color: var(--accent) !important;
|
| 350 |
}
|
| 351 |
|
| 352 |
/* Radio buttons */
|
| 353 |
.gr-radio-label {
|
| 354 |
+
color: var(--text) !important;
|
| 355 |
}
|
| 356 |
|
| 357 |
/* Footer */
|
| 358 |
.footer-text, .footer-text p {
|
| 359 |
+
color: var(--muted) !important;
|
| 360 |
}
|
| 361 |
.footer-text a {
|
| 362 |
+
color: var(--accent) !important;
|
| 363 |
}
|
| 364 |
"""
|
| 365 |
|