ApsidalSolid4 commited on
Commit
67d8613
·
verified ·
1 Parent(s): 91e7b1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -35
app.py CHANGED
@@ -838,58 +838,51 @@ def create_interface():
838
  # Custom CSS for the interface
839
  css = """
840
  #analyze-btn {
841
- background-color: #FF8C00 !important; /* Keep your analyze button style */
842
  border-color: #FF8C00 !important;
843
  color: white !important;
844
  }
845
 
846
- /* Style the file upload component container */
847
  .file-upload {
848
- min-width: 150px !important; /* Set a minimum width */
849
- max-width: 200px !important; /* Set a maximum width */
850
- margin-left: 15px !important; /* Keep the margin */
851
- flex-grow: 0 !important; /* Prevent it from expanding too much */
852
- overflow: hidden; /* Hide any overflowing default elements */
853
  }
854
 
855
- /* Style the actual button inside the file component */
856
- .file-upload > div > button.secondary { /* More specific selector for the button */
857
- height: 40px !important; /* Match the desired height */
858
- width: 100% !important; /* Make button fill the container width */
859
- background-color: #e0e0e0 !important; /* A cleaner light grey */
860
- border: 1px solid #bdbdbd !important; /* A slightly darker border */
 
 
 
 
 
 
 
 
 
861
  border-radius: 4px !important;
862
- color: #333 !important; /* Dark grey text for readability */
863
  font-size: 14px !important;
864
- font-weight: 500; /* Slightly bolder text */
865
  display: flex !important;
866
  align-items: center !important;
867
  justify-content: center !important;
868
- padding: 0 10px !important; /* Horizontal padding */
869
- text-align: center;
870
- line-height: normal !important; /* Use normal line height */
871
- box-shadow: none !important; /* Remove default shadows */
872
- transition: background-color 0.2s ease; /* Add a hover effect */
873
  }
874
 
875
- .file-upload > div > button.secondary:hover {
876
- background-color: #d5d5d5 !important; /* Darken slightly on hover */
877
- }
878
-
879
-
880
- /* Hide unnecessary default text elements within the file component */
881
- .file-upload > div > div[data-testid="block-label"], /* Hide the block label */
882
- .file-upload > div > div > p, /* Hide paragraphs like 'or Drag-and-Drop' */
883
- .file-upload > div > div > .or /* Hide the 'or' text */
884
- {
885
  display: none !important;
886
  }
887
 
888
- /* Clean up the styling of the area containing the button */
889
- .file-upload > div > div > .w-full {
890
- padding: 0 !important; /* Remove padding */
891
- border: none !important; /* Remove border */
892
- background: none !important; /* Remove any background */
893
  }
894
  """
895
 
 
838
  # Custom CSS for the interface
839
  css = """
840
  #analyze-btn {
841
+ background-color: #FF8C00 !important;
842
  border-color: #FF8C00 !important;
843
  color: white !important;
844
  }
845
 
846
+ /* Style the file upload to be more compact */
847
  .file-upload {
848
+ width: 150px !important;
849
+ margin-left: 15px !important;
 
 
 
850
  }
851
 
852
+ /* Hide file preview elements */
853
+ .file-upload .file-preview,
854
+ .file-upload p:not(.file-upload p:first-child),
855
+ .file-upload svg,
856
+ .file-upload [data-testid="chunkFileDropArea"],
857
+ .file-upload .file-drop {
858
+ display: none !important;
859
+ }
860
+
861
+ /* Style the upload button */
862
+ .file-upload button {
863
+ height: 40px !important;
864
+ width: 100% !important;
865
+ background-color: #f0f0f0 !important;
866
+ border: 1px solid #d9d9d9 !important;
867
  border-radius: 4px !important;
868
+ color: #333 !important;
869
  font-size: 14px !important;
 
870
  display: flex !important;
871
  align-items: center !important;
872
  justify-content: center !important;
873
+ margin: 0 !important;
874
+ padding: 0 !important;
 
 
 
875
  }
876
 
877
+ /* Hide the "or" text */
878
+ .file-upload .or {
 
 
 
 
 
 
 
 
879
  display: none !important;
880
  }
881
 
882
+ /* Make the container compact */
883
+ .file-upload [data-testid="block"] {
884
+ margin: 0 !important;
885
+ padding: 0 !important;
 
886
  }
887
  """
888