Update app.py
Browse files
app.py
CHANGED
@@ -780,46 +780,49 @@ def create_interface():
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
-
/*
|
784 |
-
|
785 |
-
width: 150px !important;
|
786 |
margin-left: 15px !important;
|
|
|
787 |
}
|
788 |
|
789 |
-
/* Hide
|
790 |
-
|
791 |
-
.file-upload p:not(.file-upload p:first-child),
|
792 |
-
.file-upload svg,
|
793 |
-
.file-upload [data-testid="chunkFileDropArea"],
|
794 |
-
.file-upload .file-drop {
|
795 |
display: none !important;
|
796 |
}
|
797 |
|
798 |
-
/* Style the
|
799 |
-
|
800 |
height: 40px !important;
|
801 |
-
|
802 |
background-color: #f0f0f0 !important;
|
803 |
border: 1px solid #d9d9d9 !important;
|
804 |
border-radius: 4px !important;
|
805 |
-
color: #333 !important;
|
806 |
-
font-size: 14px !important;
|
807 |
display: flex !important;
|
808 |
align-items: center !important;
|
809 |
justify-content: center !important;
|
810 |
-
margin: 0 !important;
|
811 |
padding: 0 !important;
|
812 |
}
|
813 |
|
814 |
-
/* Hide
|
815 |
-
|
816 |
display: none !important;
|
817 |
}
|
818 |
|
819 |
-
/*
|
820 |
-
|
821 |
-
|
822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
}
|
824 |
"""
|
825 |
|
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
+
/* Target the file component container */
|
784 |
+
[data-testid="file"] {
|
|
|
785 |
margin-left: 15px !important;
|
786 |
+
width: 150px !important;
|
787 |
}
|
788 |
|
789 |
+
/* Hide the File label */
|
790 |
+
[data-testid="file"] > label {
|
|
|
|
|
|
|
|
|
791 |
display: none !important;
|
792 |
}
|
793 |
|
794 |
+
/* Style the drop zone to look like a button */
|
795 |
+
[data-testid="file"] [data-testid="drop-region"] {
|
796 |
height: 40px !important;
|
797 |
+
min-height: 40px !important;
|
798 |
background-color: #f0f0f0 !important;
|
799 |
border: 1px solid #d9d9d9 !important;
|
800 |
border-radius: 4px !important;
|
|
|
|
|
801 |
display: flex !important;
|
802 |
align-items: center !important;
|
803 |
justify-content: center !important;
|
|
|
804 |
padding: 0 !important;
|
805 |
}
|
806 |
|
807 |
+
/* Hide all elements inside except our custom text */
|
808 |
+
[data-testid="file"] [data-testid="drop-region"] > * {
|
809 |
display: none !important;
|
810 |
}
|
811 |
|
812 |
+
/* Add custom button text */
|
813 |
+
[data-testid="file"] [data-testid="drop-region"]::before {
|
814 |
+
content: "Upload Document" !important;
|
815 |
+
font-size: 14px !important;
|
816 |
+
color: #333 !important;
|
817 |
+
}
|
818 |
+
|
819 |
+
/* Hide the drag text area, preview area, etc. */
|
820 |
+
[data-testid="file"] [data-testid="download-button"],
|
821 |
+
[data-testid="file"] [data-testid="clear-button"],
|
822 |
+
[data-testid="file"] [data-testid="gallery"],
|
823 |
+
[data-testid="file"] [data-testid="preview"],
|
824 |
+
[data-testid="file"] p {
|
825 |
+
display: none !important;
|
826 |
}
|
827 |
"""
|
828 |
|