prernajeet14 commited on
Commit
aeacf3a
Β·
verified Β·
1 Parent(s): 0ed4377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -124
app.py CHANGED
@@ -552,69 +552,11 @@ gradio-chatbot {
552
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2) !important;
553
  }
554
 
555
- /* CHAT CONTAINER - MUCH LARGER */
556
- .chat-main {
557
- flex: 1 !important;
558
- display: flex !important;
559
- flex-direction: column !important;
560
- height: 100% !important;
561
- overflow: hidden !important;
562
- }
563
-
564
- /* CHAT MESSAGES - MUCH BIGGER AREA */
565
- .chat-messages {
566
- flex: 1 !important;
567
- overflow-y: auto !important;
568
- padding: 1.5rem !important;
569
- height: 0 !important;
570
- min-height: 500px !important;
571
- }
572
-
573
- /* LARGER CHATBOT */
574
- .chatbot {
575
- height: 600px !important;
576
- min-height: 600px !important;
577
- }
578
-
579
- .chat-input-area {
580
- flex-shrink: 0 !important;
581
- background: #1a1a1a !important;
582
- border-top: 1px solid #262626 !important;
583
- padding: 1.5rem !important;
584
- max-height: 300px !important;
585
- }
586
-
587
- /* File Upload Styling */
588
- .file-upload-area {
589
- background: #1a1a1a !important;
590
- border: 1px dashed #404040 !important;
591
- border-radius: 8px !important;
592
- padding: 1rem !important;
593
- margin-bottom: 1rem !important;
594
- transition: all 0.3s ease !important;
595
- }
596
-
597
  .file-upload-area:hover {
598
  border-color: #dc2626 !important;
599
  background: #262626 !important;
600
  }
601
 
