Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -421,6 +421,60 @@ SLEEK_CSS = """
|
|
| 421 |
#chatbot_container .chatbot::-webkit-scrollbar-thumb:hover {
|
| 422 |
background: rgba(100, 120, 160, 0.7);
|
| 423 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
"""
|
| 425 |
|
| 426 |
VOICE_STT_HTML = """
|
|
|
|
| 421 |
#chatbot_container .chatbot::-webkit-scrollbar-thumb:hover {
|
| 422 |
background: rgba(100, 120, 160, 0.7);
|
| 423 |
}
|
| 424 |
+
/* ββββββββ FINAL WORKING FIX FOR GRADIO 4+ CHATBOT HEIGHT (2025) ββββββββ */
|
| 425 |
+
#chatbot_container {
|
| 426 |
+
flex: 1 !important;
|
| 427 |
+
min-height: 0;
|
| 428 |
+
display: flex !important;
|
| 429 |
+
flex-direction: column !important;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
/* This is the real container that holds the messages in Gradio 4+ */
|
| 433 |
+
#chatbot_container .svelte-1cea1s5 {
|
| 434 |
+
flex: 1 !important;
|
| 435 |
+
min-height: 0 !important;
|
| 436 |
+
display: flex !important;
|
| 437 |
+
flex-direction: column !important;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
/* The actual scrollable message area (this is the one that was hidden) */
|
| 441 |
+
#chatbot_container .messages {
|
| 442 |
+
flex: 1 !important;
|
| 443 |
+
overflow-y: auto !important;
|
| 444 |
+
overflow-x: hidden !important;
|
| 445 |
+
padding: 24px !important;
|
| 446 |
+
min-height: 0 !important;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
/* Remove any max-height caps */
|
| 450 |
+
#chatbot_container .gr-chatbot,
|
| 451 |
+
#chatbot_container .svelte-1cea1s5,
|
| 452 |
+
#chatbot_container .messages,
|
| 453 |
+
#chatbot_container * {
|
| 454 |
+
max-height: none !important;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
/* Nice scrollbar */
|
| 458 |
+
#chatbot_container .messages::-webkit-scrollbar {
|
| 459 |
+
width: 8px;
|
| 460 |
+
}
|
| 461 |
+
#chatbot_container .messages::-webkit-scrollbar-track {
|
| 462 |
+
background: transparent;
|
| 463 |
+
}
|
| 464 |
+
#chatbot_container .messages::-webkit-scrollbar-thumb {
|
| 465 |
+
background: rgba(100, 120, 160, 0.4);
|
| 466 |
+
border-radius: 4px;
|
| 467 |
+
}
|
| 468 |
+
#chatbot_container .messages::-webkit-scrollbar-thumb:hover {
|
| 469 |
+
background: rgba(100, 120, 160, 0.7);
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
/* Optional: make code blocks look better in long reports */
|
| 473 |
+
#chatbot_container pre {
|
| 474 |
+
background: #0f1629 !important;
|
| 475 |
+
border: 1px solid #2a3755 !important;
|
| 476 |
+
border-radius: 8px !important;
|
| 477 |
+
}
|
| 478 |
"""
|
| 479 |
|
| 480 |
VOICE_STT_HTML = """
|