ahmadsanafarooq commited on
Commit
3fb3f80
·
verified ·
1 Parent(s): 516ec70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +77 -60
app.py CHANGED
@@ -1657,81 +1657,98 @@ def show_main_app():
1657
  }
1658
 
1659
 
1660
- * File Uploader */
1661
- /* Modern card-style file uploader */
1662
  [data-testid="stFileUploaderDropzone"] {
1663
- border-radius: 20px;
1664
- border: none;
1665
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
1666
- padding: 30px;
1667
- box-shadow: 0 10px 30px rgba(0,0,0,0.2);
1668
- transition: all 0.3s ease;
1669
- margin-bottom: 2rem;
1670
- position: relative;
1671
- overflow: hidden;
1672
- }
1673
 
1674
  [data-testid="stFileUploaderDropzone"]:hover {
1675
- transform: translateY(-5px);
1676
- box-shadow: 0 15px 40px rgba(0,0,0,0.3);
1677
- }
1678
-
1679
- [data-testid="stFileUploaderDropzone"]:before {
1680
- content: '';
1681
- position: absolute;
1682
- top: 0;
1683
- left: 0;
1684
- right: 0;
1685
- bottom: 0;
1686
- background: rgba(255,255,255,0.1);
1687
- opacity: 0;
1688
- transition: opacity 0.3s ease;
1689
- }
1690
-
1691
- [data-testid="stFileUploaderDropzone"]:hover:before {
1692
- opacity: 1;
1693
- }
1694
- /* Force ALL text inside file uploader dropzone to black */
1695
  [data-testid="stFileUploaderDropzone"] *,
1696
  [data-testid="stFileUploaderDropzone"] p,
1697
  [data-testid="stFileUploaderDropzone"] span,
1698
- [data-testid="stFileUploaderDropzone"] div {
1699
- color: black !important;
1700
- -webkit-text-fill-color: black !important;
1701
- opacity: 1 !important;
1702
- white-space: normal !important;
1703
- word-break: break-word !important;
1704
- font-weight: normal !important;
1705
  }
1706
- /* Specific text within the file uploader (e.g., "Drag and drop file here") */
 
1707
  [data-testid="stFileUploaderDropzone"] > div > div > div:nth-child(2) > div:first-child {
1708
- color: black !important;
1709
  }
 
1710
  [data-testid="stFileUploaderDropzone"] > div > div > div > span {
1711
- color: black !important;
1712
  }
1713
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1714
  [data-testid="stFileUploaderFileName"] {
1715
- font-size: 0.95em;
1716
- color: #495057;
1717
- margin-top: 10px;
1718
- word-break: break-all;
 
 
 
 
1719
  }
 
1720
  [data-testid="stFileUploaderFile"] {
1721
- background-color: #e9ecef;
1722
- border-radius: 8px;
1723
- padding: 8px 12px;
1724
- margin-top: 10px;
1725
- box-shadow: 0 2px 5px rgba(0,0,0,0.05);
1726
- }
1727
- /*file label */
1728
- [data-testid="stFileUploader"] label {
1729
- color: black !important;
1730
- -webkit-text-fill-color: black !important;
1731
- opacity: 1 !important;
1732
- font-weight: 600; /* Often labels are a bit bolder */
1733
- margin-bottom: 0.5rem; /* Add a little space below the label */
1734
- }
 
 
 
1735
 
1736
  /* Information, Success, Error, Warning Boxes */
1737
  [data-testid="stAlert"] {
 
1657
  }
1658
 
1659
 
1660
+ /* File Uploader with White Text */
 
1661
  [data-testid="stFileUploaderDropzone"] {
1662
+ border-radius: 12px;
1663
+ border: 2px dashed #a0a8b4;
1664
+ background-color: #2c3e50; /* Dark background to contrast with white text */
1665
+ padding: 25px;
1666
+ transition: border-color 0.3s ease, background-color 0.3s ease;
1667
+ margin-bottom: 1.5rem;
1668
+ }
 
 
 
1669
 
1670
  [data-testid="stFileUploaderDropzone"]:hover {
1671
+ border-color: #5d6dbe;
1672
+ background-color: #34495e; /* Slightly lighter on hover */
1673
+ }
1674
+
1675
+ /* Force ALL text inside file uploader dropzone to WHITE */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1676
  [data-testid="stFileUploaderDropzone"] *,
1677
  [data-testid="stFileUploaderDropzone"] p,
1678
  [data-testid="stFileUploaderDropzone"] span,
1679
+ [data-testid="stFileUploaderDropzone"] div,
1680
+ [data-testid="stFileUploaderDropzone"] small {
1681
+ color: white !important;
1682
+ -webkit-text-fill-color: white !important;
1683
+ opacity: 1 !important;
1684
+ font-weight: normal !important;
 
1685
  }
1686
+
1687
+ /* Specific targeting for drag and drop text */
1688
  [data-testid="stFileUploaderDropzone"] > div > div > div:nth-child(2) > div:first-child {
1689
+ color: white !important;
1690
  }
1691
+
1692
  [data-testid="stFileUploaderDropzone"] > div > div > div > span {
1693
+ color: white !important;
1694
  }
1695
 
1696
+ /* Style the Browse files button with white text */
1697
+ [ data-testid="stFileUploaderDropzone"] button {
1698
+ background-color: #5d6dbe !important;
1699
+ color: white !important;
1700
+ border: none !important;
1701
+ border-radius: 8px !important;
1702
+ padding: 10px 20px !important;
1703
+ font-weight: bold !important;
1704
+ transition: all 0.3s ease !important;
1705
+ }
1706
+
1707
+ [data-testid="stFileUploaderDropzone"] button:hover {
1708
+ background-color: #4a5c9d !important;
1709
+ transform: translateY(-2px) !important;
1710
+ box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
1711
+ }
1712
+
1713
+ /* File uploader label (outside the dropzone) */
1714
+ [data-testid="stFileUploader"] label {
1715
+ color: white !important;
1716
+ -webkit-text-fill-color: white !important;
1717
+ opacity: 1 !important;
1718
+ font-weight: 600 !important;
1719
+ margin-bottom: 0.5rem !important;
1720
+ }
1721
+
1722
+ /* Uploaded file names */
1723
  [data-testid="stFileUploaderFileName"] {
1724
+ font-size: 0.95em;
1725
+ color: white !important;
1726
+ -webkit-text-fill-color: white !important;
1727
+ margin-top: 10px;
1728
+ word-break: break-all;
1729
+ background-color: rgba(255,255,255,0.1) !important;
1730
+ padding: 8px 12px !important;
1731
+ border-radius: 6px !important;
1732
  }
1733
+
1734
  [data-testid="stFileUploaderFile"] {
1735
+ background-color: rgba(255,255,255,0.1) !important;
1736
+ border-radius: 8px;
1737
+ padding: 8px 12px;
1738
+ margin-top: 10px;
1739
+ box-shadow: 0 2px 5px rgba(0,0,0,0.05);
1740
+ }
1741
+
1742
+ /* Style the cloud upload icon to be white */
1743
+ [data-testid="stFileUploaderDropzone"] svg {
1744
+ fill: white !important;
1745
+ color: white !important;
1746
+ }
1747
+
1748
+ [data-testid="stFileUploaderDropzone"] svg path {
1749
+ fill: white !important;
1750
+ stroke: white !important;
1751
+ }
1752
 
1753
  /* Information, Success, Error, Warning Boxes */
1754
  [data-testid="stAlert"] {