ragunath-ravi commited on
Commit
464b784
·
verified ·
1 Parent(s): 87ce59b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +393 -402
app.py CHANGED
@@ -424,418 +424,409 @@ def create_interface():
424
  with gr.Blocks(
425
  theme=gr.themes.Base(),
426
  css="""
427
- /* Import Google Fonts for better typography */
428
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
429
-
430
- /* Dark theme styling with enhanced visuals */
431
- .gradio-container {
432
- background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%) !important;
433
- color: #ffffff !important;
434
- height: 100vh !important;
435
- max-width: none !important;
436
- padding: 0 !important;
437
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
438
- }
439
-
440
- /* Main container with animated background */
441
- .main-container {
442
- display: flex;
443
- flex-direction: column;
444
- height: 100vh;
445
- background:
446
- radial-gradient(circle at 20% 50%, rgba(255, 193, 7, 0.05) 0%, transparent 50%),
447
- radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.05) 0%, transparent 50%),
448
- radial-gradient(circle at 40% 80%, rgba(255, 87, 34, 0.03) 0%, transparent 50%),
449
- linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
450
- animation: backgroundShift 15s ease-in-out infinite alternate;
451
- }
452
-
453
- @keyframes backgroundShift {
454
- 0% { filter: hue-rotate(0deg); }
455
- 100% { filter: hue-rotate(10deg); }
456
- }
457
-
458
- /* Enhanced Header with glow */
459
- .header {
460
- background: rgba(255, 193, 7, 0.08);
461
- border-bottom: 2px solid transparent;
462
- border-image: linear-gradient(90deg, rgba(255, 193, 7, 0.5), rgba(0, 123, 255, 0.3)) 1;
463
- padding: 1.5rem 2rem;
464
- backdrop-filter: blur(20px);
465
- box-shadow:
466
- 0 4px 20px rgba(255, 193, 7, 0.1),
467
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
468
- position: relative;
469
- overflow: hidden;
470
- }
471
-
472
- .header::before {
473
- content: '';
474
- position: absolute;
475
- top: 0;
476
- left: -100%;
477
- width: 100%;
478
- height: 100%;
479
- background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent);
480
- animation: shimmer 3s ease-in-out infinite;
481
- }
482
-
483
- @keyframes shimmer {
484
- 0% { left: -100%; }
485
- 100% { left: 100%; }
486
- }
487
-
488
- .header h1 {
489
- color: #ffc107;
490
- margin: 0;
491
- font-size: 2rem;
492
- font-weight: 700;
493
- text-shadow:
494
- 0 0 10px rgba(255, 193, 7, 0.3),
495
- 0 0 20px rgba(255, 193, 7, 0.2);
496
- letter-spacing: -0.02em;
497
- }
498
-
499
- .header p {
500
- color: #e0e0e0;
501
- margin: 0.5rem 0 0 0;
502
- font-size: 1rem;
503
- font-weight: 400;
504
- opacity: 0.9;
505
- }
506
-
507
- /* Enhanced Chat container */
508
- .chat-container {
509
- flex: 1;
510
- display: flex;
511
- flex-direction: column;
512
- max-width: 1200px;
513
- margin: 0 auto;
514
- width: 100%;
515
- padding: 2rem;
516
- height: calc(100vh - 200px) !important;
517
- gap: 1.5rem;
518
- }
519
-
520
- /* Enhanced Chatbot with glow effect */
521
- .gradio-chatbot {
522
- height: 400px !important;
523
- max-height: 400px !important;
524
- background: rgba(45, 45, 45, 0.4) !important;
525
- border: 2px solid rgba(255, 193, 7, 0.2) !important;
526
- border-radius: 20px !important;
527
- margin-bottom: 1rem;
528
- overflow-y: auto !important;
 
 
 
 
 
 
 
 
 
 
 
529
  box-shadow:
530
  0 0 30px rgba(255, 193, 7, 0.15),
531
  0 8px 32px rgba(0, 0, 0, 0.3),
532
- inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
533
- backdrop-filter: blur(20px) !important;
534
- position: relative;
535
- animation: chatGlow 4s ease-in-out infinite alternate;
536
- }
537
-
538
- @keyframes chatGlow {
539
- 0% {
540
- box-shadow:
541
- 0 0 30px rgba(255, 193, 7, 0.15),
542
- 0 8px 32px rgba(0, 0, 0, 0.3),
543
- inset 0 1px 0 rgba(255, 255, 255, 0.05);
544
- }
545
- 100% {
546
- box-shadow:
547
- 0 0 40px rgba(255, 193, 7, 0.25),
548
- 0 12px 40px rgba(0, 0, 0, 0.4),
549
- inset 0 1px 0 rgba(255, 255, 255, 0.08);
550
- }
551
- }
552
-
553
- /* Enhanced chat messages */
554
- .message {
555
- background: rgba(255, 255, 255, 0.05) !important;
556
- border-radius: 16px !important;
557
- padding: 1rem 1.5rem !important;
558
- margin: 0.75rem 0 !important;
559
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
560
- backdrop-filter: blur(10px) !important;
561
- font-size: 0.95rem !important;
562
- line-height: 1.6 !important;
563
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
564
- transition: all 0.3s ease !important;
565
- }
566
-
567
- .message:hover {
568
- transform: translateY(-1px) !important;
569
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
570
- }
571
-
572
- /* User message styling */
573
- .message.user {
574
- background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05)) !important;
575
- border-color: rgba(255, 193, 7, 0.2) !important;
576
- margin-left: 15% !important;
577
- box-shadow:
578
- 0 2px 10px rgba(255, 193, 7, 0.1),
579
- inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
580
  }
581
-
582
- /* Assistant message styling */
583
- .message.assistant {
584
- background: linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.04)) !important;
585
- border-color: rgba(0, 123, 255, 0.2) !important;
586
- margin-right: 15% !important;
587
  box-shadow:
588
- 0 2px 10px rgba(0, 123, 255, 0.1),
589
- inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
 
590
  }
591
-
592
- /* Enhanced Input area with glow */
593
- .input-area {
594
- background: rgba(45, 45, 45, 0.6);
595
- border-radius: 20px;
596
- padding: 1.5rem;
597
- border: 2px solid rgba(255, 193, 7, 0.2);
598
- backdrop-filter: blur(20px);
599
- position: sticky;
600
- bottom: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
  box-shadow:
602
  0 0 25px rgba(255, 193, 7, 0.1),
603
  0 8px 32px rgba(0, 0, 0, 0.2),
604
  inset 0 1px 0 rgba(255, 255, 255, 0.05);
605
- animation: inputGlow 3s ease-in-out infinite alternate;
606
  }
607
-
608
- @keyframes inputGlow {
609
- 0% {
610
- box-shadow:
611
- 0 0 25px rgba(255, 193, 7, 0.1),
612
- 0 8px 32px rgba(0, 0, 0, 0.2),
613
- inset 0 1px 0 rgba(255, 255, 255, 0.05);
614
- }
615
- 100% {
616
- box-shadow:
617
- 0 0 35px rgba(255, 193, 7, 0.2),
618
- 0 12px 40px rgba(0, 0, 0, 0.3),
619
- inset 0 1px 0 rgba(255, 255, 255, 0.08);
620
- }
621
- }
622
-
623
- /* Enhanced File upload area */
624
- .upload-area {
625
- background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 193, 7, 0.04)) !important;
626
- border: 2px dashed rgba(255, 193, 7, 0.4) !important;
627
- border-radius: 16px !important;
628
- padding: 1.5rem !important;
629
- margin-bottom: 1.5rem !important;
630
- transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
631
- backdrop-filter: blur(10px) !important;
632
- box-shadow:
633
- 0 0 20px rgba(255, 193, 7, 0.05),
634
- inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
635
- }
636
-
637
- .upload-area:hover {
638
- background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 193, 7, 0.06)) !important;
639
- border-color: rgba(255, 193, 7, 0.6) !important;
640
- box-shadow:
641
- 0 0 30px rgba(255, 193, 7, 0.15),
642
- inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
643
- transform: translateY(-2px) !important;
644
- }
645
-
646
- /* Sidebar styling */
647
- .sidebar {
648
- background: rgba(30, 30, 30, 0.6) !important;
649
- border-right: 2px solid rgba(255, 193, 7, 0.1) !important;
650
- backdrop-filter: blur(15px) !important;
651
  box-shadow:
652
- inset -1px 0 0 rgba(255, 255, 255, 0.05),
653
- 4px 0 20px rgba(0, 0, 0, 0.1) !important;
 
654
  }
655
-
656
- /* Enhanced buttons with glow effects */
657
- .send-btn {
658
- background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%) !important;
659
- color: #000000 !important;
660
- border: none !important;
661
- border-radius: 12px !important;
662
- font-weight: 600 !important;
663
- min-height: 48px !important;
664
- font-size: 0.95rem !important;
665
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
666
- box-shadow:
667
- 0 4px 15px rgba(255, 193, 7, 0.3),
668
- 0 0 20px rgba(255, 193, 7, 0.2) !important;
669
- position: relative;
670
- overflow: hidden;
671
- }
672
-
673
- .send-btn::before {
674
- content: '';
675
- position: absolute;
676
- top: 0;
677
- left: -100%;
678
- width: 100%;
679
- height: 100%;
680
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
681
- transition: left 0.5s;
682
- }
683
-
684
- .send-btn:hover::before {
685
- left: 100%;
686
- }
687
-
688
- .send-btn:hover {
689
- transform: translateY(-2px) !important;
690
- box-shadow:
691
- 0 8px 25px rgba(255, 193, 7, 0.4),
692
- 0 0 30px rgba(255, 193, 7, 0.3) !important;
693
- }
694
-
695
- .primary-btn {
696
- background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%) !important;
697
- color: #000000 !important;
698
- border: none !important;
699
- border-radius: 12px !important;
700
- font-weight: 600 !important;
701
- padding: 0.75rem 1.5rem !important;
702
- font-size: 0.95rem !important;
703
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
704
- box-shadow:
705
- 0 4px 15px rgba(255, 193, 7, 0.3),
706
- 0 0 20px rgba(255, 193, 7, 0.2) !important;
707
- }
708
-
709
- .primary-btn:hover {
710
- transform: translateY(-2px) !important;
711
- box-shadow:
712
- 0 8px 25px rgba(255, 193, 7, 0.4),
713
- 0 0 30px rgba(255, 193, 7, 0.3) !important;
714
- }
715
-
716
- /* Enhanced Text inputs with glow */
717
- .gradio-textbox input, .gradio-textbox textarea {
718
- background: rgba(45, 45, 45, 0.8) !important;
719
- color: #ffffff !important;
720
- border: 2px solid rgba(255, 193, 7, 0.2) !important;
721
- border-radius: 12px !important;
722
- font-size: 0.95rem !important;
723
- padding: 0.75rem 1rem !important;
724
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
725
- backdrop-filter: blur(10px) !important;
726
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
727
- }
728
-
729
- .gradio-textbox input:focus, .gradio-textbox textarea:focus {
730
- border-color: rgba(255, 193, 7, 0.5) !important;
731
- box-shadow:
732
- 0 0 20px rgba(255, 193, 7, 0.2),
733
- inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
734
- outline: none !important;
735
- }
736
-
737
- /* Enhanced Processing indicator */
738
- .processing-indicator {
739
- background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.08));
740
- border: 2px solid rgba(255, 193, 7, 0.3);
741
- border-radius: 12px;
742
- padding: 1rem 1.5rem;
743
- margin: 1rem 0;
744
- color: #ffc107;
745
- text-align: center;
746
- font-weight: 500;
747
- backdrop-filter: blur(10px);
748
- box-shadow:
749
- 0 0 25px rgba(255, 193, 7, 0.1),
750
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
751
- animation: processingPulse 2s ease-in-out infinite;
752
- }
753
-
754
- @keyframes processingPulse {
755
- 0%, 100% { opacity: 1; }
756
- 50% { opacity: 0.8; }
757
- }
758
-
759
- /* Enhanced Input row styling */
760
- .input-row {
761
- display: flex !important;
762
- gap: 12px !important;
763
- align-items: end !important;
764
- }
765
-
766
- /* Message input */
767
- .message-input {
768
- flex: 1 !important;
769
- min-height: 48px !important;
770
- }
771
-
772
- /* Markdown content styling */
773
- .markdown-content {
774
- color: #e0e0e0 !important;
775
- line-height: 1.6 !important;
776
- font-size: 0.95rem !important;
777
- }
778
-
779
- .markdown-content h1, .markdown-content h2, .markdown-content h3 {
780
- color: #ffc107 !important;
781
- margin-top: 1.5rem !important;
782
- margin-bottom: 0.5rem !important;
783
- }
784
-
785
- .markdown-content code {
786
- background: rgba(255, 193, 7, 0.1) !important;
787
- color: #ffc107 !important;
788
- padding: 0.2rem 0.4rem !important;
789
- border-radius: 4px !important;
790
- }
791
-
792
- .markdown-content pre {
793
- background: rgba(0, 0, 0, 0.3) !important;
794
- border: 1px solid rgba(255, 193, 7, 0.2) !important;
795
- border-radius: 8px !important;
796
- padding: 1rem !important;
797
- margin: 1rem 0 !important;
798
- }
799
-
800
- /* Examples styling */
801
- .examples {
802
- background: rgba(45, 45, 45, 0.3) !important;
803
- border-radius: 12px !important;
804
- padding: 1rem !important;
805
- border: 1px solid rgba(255, 193, 7, 0.1) !important;
806
- backdrop-filter: blur(10px) !important;
807
- }
808
-
809
- /* Loading animation */
810
- @keyframes loading {
811
- 0% { transform: rotate(0deg); }
812
- 100% { transform: rotate(360deg); }
813
- }
814
-
815
- .loading {
816
- animation: loading 2s linear infinite;
817
- }
818
-
819
- /* Responsive design */
820
- @media (max-width: 768px) {
821
- .chat-container {
822
- padding: 1rem;
823
- }
824
-
825
- .header h1 {
826
- font-size: 1.5rem;
827
- }
828
-
829
- .gradio-chatbot {
830
- height: 300px !important;
831
- }
832
-
833
- .input-row {
834
- flex-direction: column !important;
835
- gap: 8px !important;
836
- }
837
- }
838
- """,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
839
  title="Agentic RAG Assistant"
840
  ) as iface:
