absiitr commited on
Commit
71d2c45
·
verified ·
1 Parent(s): e03f9c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -10
app.py CHANGED
@@ -41,7 +41,6 @@ st.set_page_config(
41
  st.markdown("""
42
  <style>
43
  /* 0. FORCE DARK THEME (OVERRIDES LIGHT MODE) */
44
- /* This forces the app background and text to always look dark */
45
  [data-testid="stAppViewContainer"] {
46
  background-color: #0e1117;
47
  color: #fafafa;
@@ -51,7 +50,7 @@ st.markdown("""
51
  color: #fafafa;
52
  }
53
  /* Force text colors for standard elements */
54
- p, h1, h2, h3, h4, h5, h6, li, span {
55
  color: #fafafa !important;
56
  }
57
 
@@ -60,7 +59,7 @@ html, body {
60
  overflow: hidden;
61
  height: 100%;
62
  margin: 0;
63
- background-color: #0e1117 !important; /* Fallback */
64
  }
65
 
66
  /* 2. HIDE DEFAULT STREAMLIT ELEMENTS & SIDEBAR TOGGLES */
@@ -135,8 +134,8 @@ section[data-testid="stSidebar"] > div > div:first-child {
135
  border-radius: 8px;
136
  font-weight: 600;
137
  margin-bottom: 6px;
138
- background-color: #2d3748; /* Force dark button bg */
139
- color: white; /* Force white text */
140
  border: 1px solid #4a5568;
141
  }
142
  [data-testid="stSidebar"] .stButton button:hover {
@@ -145,10 +144,26 @@ section[data-testid="stSidebar"] > div > div:first-child {
145
  color: white;
146
  }
147
 
148
- /* 7. HIDE UPLOADED FILE LIST & NAME */
149
- [data-testid='stFileUploaderFile'] {
150
- display: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
 
152
  section[data-testid="stFileUploader"] ul {
153
  display: none;
154
  }
@@ -185,7 +200,7 @@ section[data-testid="stFileUploader"] small {
185
  font-weight: 800;
186
  margin: 0;
187
  line-height: 1.2;
188
- color: #ffffff !important; /* Ensure white text */
189
  }
190
  .creator-text {
191
  font-size: 1rem;
@@ -202,7 +217,6 @@ section[data-testid="stFileUploader"] small {
202
  border: none;
203
  padding: 0;
204
  }
205
- /* Force text input to look dark */
206
  [data-testid="stTextInput"] input {
207
  color: white;
208
  background-color: #2d3748;
 
41
  st.markdown("""
42
  <style>
43
  /* 0. FORCE DARK THEME (OVERRIDES LIGHT MODE) */
 
44
  [data-testid="stAppViewContainer"] {
45
  background-color: #0e1117;
46
  color: #fafafa;
 
50
  color: #fafafa;
51
  }
52
  /* Force text colors for standard elements */
53
+ p, h1, h2, h3, h4, h5, h6, li, span, div, label {
54
  color: #fafafa !important;
55
  }
56
 
 
59
  overflow: hidden;
60
  height: 100%;
61
  margin: 0;
62
+ background-color: #0e1117 !important;
63
  }
64
 
65
  /* 2. HIDE DEFAULT STREAMLIT ELEMENTS & SIDEBAR TOGGLES */
 
134
  border-radius: 8px;
135
  font-weight: 600;
136
  margin-bottom: 6px;
137
+ background-color: #2d3748;
138
+ color: white;
139
  border: 1px solid #4a5568;
140
  }
141
  [data-testid="stSidebar"] .stButton button:hover {
 
144
  color: white;
145
  }
146
 
147
+ /* 7. UPLOADED FILE FIXES (FORCE DARK DROPDOWN) */
148
+ /* This fixes the white box issue seen in your screenshot */
149
+ [data-testid="stFileUploader"] {
150
+ background-color: #262730; /* Dark background matching sidebar */
151
+ border-radius: 10px;
152
+ padding: 10px;
153
+ }
154
+ [data-testid="stFileUploader"] section {
155
+ background-color: #262730 !important;
156
+ color: #fafafa !important;
157
+ }
158
+ [data-testid="stFileUploader"] button {
159
+ color: #fafafa !important; /* Browse files button text */
160
+ border-color: #4a5568 !important;
161
+ }
162
+ [data-testid="stFileUploader"] .uploadedFile {
163
+ background-color: #2d3748 !important;
164
+ color: white !important;
165
  }
166
+ /* Hiding file list details if needed, but keeping the uploader visible */
167
  section[data-testid="stFileUploader"] ul {
168
  display: none;
169
  }
 
200
  font-weight: 800;
201
  margin: 0;
202
  line-height: 1.2;
203
+ color: #ffffff !important;
204
  }
205
  .creator-text {
206
  font-size: 1rem;
 
217
  border: none;
218
  padding: 0;
219
  }
 
220
  [data-testid="stTextInput"] input {
221
  color: white;
222
  background-color: #2d3748;