Spaces:
Sleeping
Sleeping
Overriding Gradio Default Formatting
Browse filesAddressing the extra space above the title line and the chat box container color.
app.py
CHANGED
|
@@ -349,15 +349,16 @@ custom_css = """
|
|
| 349 |
font-style: normal;
|
| 350 |
}
|
| 351 |
|
| 352 |
-
/* Main container styling */
|
| 353 |
-
.gradio-container {
|
| 354 |
background-color: rgb(240, 236, 230) !important;
|
| 355 |
font-family: "Oswald", sans-serif !important;
|
| 356 |
font-optical-sizing: auto !important;
|
| 357 |
font-weight: 400 !important;
|
| 358 |
font-style: normal !important;
|
| 359 |
color: #120f0e !important;
|
| 360 |
-
padding-top:
|
|
|
|
| 361 |
}
|
| 362 |
|
| 363 |
/* Apply Oswald to all text elements */
|
|
@@ -367,11 +368,17 @@ custom_css = """
|
|
| 367 |
color: #120f0e !important;
|
| 368 |
}
|
| 369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
/* Title styling - minimize top spacing */
|
| 371 |
.title-header {
|
| 372 |
background-color: rgb(240, 236, 230);
|
| 373 |
-
padding:
|
| 374 |
-
margin
|
| 375 |
border-bottom: 1pt solid #59524f;
|
| 376 |
text-align: left;
|
| 377 |
}
|
|
@@ -393,12 +400,15 @@ custom_css = """
|
|
| 393 |
padding: 20px;
|
| 394 |
}
|
| 395 |
|
| 396 |
-
/*
|
| 397 |
-
.gradio-chatbot,
|
| 398 |
-
.chatbot,
|
| 399 |
-
div[data-testid="chatbot"],
|
| 400 |
-
.gradio-chatbot > div,
|
| 401 |
-
.gradio-chatbot .scroll-hide
|
|
|
|
|
|
|
|
|
|
| 402 |
background-color: #d9d1ce !important;
|
| 403 |
border: 1pt solid #59524f !important;
|
| 404 |
border-radius: 6px !important;
|
|
@@ -406,33 +416,19 @@ div[data-testid="chatbot"],
|
|
| 406 |
font-family: "Oswald", sans-serif !important;
|
| 407 |
}
|
| 408 |
|
| 409 |
-
/*
|
| 410 |
-
.gradio-
|
| 411 |
-
|
| 412 |
-
}
|
| 413 |
-
|
| 414 |
-
/* Target the actual chat messages container */
|
| 415 |
-
.gradio-chatbot > div > div {
|
| 416 |
-
background-color: #d9d1ce !important;
|
| 417 |
-
}
|
| 418 |
-
|
| 419 |
-
/* Target by element ID */
|
| 420 |
-
#main-chatbot {
|
| 421 |
-
background-color: #d9d1ce !important;
|
| 422 |
-
}
|
| 423 |
-
|
| 424 |
-
/* Additional fallback selectors */
|
| 425 |
-
[data-testid="chatbot"] {
|
| 426 |
background-color: #d9d1ce !important;
|
| 427 |
}
|
| 428 |
|
| 429 |
-
/* Force all chatbot
|
| 430 |
-
.gradio-chatbot * {
|
| 431 |
background-color: inherit !important;
|
| 432 |
}
|
| 433 |
|
| 434 |
/* Message styling - model messages same as send button color */
|
| 435 |
-
.gradio-chatbot .message.bot .markdown {
|
| 436 |
background-color: #f09c7d !important;
|
| 437 |
color: #120f0e !important;
|
| 438 |
border-radius: 8px !important;
|
|
@@ -448,7 +444,7 @@ div[data-testid="chatbot"],
|
|
| 448 |
}
|
| 449 |
|
| 450 |
/* User messages same as clear button color */
|
| 451 |
-
.gradio-chatbot .message.user .markdown {
|
| 452 |
background-color: #ada3a0 !important;
|
| 453 |
color: #120f0e !important;
|
| 454 |
border-radius: 8px !important;
|
|
@@ -464,31 +460,31 @@ div[data-testid="chatbot"],
|
|
| 464 |
}
|
| 465 |
|
| 466 |
/* Apply Oswald to all markdown content */
|
| 467 |
-
.gradio-chatbot .markdown p,
|
| 468 |
-
.gradio-chatbot .markdown h1,
|
| 469 |
-
.gradio-chatbot .markdown h2,
|
| 470 |
-
.gradio-chatbot .markdown h3,
|
| 471 |
-
.gradio-chatbot .markdown h4,
|
| 472 |
-
.gradio-chatbot .markdown h5,
|
| 473 |
-
.gradio-chatbot .markdown h6,
|
| 474 |
-
.gradio-chatbot .markdown ul,
|
| 475 |
-
.gradio-chatbot .markdown ol,
|
| 476 |
-
.gradio-chatbot .markdown li,
|
| 477 |
-
.gradio-chatbot .markdown strong,
|
| 478 |
-
.gradio-chatbot .markdown em,
|
| 479 |
-
.gradio-chatbot .markdown code {
|
| 480 |
font-family: "Oswald", sans-serif !important;
|
| 481 |
color: #120f0e !important;
|
| 482 |
}
|
| 483 |
|
| 484 |
/* Mode indicators with Oswald */
|
| 485 |
-
.gradio-chatbot .markdown strong {
|
| 486 |
font-weight: 600 !important;
|
| 487 |
color: #120f0e !important;
|
| 488 |
}
|
| 489 |
|
| 490 |
/* Hide avatars */
|
| 491 |
-
.gradio-chatbot .avatar-container {
|
| 492 |
display: none !important;
|
| 493 |
}
|
| 494 |
|
|
@@ -500,7 +496,7 @@ div[data-testid="chatbot"],
|
|
| 500 |
}
|
| 501 |
|
| 502 |
/* Button styling with new colors */
|
| 503 |
-
.clear-button {
|
| 504 |
background-color: #ada3a0 !important;
|
| 505 |
color: #120f0e !important;
|
| 506 |
border: 1pt solid #59524f !important;
|
|
@@ -513,11 +509,11 @@ div[data-testid="chatbot"],
|
|
| 513 |
font-optical-sizing: auto !important;
|
| 514 |
}
|
| 515 |
|
| 516 |
-
.clear-button:hover {
|
| 517 |
background-color: rgba(173, 163, 160, 0.8) !important;
|
| 518 |
}
|
| 519 |
|
| 520 |
-
.send-button {
|
| 521 |
background-color: #f09c7d !important;
|
| 522 |
color: #120f0e !important;
|
| 523 |
border: 1pt solid #59524f !important;
|
|
@@ -530,18 +526,18 @@ div[data-testid="chatbot"],
|
|
| 530 |
font-optical-sizing: auto !important;
|
| 531 |
}
|
| 532 |
|
| 533 |
-
.send-button:hover {
|
| 534 |
background-color: rgba(240, 156, 125, 0.8) !important;
|
| 535 |
}
|
| 536 |
|
| 537 |
/* Textbox styling with chat history color */
|
| 538 |
-
.input-textbox {
|
| 539 |
background-color: #d9d1ce !important;
|
| 540 |
border: 1pt solid #59524f !important;
|
| 541 |
border-radius: 8px !important;
|
| 542 |
}
|
| 543 |
|
| 544 |
-
.input-textbox textarea {
|
| 545 |
background-color: #d9d1ce !important;
|
| 546 |
border: none !important;
|
| 547 |
color: #120f0e !important;
|
|
@@ -552,14 +548,17 @@ div[data-testid="chatbot"],
|
|
| 552 |
font-optical-sizing: auto !important;
|
| 553 |
}
|
| 554 |
|
| 555 |
-
.input-textbox textarea::placeholder {
|
| 556 |
font-family: "Oswald", sans-serif !important;
|
| 557 |
font-weight: 300 !important;
|
| 558 |
color: rgba(18, 15, 14, 0.6) !important;
|
| 559 |
}
|
| 560 |
|
| 561 |
/* Ensure all input elements use Oswald and new colors */
|
| 562 |
-
input,
|
|
|
|
|
|
|
|
|
|
| 563 |
font-family: "Oswald", sans-serif !important;
|
| 564 |
font-optical-sizing: auto !important;
|
| 565 |
color: #120f0e !important;
|
|
|
|
| 349 |
font-style: normal;
|
| 350 |
}
|
| 351 |
|
| 352 |
+
/* Main container styling - remove top padding */
|
| 353 |
+
.gradio-container-5-42-0 {
|
| 354 |
background-color: rgb(240, 236, 230) !important;
|
| 355 |
font-family: "Oswald", sans-serif !important;
|
| 356 |
font-optical-sizing: auto !important;
|
| 357 |
font-weight: 400 !important;
|
| 358 |
font-style: normal !important;
|
| 359 |
color: #120f0e !important;
|
| 360 |
+
padding-top: 0 !important;
|
| 361 |
+
margin-top: 0 !important;
|
| 362 |
}
|
| 363 |
|
| 364 |
/* Apply Oswald to all text elements */
|
|
|
|
| 368 |
color: #120f0e !important;
|
| 369 |
}
|
| 370 |
|
| 371 |
+
/* Remove any default body margins */
|
| 372 |
+
body {
|
| 373 |
+
margin: 0 !important;
|
| 374 |
+
padding: 0 !important;
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
/* Title styling - minimize top spacing */
|
| 378 |
.title-header {
|
| 379 |
background-color: rgb(240, 236, 230);
|
| 380 |
+
padding: 5px 20px 10px 20px;
|
| 381 |
+
margin: 0;
|
| 382 |
border-bottom: 1pt solid #59524f;
|
| 383 |
text-align: left;
|
| 384 |
}
|
|
|
|
| 400 |
padding: 20px;
|
| 401 |
}
|
| 402 |
|
| 403 |
+
/* Force chatbot background with highest specificity */
|
| 404 |
+
.gradio-container-5-42-0 .gradio-chatbot,
|
| 405 |
+
.gradio-container-5-42-0 .chatbot,
|
| 406 |
+
.gradio-container-5-42-0 div[data-testid="chatbot"],
|
| 407 |
+
.gradio-container-5-42-0 .gradio-chatbot > div,
|
| 408 |
+
.gradio-container-5-42-0 .gradio-chatbot .scroll-hide,
|
| 409 |
+
.gradio-container-5-42-0 .gradio-chatbot .overflow-y-auto,
|
| 410 |
+
.gradio-container-5-42-0 #main-chatbot,
|
| 411 |
+
.gradio-container-5-42-0 [data-testid="chatbot"] {
|
| 412 |
background-color: #d9d1ce !important;
|
| 413 |
border: 1pt solid #59524f !important;
|
| 414 |
border-radius: 6px !important;
|
|
|
|
| 416 |
font-family: "Oswald", sans-serif !important;
|
| 417 |
}
|
| 418 |
|
| 419 |
+
/* Target all nested chatbot divs */
|
| 420 |
+
.gradio-container-5-42-0 .gradio-chatbot > div > div,
|
| 421 |
+
.gradio-container-5-42-0 .gradio-chatbot > div > div > div {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
background-color: #d9d1ce !important;
|
| 423 |
}
|
| 424 |
|
| 425 |
+
/* Force inheritance on all chatbot children */
|
| 426 |
+
.gradio-container-5-42-0 .gradio-chatbot * {
|
| 427 |
background-color: inherit !important;
|
| 428 |
}
|
| 429 |
|
| 430 |
/* Message styling - model messages same as send button color */
|
| 431 |
+
.gradio-container-5-42-0 .gradio-chatbot .message.bot .markdown {
|
| 432 |
background-color: #f09c7d !important;
|
| 433 |
color: #120f0e !important;
|
| 434 |
border-radius: 8px !important;
|
|
|
|
| 444 |
}
|
| 445 |
|
| 446 |
/* User messages same as clear button color */
|
| 447 |
+
.gradio-container-5-42-0 .gradio-chatbot .message.user .markdown {
|
| 448 |
background-color: #ada3a0 !important;
|
| 449 |
color: #120f0e !important;
|
| 450 |
border-radius: 8px !important;
|
|
|
|
| 460 |
}
|
| 461 |
|
| 462 |
/* Apply Oswald to all markdown content */
|
| 463 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown p,
|
| 464 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h1,
|
| 465 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h2,
|
| 466 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h3,
|
| 467 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h4,
|
| 468 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h5,
|
| 469 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown h6,
|
| 470 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown ul,
|
| 471 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown ol,
|
| 472 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown li,
|
| 473 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown strong,
|
| 474 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown em,
|
| 475 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown code {
|
| 476 |
font-family: "Oswald", sans-serif !important;
|
| 477 |
color: #120f0e !important;
|
| 478 |
}
|
| 479 |
|
| 480 |
/* Mode indicators with Oswald */
|
| 481 |
+
.gradio-container-5-42-0 .gradio-chatbot .markdown strong {
|
| 482 |
font-weight: 600 !important;
|
| 483 |
color: #120f0e !important;
|
| 484 |
}
|
| 485 |
|
| 486 |
/* Hide avatars */
|
| 487 |
+
.gradio-container-5-42-0 .gradio-chatbot .avatar-container {
|
| 488 |
display: none !important;
|
| 489 |
}
|
| 490 |
|
|
|
|
| 496 |
}
|
| 497 |
|
| 498 |
/* Button styling with new colors */
|
| 499 |
+
.gradio-container-5-42-0 .clear-button {
|
| 500 |
background-color: #ada3a0 !important;
|
| 501 |
color: #120f0e !important;
|
| 502 |
border: 1pt solid #59524f !important;
|
|
|
|
| 509 |
font-optical-sizing: auto !important;
|
| 510 |
}
|
| 511 |
|
| 512 |
+
.gradio-container-5-42-0 .clear-button:hover {
|
| 513 |
background-color: rgba(173, 163, 160, 0.8) !important;
|
| 514 |
}
|
| 515 |
|
| 516 |
+
.gradio-container-5-42-0 .send-button {
|
| 517 |
background-color: #f09c7d !important;
|
| 518 |
color: #120f0e !important;
|
| 519 |
border: 1pt solid #59524f !important;
|
|
|
|
| 526 |
font-optical-sizing: auto !important;
|
| 527 |
}
|
| 528 |
|
| 529 |
+
.gradio-container-5-42-0 .send-button:hover {
|
| 530 |
background-color: rgba(240, 156, 125, 0.8) !important;
|
| 531 |
}
|
| 532 |
|
| 533 |
/* Textbox styling with chat history color */
|
| 534 |
+
.gradio-container-5-42-0 .input-textbox {
|
| 535 |
background-color: #d9d1ce !important;
|
| 536 |
border: 1pt solid #59524f !important;
|
| 537 |
border-radius: 8px !important;
|
| 538 |
}
|
| 539 |
|
| 540 |
+
.gradio-container-5-42-0 .input-textbox textarea {
|
| 541 |
background-color: #d9d1ce !important;
|
| 542 |
border: none !important;
|
| 543 |
color: #120f0e !important;
|
|
|
|
| 548 |
font-optical-sizing: auto !important;
|
| 549 |
}
|
| 550 |
|
| 551 |
+
.gradio-container-5-42-0 .input-textbox textarea::placeholder {
|
| 552 |
font-family: "Oswald", sans-serif !important;
|
| 553 |
font-weight: 300 !important;
|
| 554 |
color: rgba(18, 15, 14, 0.6) !important;
|
| 555 |
}
|
| 556 |
|
| 557 |
/* Ensure all input elements use Oswald and new colors */
|
| 558 |
+
.gradio-container-5-42-0 input,
|
| 559 |
+
.gradio-container-5-42-0 textarea,
|
| 560 |
+
.gradio-container-5-42-0 button,
|
| 561 |
+
.gradio-container-5-42-0 select {
|
| 562 |
font-family: "Oswald", sans-serif !important;
|
| 563 |
font-optical-sizing: auto !important;
|
| 564 |
color: #120f0e !important;
|