Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -780,49 +780,46 @@ def create_interface():
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
-
/*
|
784 |
-
|
785 |
-
margin-left: 15px !important;
|
786 |
width: 150px !important;
|
|
|
787 |
}
|
788 |
|
789 |
-
/* Hide
|
790 |
-
|
|
|
|
|
|
|
|
|
791 |
display: none !important;
|
792 |
}
|
793 |
|
794 |
-
/* Style the
|
795 |
-
|
796 |
height: 40px !important;
|
797 |
-
|
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
|
808 |
-
|
809 |
display: none !important;
|
810 |
}
|
811 |
|
812 |
-
/*
|
813 |
-
|
814 |
-
|
815 |
-
|
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 |
|
@@ -857,7 +854,7 @@ def create_interface():
|
|
857 |
file_upload = gr.File(
|
858 |
file_types=["image", "pdf", "doc", "docx"],
|
859 |
type="binary",
|
860 |
-
label="",
|
861 |
elem_classes=["file-upload"]
|
862 |
)
|
863 |
|
|
|
780 |
color: white !important;
|
781 |
}
|
782 |
|
783 |
+
/* Style the file upload to be more compact */
|
784 |
+
.file-upload {
|
|
|
785 |
width: 150px !important;
|
786 |
+
margin-left: 15px !important;
|
787 |
}
|
788 |
|
789 |
+
/* Hide file preview elements */
|
790 |
+
.file-upload .file-preview,
|
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 upload button */
|
799 |
+
.file-upload button {
|
800 |
height: 40px !important;
|
801 |
+
width: 100% !important;
|
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 the "or" text */
|
815 |
+
.file-upload .or {
|
816 |
display: none !important;
|
817 |
}
|
818 |
|
819 |
+
/* Make the container compact */
|
820 |
+
.file-upload [data-testid="block"] {
|
821 |
+
margin: 0 !important;
|
822 |
+
padding: 0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
}
|
824 |
"""
|
825 |
|
|
|
854 |
file_upload = gr.File(
|
855 |
file_types=["image", "pdf", "doc", "docx"],
|
856 |
type="binary",
|
857 |
+
label="Upload Document",
|
858 |
elem_classes=["file-upload"]
|
859 |
)
|
860 |
|