Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -261,12 +261,13 @@ fixed_css = """
|
|
| 261 |
.gradio-container {
|
| 262 |
max-width: none !important;
|
| 263 |
width: 100% !important;
|
| 264 |
-
|
|
|
|
| 265 |
background: #0a0a0a !important;
|
| 266 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
|
| 267 |
color: #ffffff !important;
|
| 268 |
padding: 1rem !important;
|
| 269 |
-
overflow
|
| 270 |
}
|
| 271 |
|
| 272 |
/* Header */
|
|
@@ -278,6 +279,7 @@ fixed_css = """
|
|
| 278 |
margin-bottom: 1rem !important;
|
| 279 |
box-shadow: 0 8px 32px rgba(220, 38, 38, 0.15) !important;
|
| 280 |
text-align: center !important;
|
|
|
|
| 281 |
}
|
| 282 |
|
| 283 |
.header-title {
|
|
@@ -298,13 +300,16 @@ fixed_css = """
|
|
| 298 |
font-weight: 400 !important;
|
| 299 |
}
|
| 300 |
|
| 301 |
-
/* Main layout - FIXED
|
| 302 |
.main-layout {
|
| 303 |
display: flex !important;
|
| 304 |
flex-direction: row !important;
|
| 305 |
gap: 1.5rem !important;
|
| 306 |
width: 100% !important;
|
| 307 |
-
|
|
|
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
/* Sidebar - FIXED width and scrolling */
|
|
@@ -316,13 +321,14 @@ fixed_css = """
|
|
| 316 |
width: 320px !important;
|
| 317 |
min-width: 320px !important;
|
| 318 |
max-width: 320px !important;
|
|
|
|
|
|
|
| 319 |
flex-shrink: 0 !important;
|
| 320 |
box-shadow: 0 8px 32px rgba(220, 38, 38, 0.1) !important;
|
| 321 |
overflow-y: auto !important;
|
| 322 |
-
max-height: calc(100vh - 250px) !important;
|
| 323 |
}
|
| 324 |
|
| 325 |
-
/* Chat area - FIXED
|
| 326 |
.chat-area {
|
| 327 |
background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%) !important;
|
| 328 |
border: 1px solid #262626 !important;
|
|
@@ -332,18 +338,22 @@ fixed_css = """
|
|
| 332 |
flex-direction: column !important;
|
| 333 |
overflow: hidden !important;
|
| 334 |
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
|
| 335 |
-
|
|
|
|
|
|
|
| 336 |
}
|
| 337 |
|
| 338 |
-
/* Chat content area */
|
| 339 |
.chat-content {
|
| 340 |
flex: 1 !important;
|
| 341 |
overflow-y: auto !important;
|
| 342 |
padding: 1.5rem !important;
|
|
|
|
|
|
|
| 343 |
min-height: 300px !important;
|
| 344 |
}
|
| 345 |
|
| 346 |
-
/* Input section - FIXED to
|
| 347 |
.input-section {
|
| 348 |
flex-shrink: 0 !important;
|
| 349 |
background: #1a1a1a !important;
|
|
@@ -352,6 +362,9 @@ fixed_css = """
|
|
| 352 |
display: flex !important;
|
| 353 |
flex-direction: column !important;
|
| 354 |
gap: 1rem !important;
|
|
|
|
|
|
|
|
|
|
| 355 |
}
|
| 356 |
|
| 357 |
/* Quick Actions */
|
|
@@ -428,6 +441,7 @@ fixed_css = """
|
|
| 428 |
border-radius: 8px !important;
|
| 429 |
padding: 1rem !important;
|
| 430 |
margin-bottom: 1rem !important;
|
|
|
|
| 431 |
}
|
| 432 |
|
| 433 |
/* File upload */
|
|
@@ -439,6 +453,7 @@ fixed_css = """
|
|
| 439 |
margin-bottom: 1rem !important;
|
| 440 |
transition: all 0.3s ease !important;
|
| 441 |
width: 100% !important;
|
|
|
|
| 442 |
}
|
| 443 |
|
| 444 |
.file-upload:hover {
|
|
@@ -446,7 +461,7 @@ fixed_css = """
|
|
| 446 |
background: #262626 !important;
|
| 447 |
}
|
| 448 |
|
| 449 |
-
/* Message input - FIXED
|
| 450 |
.msg-input {
|
| 451 |
background: #262626 !important;
|
| 452 |
border: 1px solid #404040 !important;
|
|
@@ -455,11 +470,14 @@ fixed_css = """
|
|
| 455 |
padding: 1rem !important;
|
| 456 |
font-size: 0.95rem !important;
|
| 457 |
line-height: 1.4 !important;
|
| 458 |
-
resize:
|
| 459 |
transition: all 0.3s ease !important;
|
| 460 |
width: 100% !important;
|
| 461 |
margin-bottom: 1rem !important;
|
| 462 |
-
|
|
|
|
|
|
|
|
|
|
| 463 |
}
|
| 464 |
|
| 465 |
.msg-input:focus {
|
|
@@ -472,12 +490,13 @@ fixed_css = """
|
|
| 472 |
color: #6b7280 !important;
|
| 473 |
}
|
| 474 |
|
| 475 |
-
/* Buttons - FIXED
|
| 476 |
.btn-row {
|
| 477 |
display: flex !important;
|
| 478 |
gap: 1rem !important;
|
| 479 |
align-items: center !important;
|
| 480 |
justify-content: flex-end !important;
|
|
|
|
| 481 |
}
|
| 482 |
|
| 483 |
.btn-primary {
|
|
@@ -494,6 +513,7 @@ fixed_css = """
|
|
| 494 |
text-transform: uppercase !important;
|
| 495 |
letter-spacing: 0.5px !important;
|
| 496 |
min-width: 80px !important;
|
|
|
|
| 497 |
}
|
| 498 |
|
| 499 |
.btn-primary:hover {
|
|
@@ -515,6 +535,7 @@ fixed_css = """
|
|
| 515 |
letter-spacing: 0.5px !important;
|
| 516 |
font-size: 0.9rem !important;
|
| 517 |
min-width: 80px !important;
|
|
|
|
| 518 |
}
|
| 519 |
|
| 520 |
.btn-secondary:hover {
|
|
@@ -522,12 +543,31 @@ fixed_css = """
|
|
| 522 |
border-color: #dc2626 !important;
|
| 523 |
}
|
| 524 |
|
| 525 |
-
/* Chatbot */
|
| 526 |
.chatbot-container {
|
| 527 |
height: 100% !important;
|
| 528 |
-
min-height:
|
|
|
|
| 529 |
border: none !important;
|
| 530 |
background: transparent !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 531 |
}
|
| 532 |
|
| 533 |
/* Scrollbar */
|
|
@@ -567,22 +607,6 @@ code {
|
|
| 567 |
font-size: 0.85rem !important;
|
| 568 |
}
|
| 569 |
|
| 570 |
-
/* Footer */
|
| 571 |
-
.footer {
|
| 572 |
-
background: #0a0a0a !important;
|
| 573 |
-
border-top: 1px solid #262626 !important;
|
| 574 |
-
padding: 1rem !important;
|
| 575 |
-
text-align: center !important;
|
| 576 |
-
color: #6b7280 !important;
|
| 577 |
-
margin-top: 1rem !important;
|
| 578 |
-
border-radius: 8px !important;
|
| 579 |
-
font-size: 0.8rem !important;
|
| 580 |
-
}
|
| 581 |
-
|
| 582 |
-
.footer strong {
|
| 583 |
-
color: #dc2626 !important;
|
| 584 |
-
}
|
| 585 |
-
|
| 586 |
/* Ensure all elements are visible */
|
| 587 |
.gradio-container * {
|
| 588 |
visibility: visible !important;
|
|
@@ -593,13 +617,21 @@ code {
|
|
| 593 |
@media (max-width: 768px) {
|
| 594 |
.main-layout {
|
| 595 |
flex-direction: column !important;
|
|
|
|
|
|
|
| 596 |
}
|
| 597 |
|
| 598 |
.sidebar {
|
| 599 |
width: 100% !important;
|
| 600 |
max-width: none !important;
|
| 601 |
min-width: auto !important;
|
| 602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
}
|
| 604 |
|
| 605 |
.header-title {
|
|
|
|
| 261 |
.gradio-container {
|
| 262 |
max-width: none !important;
|
| 263 |
width: 100% !important;
|
| 264 |
+
height: 100vh !important;
|
| 265 |
+
max-height: 100vh !important;
|
| 266 |
background: #0a0a0a !important;
|
| 267 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
|
| 268 |
color: #ffffff !important;
|
| 269 |
padding: 1rem !important;
|
| 270 |
+
overflow: hidden !important;
|
| 271 |
}
|
| 272 |
|
| 273 |
/* Header */
|
|
|
|
| 279 |
margin-bottom: 1rem !important;
|
| 280 |
box-shadow: 0 8px 32px rgba(220, 38, 38, 0.15) !important;
|
| 281 |
text-align: center !important;
|
| 282 |
+
flex-shrink: 0 !important;
|
| 283 |
}
|
| 284 |
|
| 285 |
.header-title {
|
|
|
|
| 300 |
font-weight: 400 !important;
|
| 301 |
}
|
| 302 |
|
| 303 |
+
/* Main layout - FIXED with stable height */
|
| 304 |
.main-layout {
|
| 305 |
display: flex !important;
|
| 306 |
flex-direction: row !important;
|
| 307 |
gap: 1.5rem !important;
|
| 308 |
width: 100% !important;
|
| 309 |
+
height: calc(100vh - 200px) !important;
|
| 310 |
+
max-height: calc(100vh - 200px) !important;
|
| 311 |
+
min-height: calc(100vh - 200px) !important;
|
| 312 |
+
flex-shrink: 0 !important;
|
| 313 |
}
|
| 314 |
|
| 315 |
/* Sidebar - FIXED width and scrolling */
|
|
|
|
| 321 |
width: 320px !important;
|
| 322 |
min-width: 320px !important;
|
| 323 |
max-width: 320px !important;
|
| 324 |
+
height: 100% !important;
|
| 325 |
+
max-height: 100% !important;
|
| 326 |
flex-shrink: 0 !important;
|
| 327 |
box-shadow: 0 8px 32px rgba(220, 38, 38, 0.1) !important;
|
| 328 |
overflow-y: auto !important;
|
|
|
|
| 329 |
}
|
| 330 |
|
| 331 |
+
/* Chat area - FIXED with stable height */
|
| 332 |
.chat-area {
|
| 333 |
background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%) !important;
|
| 334 |
border: 1px solid #262626 !important;
|
|
|
|
| 338 |
flex-direction: column !important;
|
| 339 |
overflow: hidden !important;
|
| 340 |
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
|
| 341 |
+
height: 100% !important;
|
| 342 |
+
max-height: 100% !important;
|
| 343 |
+
min-height: 100% !important;
|
| 344 |
}
|
| 345 |
|
| 346 |
+
/* Chat content area - FIXED height */
|
| 347 |
.chat-content {
|
| 348 |
flex: 1 !important;
|
| 349 |
overflow-y: auto !important;
|
| 350 |
padding: 1.5rem !important;
|
| 351 |
+
height: calc(100% - 220px) !important;
|
| 352 |
+
max-height: calc(100% - 220px) !important;
|
| 353 |
min-height: 300px !important;
|
| 354 |
}
|
| 355 |
|
| 356 |
+
/* Input section - FIXED height to prevent movement */
|
| 357 |
.input-section {
|
| 358 |
flex-shrink: 0 !important;
|
| 359 |
background: #1a1a1a !important;
|
|
|
|
| 362 |
display: flex !important;
|
| 363 |
flex-direction: column !important;
|
| 364 |
gap: 1rem !important;
|
| 365 |
+
height: 220px !important;
|
| 366 |
+
max-height: 220px !important;
|
| 367 |
+
overflow-y: auto !important;
|
| 368 |
}
|
| 369 |
|
| 370 |
/* Quick Actions */
|
|
|
|
| 441 |
border-radius: 8px !important;
|
| 442 |
padding: 1rem !important;
|
| 443 |
margin-bottom: 1rem !important;
|
| 444 |
+
flex-shrink: 0 !important;
|
| 445 |
}
|
| 446 |
|
| 447 |
/* File upload */
|
|
|
|
| 453 |
margin-bottom: 1rem !important;
|
| 454 |
transition: all 0.3s ease !important;
|
| 455 |
width: 100% !important;
|
| 456 |
+
flex-shrink: 0 !important;
|
| 457 |
}
|
| 458 |
|
| 459 |
.file-upload:hover {
|
|
|
|
| 461 |
background: #262626 !important;
|
| 462 |
}
|
| 463 |
|
| 464 |
+
/* Message input - FIXED size */
|
| 465 |
.msg-input {
|
| 466 |
background: #262626 !important;
|
| 467 |
border: 1px solid #404040 !important;
|
|
|
|
| 470 |
padding: 1rem !important;
|
| 471 |
font-size: 0.95rem !important;
|
| 472 |
line-height: 1.4 !important;
|
| 473 |
+
resize: none !important;
|
| 474 |
transition: all 0.3s ease !important;
|
| 475 |
width: 100% !important;
|
| 476 |
margin-bottom: 1rem !important;
|
| 477 |
+
height: 60px !important;
|
| 478 |
+
max-height: 60px !important;
|
| 479 |
+
min-height: 60px !important;
|
| 480 |
+
flex-shrink: 0 !important;
|
| 481 |
}
|
| 482 |
|
| 483 |
.msg-input:focus {
|
|
|
|
| 490 |
color: #6b7280 !important;
|
| 491 |
}
|
| 492 |
|
| 493 |
+
/* Buttons - FIXED positioning */
|
| 494 |
.btn-row {
|
| 495 |
display: flex !important;
|
| 496 |
gap: 1rem !important;
|
| 497 |
align-items: center !important;
|
| 498 |
justify-content: flex-end !important;
|
| 499 |
+
flex-shrink: 0 !important;
|
| 500 |
}
|
| 501 |
|
| 502 |
.btn-primary {
|
|
|
|
| 513 |
text-transform: uppercase !important;
|
| 514 |
letter-spacing: 0.5px !important;
|
| 515 |
min-width: 80px !important;
|
| 516 |
+
flex-shrink: 0 !important;
|
| 517 |
}
|
| 518 |
|
| 519 |
.btn-primary:hover {
|
|
|
|
| 535 |
letter-spacing: 0.5px !important;
|
| 536 |
font-size: 0.9rem !important;
|
| 537 |
min-width: 80px !important;
|
| 538 |
+
flex-shrink: 0 !important;
|
| 539 |
}
|
| 540 |
|
| 541 |
.btn-secondary:hover {
|
|
|
|
| 543 |
border-color: #dc2626 !important;
|
| 544 |
}
|
| 545 |
|
| 546 |
+
/* Chatbot - FIXED container */
|
| 547 |
.chatbot-container {
|
| 548 |
height: 100% !important;
|
| 549 |
+
min-height: 100% !important;
|
| 550 |
+
max-height: 100% !important;
|
| 551 |
border: none !important;
|
| 552 |
background: transparent !important;
|
| 553 |
+
overflow-y: auto !important;
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
/* Footer - FIXED positioning */
|
| 557 |
+
.footer {
|
| 558 |
+
background: #0a0a0a !important;
|
| 559 |
+
border-top: 1px solid #262626 !important;
|
| 560 |
+
padding: 1rem !important;
|
| 561 |
+
text-align: center !important;
|
| 562 |
+
color: #6b7280 !important;
|
| 563 |
+
border-radius: 8px !important;
|
| 564 |
+
font-size: 0.8rem !important;
|
| 565 |
+
flex-shrink: 0 !important;
|
| 566 |
+
margin-top: auto !important;
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
.footer strong {
|
| 570 |
+
color: #dc2626 !important;
|
| 571 |
}
|
| 572 |
|
| 573 |
/* Scrollbar */
|
|
|
|
| 607 |
font-size: 0.85rem !important;
|
| 608 |
}
|
| 609 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 610 |
/* Ensure all elements are visible */
|
| 611 |
.gradio-container * {
|
| 612 |
visibility: visible !important;
|
|
|
|
| 617 |
@media (max-width: 768px) {
|
| 618 |
.main-layout {
|
| 619 |
flex-direction: column !important;
|
| 620 |
+
height: calc(100vh - 150px) !important;
|
| 621 |
+
max-height: calc(100vh - 150px) !important;
|
| 622 |
}
|
| 623 |
|
| 624 |
.sidebar {
|
| 625 |
width: 100% !important;
|
| 626 |
max-width: none !important;
|
| 627 |
min-width: auto !important;
|
| 628 |
+
height: 300px !important;
|
| 629 |
+
max-height: 300px !important;
|
| 630 |
+
}
|
| 631 |
+
|
| 632 |
+
.chat-area {
|
| 633 |
+
height: calc(100% - 320px) !important;
|
| 634 |
+
max-height: calc(100% - 320px) !important;
|
| 635 |
}
|
| 636 |
|
| 637 |
.header-title {
|