Update app.py
Browse files
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;
|
842 |
border-color: #FF8C00 !important;
|
843 |
color: white !important;
|
844 |
}
|
845 |
|
846 |
-
/* Style the file upload
|
847 |
.file-upload {
|
848 |
-
|
849 |
-
|
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 |
-
/*
|
856 |
-
.file-upload
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
861 |
border-radius: 4px !important;
|
862 |
-
color: #333 !important;
|
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 |
-
|
869 |
-
|
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 |
-
|
876 |
-
|
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 |
-
/*
|
889 |
-
.file-upload
|
890 |
-
|
891 |
-
|
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 |
|