602
- /* Input Styling - Larger */
603
- .message-input {
604
- background: #262626 !important;
605
- border: 1px solid #404040 !important;
606
- border-radius: 8px !important;
607
- color: #ffffff !important;
608
- padding: 1rem !important;
609
- font-size: 0.95rem !important;
610
- line-height: 1.4 !important;
611
- resize: vertical !important;
612
- transition: all 0.3s ease !important;
613
- width: 100% !important;
614
- margin-bottom: 1rem !important;
615
- min-height: 80px !important;
616
- }
617
-
618
  .message-input:focus {
619
  outline: none !important;
620
  border-color: #dc2626 !important;
@@ -625,14 +567,6 @@ gradio-chatbot {
625
  color: #6b7280 !important;
626
  }
627
 
628
- /* Button Row */
629
- .button-row {
630
- display: flex !important;
631
- gap: 1rem !important;
632
- align-items: center !important;
633
- justify-content: flex-end !important;
634
- }
635
-
636
  /* Buttons - Larger */
637
  .primary-button {
638
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
@@ -866,67 +800,66 @@ with gr.Blocks(css=desktop_css, title="Coding Copilot Pro - Desktop", theme=gr.t
866
  </div>
867
  """)
868
 
869
- # Right Chat Container - MUCH LARGER and properly aligned
870
- # Right Chat Container - MUCH LARGER and properly aligned
871
- with gr.Column(elem_classes=["desktop-chat"], scale=1, visible=True):
872
-
873
- with gr.Column(elem_classes=["chat-main"], visible=True):
874
- # MUCH LARGER Chat messages area
875
- chatbot = gr.Chatbot(
876
- height=600,
877
- show_label=False,
878
- container=True,
879
- bubble_full_width=False,
880
- avatar_images=("πŸ‘¨β€πŸ’»", "πŸ€–"),
881
- elem_classes=["chat-messages", "chatbot"],
882
- visible=True
883
- )
884
-
885
- # Input area at bottom - better organized
886
- with gr.Column(elem_classes=["chat-input-area"], visible=True):
887
- # Download status and file
888
- download_status = gr.HTML("", visible=True)
889
- download_file = gr.File(
890
- label="πŸ“₯ Download Generated Code",
891
- visible=False,
892
- elem_classes=["download-section"]
893
- )
894
-
895
- # File upload - better positioned
896
- files = gr.File(
897
- label="πŸ“Ž Upload Code Files (.py, .ipynb)",
898
- file_count="multiple",
899
- file_types=[".py", ".ipynb"],
900
- container=True,
901
- elem_classes=["file-upload-area"],
902
- visible=True
903
- )
904
-
905
- # LARGER Message input
906
- msg = gr.Textbox(
907
- label="",
908
- placeholder="Describe what you want to build, analyze, or improve... Type 'continue' to extend previous code.",
909
- show_label=False,
910
- lines=3,
911
- max_lines=6,
912
- elem_classes=["message-input"],
913
- visible=True
914
- )
915
 
916
- # Button row - better spaced
917
- with gr.Row(elem_classes=["button-row"], visible=True):
918
- clear = gr.Button(
919
- "CLEAR",
920
- variant="secondary",
921
- elem_classes=["secondary-button"],
922
- visible=True
923
- )
924
- submit = gr.Button(
925
- "SEND",
926
- variant="primary",
927
- elem_classes=["primary-button"],
928
  visible=True
929
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
 
931
  # Hidden state
932
  chat_history = gr.State([])
 
552
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2) !important;
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  .file-upload-area:hover {
556
  border-color: #dc2626 !important;
557
  background: #262626 !important;
558
  }
559
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  .message-input:focus {
561
  outline: none !important;
562
  border-color: #dc2626 !important;
 
567
  color: #6b7280 !important;
568
  }
569
 
 
 
 
 
 
 
 
 
570
  /* Buttons - Larger */
571
  .primary-button {
572
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
 
800
  </div>
801
  """)
802
 
803
+ # Right Chat Container - PROPERLY INDENTED AND FIXED
804
+ with gr.Column(elem_classes=["desktop-chat"], scale=1, visible=True):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
805
 
806
+ with gr.Column(elem_classes=["chat-main"], visible=True):
807
+ # MUCH LARGER Chat messages area
808
+ chatbot = gr.Chatbot(
809
+ height=600,
810
+ show_label=False,
811
+ container=True,
812
+ type='messages',
813
+ avatar_images=("πŸ‘¨β€πŸ’»", "πŸ€–"),
814
+ elem_classes=["chat-messages", "chatbot"],
 
 
 
815
  visible=True
816
  )
817
+
818
+ # Input area at bottom - better organized
819
+ with gr.Column(elem_classes=["chat-input-area"], visible=True):
820
+ # Download status and file
821
+ download_status = gr.HTML("", visible=True)
822
+ download_file = gr.File(
823
+ label="πŸ“₯ Download Generated Code",
824
+ visible=False,
825
+ elem_classes=["download-section"]
826
+ )
827
+
828
+ # File upload - better positioned
829
+ files = gr.File(
830
+ label="πŸ“Ž Upload Code Files (.py, .ipynb)",
831
+ file_count="multiple",
832
+ file_types=[".py", ".ipynb"],
833
+ container=True,
834
+ elem_classes=["file-upload-area"],
835
+ visible=True
836
+ )
837
+
838
+ # LARGER Message input
839
+ msg = gr.Textbox(
840
+ label="",
841
+ placeholder="Describe what you want to build, analyze, or improve... Type 'continue' to extend previous code.",
842
+ show_label=False,
843
+ lines=3,
844
+ max_lines=6,
845
+ elem_classes=["message-input"],
846
+ visible=True
847
+ )
848
+
849
+ # Button row - better spaced
850
+ with gr.Row(elem_classes=["button-row"], visible=True):
851
+ clear = gr.Button(
852
+ "CLEAR",
853
+ variant="secondary",
854
+ elem_classes=["secondary-button"],
855
+ visible=True
856
+ )
857
+ submit = gr.Button(
858
+ "SEND",
859
+ variant="primary",
860
+ elem_classes=["primary-button"],
861
+ visible=True
862
+ )
863
 
864
  # Hidden state
865
  chat_history = gr.State([])