841
 
@@ -879,7 +870,7 @@ def create_interface():
879
  - **LLMAgent**: Response generation
880
  - **CoordinatorAgent**: Workflow orchestration
881
 
882
- **✨ Features:**
883
  - Streaming responses
884
  - Multi-format support
885
  - Context-aware answers
@@ -896,14 +887,14 @@ def create_interface():
896
  elem_classes=["gradio-chatbot"],
897
  show_copy_button=True,
898
  type="messages",
899
- placeholder="🚀 Upload documents first, then start chatting! Ask me anything about your documents.",
900
  avatar_images=("👤", "🤖")
901
  )
902
 
903
  # Input area with improved layout
904
  with gr.Row(elem_classes=["input-row"]):
905
  msg_input = gr.Textbox(
906
- placeholder="💭 Ask about your documents...",
907
  label="Message",
908
  scale=4,
909
  elem_classes=["message-input"],
 
424
  with gr.Blocks(
425
  theme=gr.themes.Base(),
426
  css="""
427
+ /* Import Google Fonts for better typography */
428
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
429
+
430
+ /* Dark theme styling with enhanced visuals */
431
+ .gradio-container {
432
+ background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%) !important;
433
+ color: #ffffff !important; /* Ensure base text color is bright */
434
+ height: 100vh !important;
435
+ max-width: none !important;
436
+ padding: 0 !important;
437
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
438
+ }
439
+
440
+ /* Main container with animated background */
441
+ .main-container {
442
+ display: flex;
443
+ flex-direction: column;
444
+ height: 100vh;
445
+ background:
446
+ radial-gradient(circle at 20% 50%, rgba(255, 193, 7, 0.05) 0%, transparent 50%),
447
+ radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.05) 0%, transparent 50%),
448
+ radial-gradient(circle at 40% 80%, rgba(255, 87, 34, 0.03) 0%, transparent 50%),
449
+ linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
450
+ animation: backgroundShift 15s ease-in-out infinite alternate;
451
+ }
452
+
453
+ @keyframes backgroundShift {
454
+ 0% { filter: hue-rotate(0deg); }
455
+ 100% { filter: hue-rotate(10deg); }
456
+ }
457
+
458
+ /* Enhanced Header with glow */
459
+ .header {
460
+ background: rgba(255, 193, 7, 0.08);
461
+ border-bottom: 2px solid transparent;
462
+ border-image: linear-gradient(90deg, rgba(255, 193, 7, 0.5), rgba(0, 123, 255, 0.3)) 1;
463
+ padding: 1.5rem 2rem;
464
+ backdrop-filter: blur(20px);
465
+ box-shadow:
466
+ 0 4px 20px rgba(255, 193, 7, 0.1),
467
+ inset 0 1px 0 rgba(255, 255, 255, 0.1);
468
+ position: relative;
469
+ overflow: hidden;
470
+ }
471
+
472
+ .header::before {
473
+ content: '';
474
+ position: absolute;
475
+ top: 0;
476
+ left: -100%;
477
+ width: 100%;
478
+ height: 100%;
479
+ background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent);
480
+ animation: shimmer 3s ease-in-out infinite;
481
+ }
482
+
483
+ @keyframes shimmer {
484
+ 0% { left: -100%; }
485
+ 100% { left: 100%; }
486
+ }
487
+
488
+ .header h1 {
489
+ color: #ffc107;
490
+ margin: 0;
491
+ font-size: 2rem;
492
+ font-weight: 700;
493
+ text-shadow:
494
+ 0 0 10px rgba(255, 193, 7, 0.3),
495
+ 0 0 20px rgba(255, 193, 7, 0.2);
496
+ letter-spacing: -0.02em;
497
+ }
498
+
499
+ .header p {
500
+ color: #e0e0e0;
501
+ margin: 0.5rem 0 0 0;
502
+ font-size: 1rem;
503
+ font-weight: 400;
504
+ opacity: 0.9;
505
+ }
506
+
507
+ /* Enhanced Chat container */
508
+ .chat-container {
509
+ flex: 1;
510
+ display: flex;
511
+ flex-direction: column;
512
+ max-width: 1200px;
513
+ margin: 0 auto;
514
+ width: 100%;
515
+ padding: 2rem;
516
+ height: calc(100vh - 200px) !important;
517
+ gap: 1.5rem;
518
+ }
519
+
520
+ /* Enhanced Chatbot with glow effect */
521
+ .gradio-chatbot {
522
+ height: 400px !important;
523
+ max-height: 400px !important;
524
+ background: rgba(45, 45, 45, 0.4) !important;
525
+ border: 2px solid rgba(255, 193, 7, 0.2) !important;
526
+ border-radius: 20px !important;
527
+ margin-bottom: 1rem;
528
+ overflow-y: auto !important;
529
+ box-shadow:
530
+ 0 0 30px rgba(255, 193, 7, 0.15),
531
+ 0 8px 32px rgba(0, 0, 0, 0.3),
532
+ inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
533
+ backdrop-filter: blur(20px) !important;
534
+ position: relative;
535
+ animation: chatGlow 4s ease-in-out infinite alternate;
536
+ }
537
+
538
+ @keyframes chatGlow {
539
+ 0% {
540
  box-shadow:
541
  0 0 30px rgba(255, 193, 7, 0.15),
542
  0 8px 32px rgba(0, 0, 0, 0.3),
543
+ inset 0 1px 0 rgba(255, 255, 255, 0.05);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  }
545
+ 100% {
 
 
 
 
 
546
  box-shadow:
547
+ 0 0 40px rgba(255, 193, 7, 0.25),
548
+ 0 12px 40px rgba(0, 0, 0, 0.4),
549
+ inset 0 1px 0 rgba(255, 255, 255, 0.08);
550
  }
551
+ }
552
+
553
+ /* Enhanced chat messages */
554
+ .message {
555
+ background: rgba(255, 255, 255, 0.05) !important;
556
+ border-radius: 16px !important;
557
+ padding: 1rem 1.5rem !important;
558
+ margin: 0.75rem 0 !important;
559
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
560
+ backdrop-filter: blur(10px) !important;
561
+ font-size: 0.95rem !important;
562
+ line-height: 1.6 !important;
563
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
564
+ transition: all 0.3s ease !important;
565
+ color: #ffffff !important; /* Made brighter for all messages */
566
+ }
567
+
568
+ .message:hover {
569
+ transform: translateY(-1px) !important;
570
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
571
+ }
572
+
573
+ /* User message styling */
574
+ .message.user {
575
+ background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05)) !important;
576
+ border-color: rgba(255, 193, 7, 0.2) !important;
577
+ margin-left: 15% !important;
578
+ box-shadow:
579
+ 0 2px 10px rgba(255, 193, 7, 0.1),
580
+ inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
581
+ }
582
+
583
+ /* Assistant message styling - important for streaming text */
584
+ .message.assistant {
585
+ background: linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.04)) !important;
586
+ border-color: rgba(0, 123, 255, 0.2) !important;
587
+ margin-right: 15% !important;
588
+ box-shadow:
589
+ 0 2px 10px rgba(0, 123, 255, 0.1),
590
+ inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
591
+ color: #ffffff !important; /* Ensures generated text is bright white */
592
+ }
593
+
594
+ /* Enhanced Input area with glow */
595
+ .input-area {
596
+ background: rgba(45, 45, 45, 0.6);
597
+ border-radius: 20px;
598
+ padding: 1.5rem;
599
+ border: 2px solid rgba(255, 193, 7, 0.2);
600
+ backdrop-filter: blur(20px);
601
+ position: sticky;
602
+ bottom: 0;
603
+ box-shadow:
604
+ 0 0 25px rgba(255, 193, 7, 0.1),
605
+ 0 8px 32px rgba(0, 0, 0, 0.2),
606
+ inset 0 1px 0 rgba(255, 255, 255, 0.05);
607
+ animation: inputGlow 3s ease-in-out infinite alternate;
608
+ }
609
+
610
+ @keyframes inputGlow {
611
+ 0% {
612
  box-shadow:
613
  0 0 25px rgba(255, 193, 7, 0.1),
614
  0 8px 32px rgba(0, 0, 0, 0.2),
615
  inset 0 1px 0 rgba(255, 255, 255, 0.05);
 
616
  }
617
+ 100% {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
618
  box-shadow:
619
+ 0 0 35px rgba(255, 193, 7, 0.2),
620
+ 0 12px 40px rgba(0, 0, 0, 0.3),
621
+ inset 0 1px 0 rgba(255, 255, 255, 0.08);
622
  }
623
+ }
624
+
625
+ /* Enhanced File upload area */
626
+ .upload-area {
627
+ background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 193, 7, 0.04)) !important;
628
+ border: 2px dashed rgba(255, 193, 7, 0.4) !important;
629
+ border-radius: 16px !important;
630
+ padding: 1.5rem !important;
631
+ margin-bottom: 1.5rem !important;
632
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
633
+ backdrop-filter: blur(10px) !important;
634
+ box-shadow:
635
+ 0 0 20px rgba(255, 193, 7, 0.05),
636
+ inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
637
+ }
638
+
639
+ .upload-area:hover {
640
+ background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 193, 7, 0.06)) !important;
641
+ border-color: rgba(255, 193, 7, 0.6) !important;
642
+ box-shadow:
643
+ 0 0 30px rgba(255, 193, 7, 0.15),
644
+ inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
645
+ transform: translateY(-2px) !important;
646
+ }
647
+
648
+ /* Sidebar styling */
649
+ .sidebar {
650
+ background: rgba(30, 30, 30, 0.6) !important;
651
+ border-right: 2px solid rgba(255, 193, 7, 0.1) !important;
652
+ backdrop-filter: blur(15px) !important;
653
+ box-shadow:
654
+ inset -1px 0 0 rgba(255, 255, 255, 0.05),
655
+ 4px 0 20px rgba(0, 0, 0, 0.1) !important;
656
+ }
657
+
658
+ /* Enhanced buttons with glow effects */
659
+ .send-btn {
660
+ background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%) !important;
661
+ color: #000000 !important;
662
+ border: none !important;
663
+ border-radius: 12px !important;
664
+ font-weight: 600 !important;
665
+ min-height: 48px !important;
666
+ font-size: 0.95rem !important;
667
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
668
+ box-shadow:
669
+ 0 4px 15px rgba(255, 193, 7, 0.3),
670
+ 0 0 20px rgba(255, 193, 7, 0.2) !important;
671
+ position: relative;
672
+ overflow: hidden;
673
+ }
674
+
675
+ .send-btn::before {
676
+ content: '';
677
+ position: absolute;
678
+ top: 0;
679
+ left: -100%;
680
+ width: 100%;
681
+ height: 100%;
682
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
683
+ transition: left 0.5s;
684
+ }
685
+
686
+ .send-btn:hover::before {
687
+ left: 100%;
688
+ }
689
+
690
+ .send-btn:hover {
691
+ transform: translateY(-2px) !important;
692
+ box-shadow:
693
+ 0 8px 25px rgba(255, 193, 7, 0.4),
694
+ 0 0 30px rgba(255, 193, 7, 0.3) !important;
695
+ }
696
+
697
+ .primary-btn {
698
+ background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%) !important;
699
+ color: #000000 !important;
700
+ border: none !important;
701
+ border-radius: 12px !important;
702
+ font-weight: 600 !important;
703
+ padding: 0.75rem 1.5rem !important;
704
+ font-size: 0.95rem !important;
705
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
706
+ box-shadow:
707
+ 0 4px 15px rgba(255, 193, 7, 0.3),
708
+ 0 0 20px rgba(255, 193, 7, 0.2) !important;
709
+ }
710
+
711
+ .primary-btn:hover {
712
+ transform: translateY(-2px) !important;
713
+ box-shadow:
714
+ 0 8px 25px rgba(255, 193, 7, 0.4),
715
+ 0 0 30px rgba(255, 193, 7, 0.3) !important;
716
+ }
717
+
718
+ /* Enhanced Text inputs with glow */
719
+ .gradio-textbox input, .gradio-textbox textarea {
720
+ background: rgba(45, 45, 45, 0.8) !important;
721
+ color: #ffffff !important;
722
+ border: 2px solid rgba(255, 193, 7, 0.2) !important;
723
+ border-radius: 12px !important;
724
+ font-size: 0.95rem !important;
725
+ padding: 0.75rem 1rem !important;
726
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
727
+ backdrop-filter: blur(10px) !important;
728
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
729
+ }
730
+
731
+ .gradio-textbox input:focus, .gradio-textbox textarea:focus {
732
+ border-color: rgba(255, 193, 7, 0.5) !important;
733
+ box-shadow:
734
+ 0 0 20px rgba(255, 193, 7, 0.2),
735
+ inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
736
+ outline: none !important;
737
+ }
738
+
739
+ /* Enhanced Processing indicator */
740
+ .processing-indicator {
741
+ background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.08));
742
+ border: 2px solid rgba(255, 193, 7, 0.3);
743
+ border-radius: 12px;
744
+ padding: 1rem 1.5rem;
745
+ margin: 1rem 0;
746
+ color: #ffc107;
747
+ text-align: center;
748
+ font-weight: 500;
749
+ backdrop-filter: blur(10px);
750
+ box-shadow:
751
+ 0 0 25px rgba(255, 193, 7, 0.1),
752
+ inset 0 1px 0 rgba(255, 255, 255, 0.1);
753
+ animation: processingPulse 2s ease-in-out infinite;
754
+ }
755
+
756
+ @keyframes processingPulse {
757
+ 0%, 100% { opacity: 1; }
758
+ 50% { opacity: 0.8; }
759
+ }
760
+
761
+ /* Enhanced Input row styling */
762
+ .input-row {
763
+ display: flex !important;
764
+ gap: 12px !important;
765
+ align-items: end !important;
766
+ }
767
+
768
+ /* Message input */
769
+ .message-input {
770
+ flex: 1 !important;
771
+ min-height: 48px !important;
772
+ }
773
+
774
+ /* Markdown content styling - applies to text within gr.Markdown components */
775
+ .markdown-content {
776
+ color: #e0e0e0 !important; /* Made brighter for general markdown text */
777
+ line-height: 1.6 !important;
778
+ font-size: 0.95rem !important;
779
+ }
780
+
781
+ .markdown-content h1, .markdown-content h2, .markdown-content h3 {
782
+ color: #ffc107 !important;
783
+ margin-top: 1.5rem !important;
784
+ margin-bottom: 0.5rem !important;
785
+ }
786
+
787
+ .markdown-content code {
788
+ background: rgba(255, 193, 7, 0.1) !important;
789
+ color: #ffc107 !important;
790
+ padding: 0.2rem 0.4rem !important;
791
+ border-radius: 4px !important;
792
+ }
793
+
794
+ .markdown-content pre {
795
+ background: rgba(0, 0, 0, 0.3) !important;
796
+ border: 1px solid rgba(255, 193, 7, 0.2) !important;
797
+ border-radius: 8px !important;
798
+ padding: 1rem !important;
799
+ margin: 1rem 0 !important;
800
+ }
801
+
802
+ /* Examples styling */
803
+ .examples {
804
+ background: rgba(45, 45, 45, 0.3) !important;
805
+ border-radius: 12px !important;
806
+ padding: 1rem !important;
807
+ border: 1px solid rgba(255, 193, 7, 0.1) !important;
808
+ backdrop-filter: blur(10px) !important;
809
+ color: #e0e0e0 !important; /* Explicitly set for examples text */
810
+ }
811
+
812
+ /* General paragraph text and Gradio HTML components (for architecture text) */
813
+ .gradio-container p,
814
+ .gradio-container .gr-html {
815
+ color: #e0e0e0 !important; /* Ensures general text is visible */
816
+ }
817
+
818
+ /* Loading animation */
819
+ @keyframes loading {
820
+ 0% { transform: rotate(0deg); }
821
+ 100% { transform: rotate(360deg); }
822
+ }
823
+
824
+ .loading {
825
+ animation: loading 2s linear infinite;
826
+ }
827
+
828
+ /* Responsive design */
829
+ """,
830
  title="Agentic RAG Assistant"
831
  ) as iface:
832
 
 
870
  - **LLMAgent**: Response generation
871
  - **CoordinatorAgent**: Workflow orchestration
872
 
873
+ **Features:**
874
  - Streaming responses
875
  - Multi-format support
876
  - Context-aware answers
 
887
  elem_classes=["gradio-chatbot"],
888
  show_copy_button=True,
889
  type="messages",
890
+ placeholder="Upload documents , then start chatting! Ask me anything about your documents.",
891
  avatar_images=("👤", "🤖")
892
  )
893
 
894
  # Input area with improved layout
895
  with gr.Row(elem_classes=["input-row"]):
896
  msg_input = gr.Textbox(
897
+ placeholder="Ask about your documents...",
898
  label="Message",
899
  scale=4,
900
  elem_classes=["message-input"],