Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -780,59 +780,48 @@ def create_interface():
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
-
/*
|
784 |
-
|
785 |
-
height: 40px !important;
|
786 |
-
display: flex !important;
|
787 |
-
align-items: center !important;
|
788 |
-
justify-content: center !important;
|
789 |
-
background-color: #f0f0f0 !important;
|
790 |
-
border: 1px solid #d9d9d9 !important;
|
791 |
-
border-radius: 4px !important;
|
792 |
margin-left: 15px !important;
|
793 |
width: 150px !important;
|
794 |
-
position: relative !important;
|
795 |
-
overflow: hidden !important;
|
796 |
}
|
797 |
|
798 |
-
/* Style the upload button
|
799 |
-
|
|
|
|
|
|
|
|
|
800 |
display: flex !important;
|
801 |
align-items: center !important;
|
802 |
justify-content: center !important;
|
803 |
-
|
804 |
-
width: 100% !important;
|
805 |
}
|
806 |
|
807 |
-
/* Hide
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
display: none !important;
|
812 |
}
|
813 |
|
814 |
-
/*
|
815 |
-
|
816 |
-
|
817 |
position: absolute !important;
|
818 |
-
|
819 |
-
|
820 |
-
width: 100% !important;
|
821 |
-
height: 100% !important;
|
822 |
-
opacity: 0 !important;
|
823 |
}
|
824 |
|
825 |
-
/*
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
pointer-events: none !important;
|
830 |
}
|
831 |
|
832 |
-
/*
|
833 |
-
|
834 |
-
display:
|
835 |
-
align-items: center !important;
|
836 |
}
|
837 |
"""
|
838 |
|
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
+
/* Target the file upload component */
|
784 |
+
[data-testid="file"] {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
margin-left: 15px !important;
|
786 |
width: 150px !important;
|
|
|
|
|
787 |
}
|
788 |
|
789 |
+
/* Style the file upload button to match original design */
|
790 |
+
[data-testid="file"] [data-testid="block"] > div:first-child {
|
791 |
+
height: 40px !important;
|
792 |
+
background-color: #f0f0f0 !important;
|
793 |
+
border: 1px solid #d9d9d9 !important;
|
794 |
+
border-radius: 4px !important;
|
795 |
display: flex !important;
|
796 |
align-items: center !important;
|
797 |
justify-content: center !important;
|
798 |
+
text-align: center !important;
|
|
|
799 |
}
|
800 |
|
801 |
+
/* Hide the drop area text and icon */
|
802 |
+
[data-testid="file"] [data-testid="block"] svg,
|
803 |
+
[data-testid="file"] [data-testid="block"] p,
|
804 |
+
[data-testid="file"] [data-testid="block"] > div:not(:first-child) {
|
805 |
display: none !important;
|
806 |
}
|
807 |
|
808 |
+
/* Add custom text */
|
809 |
+
[data-testid="file"] [data-testid="block"]::before {
|
810 |
+
content: "Upload Document" !important;
|
811 |
position: absolute !important;
|
812 |
+
z-index: 10 !important;
|
813 |
+
pointer-events: none !important;
|
|
|
|
|
|
|
814 |
}
|
815 |
|
816 |
+
/* Hide the existing text without breaking functionality */
|
817 |
+
[data-testid="file"] [data-testid="block"] span {
|
818 |
+
opacity: 0 !important;
|
819 |
+
height: 0 !important;
|
|
|
820 |
}
|
821 |
|
822 |
+
/* Hide the "or" text that appears */
|
823 |
+
[data-testid="file"] .or {
|
824 |
+
display: none !important;
|
|
|
825 |
}
|
826 |
"""
|
827 |
|