Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1241,17 +1241,16 @@ def show_main_app():
|
|
| 1241 |
}
|
| 1242 |
|
| 1243 |
/* Selectbox (Dropdown) */
|
| 1244 |
-
|
|
|
|
| 1245 |
border-radius: 10px;
|
| 1246 |
border: 1px solid #ced4da;
|
| 1247 |
-
padding: 0px 15px; /* Adjust padding significantly to let content control height */
|
| 1248 |
-
font-size: 1.05em;
|
| 1249 |
background-color: #fcfcfc;
|
| 1250 |
box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
|
| 1251 |
-
|
| 1252 |
-
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
}
|
| 1256 |
.stSelectbox>label {
|
| 1257 |
font-weight: 600;
|
|
@@ -1259,35 +1258,37 @@ def show_main_app():
|
|
| 1259 |
margin-bottom: 0.6rem;
|
| 1260 |
}
|
| 1261 |
/* FIX: Selectbox selected value text color and ensure it fits properly */
|
| 1262 |
-
|
| 1263 |
-
color: black !important; /*
|
| 1264 |
-
flex-grow: 1; /* Allow
|
| 1265 |
-
|
| 1266 |
-
|
| 1267 |
-
|
| 1268 |
-
|
| 1269 |
-
background-color: transparent; /* Ensure
|
| 1270 |
-
border: none; /* Remove default input
|
| 1271 |
-
outline: none; /* Remove outline on focus */
|
|
|
|
| 1272 |
}
|
| 1273 |
|
| 1274 |
/* FIX: Dropdown arrow color and visibility */
|
| 1275 |
/* Target the button containing the SVG icon for the dropdown */
|
| 1276 |
[data-testid="stSelectbox"] button {
|
| 1277 |
background-color: transparent !important; /* Ensure button background is transparent */
|
| 1278 |
-
color: black !important; /* Fallback for any text in button */
|
| 1279 |
border: none !important; /* Remove button border */
|
| 1280 |
-
padding: 0 5px; /*
|
| 1281 |
-
margin-left: auto; /* Push the arrow to the right */
|
| 1282 |
-
display: flex; /* Use flex for centering if icon is inside */
|
| 1283 |
-
align-items: center; /* Vertically center the icon */
|
| 1284 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
| 1285 |
}
|
| 1286 |
/* Target the SVG icon itself */
|
| 1287 |
[data-testid="stSelectbox"] svg {
|
| 1288 |
fill: black !important; /* Force the SVG icon to be black */
|
| 1289 |
color: black !important; /* Fallback for some SVG types */
|
| 1290 |
-
font-size: 1.
|
|
|
|
|
|
|
| 1291 |
}
|
| 1292 |
/* Specific path inside SVG might also need fill */
|
| 1293 |
[data-testid="stSelectbox"] svg path {
|
|
@@ -1309,20 +1310,33 @@ def show_main_app():
|
|
| 1309 |
align-items: center; /* Center content horizontally */
|
| 1310 |
text-align: center; /* Ensure text alignment */
|
| 1311 |
min-height: 120px; /* Ensure enough height for the dropzone */
|
|
|
|
| 1312 |
}
|
| 1313 |
[data-testid="stFileUploaderDropzone"]:hover {
|
| 1314 |
border-color: #5d6dbe; /* Highlight on hover */
|
| 1315 |
background-color: #f7f9fb;
|
| 1316 |
}
|
| 1317 |
/* FIX: "Drag and drop file here" text color and visibility */
|
| 1318 |
-
/* Target
|
|
|
|
| 1319 |
[data-testid="stFileUploaderDropzone"] p,
|
| 1320 |
[data-testid="stFileUploaderDropzone"] span,
|
| 1321 |
-
[data-testid="stFileUploaderDropzone"] div {
|
| 1322 |
color: black !important; /* Force text to be black */
|
| 1323 |
-
white-space: normal; /* Allow text to wrap if it's long */
|
| 1324 |
-
word-break: break-word; /* Break long words to prevent horizontal overflow */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1325 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1326 |
|
| 1327 |
/* IMPORTANT: This rule hides the default "Drag and drop file here" text.
|
| 1328 |
If you want that text to be visible (and black), you MUST REMOVE or COMMENT OUT this entire block.
|
|
@@ -1710,6 +1724,7 @@ Respond as DilBot with warmth, empathy, and understanding. Keep it conversationa
|
|
| 1710 |
|
| 1711 |
st.markdown("---")
|
| 1712 |
st.markdown("<p class='footer-caption'>Built by Members of CSG Hackathon Team | Your data is stored privately and securely</p>", unsafe_allow_html=True)
|
|
|
|
| 1713 |
# Main app logic
|
| 1714 |
def main():
|
| 1715 |
if not st.session_state.authenticated:
|
|
|
|
| 1241 |
}
|
| 1242 |
|
| 1243 |
/* Selectbox (Dropdown) */
|
| 1244 |
+
/* Target the main container for the selectbox */
|
| 1245 |
+
[data-testid="stSelectbox"] > div:first-child > div:first-child {
|
| 1246 |
border-radius: 10px;
|
| 1247 |
border: 1px solid #ced4da;
|
|
|
|
|
|
|
| 1248 |
background-color: #fcfcfc;
|
| 1249 |
box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
|
| 1250 |
+
display: flex; /* Use flexbox for alignment of input and arrow */
|
| 1251 |
+
align-items: center; /* Vertically center items */
|
| 1252 |
+
min-height: 48px; /* Ensure a comfortable height */
|
| 1253 |
+
padding: 0 10px; /* Horizontal padding, vertical padding on input */
|
| 1254 |
}
|
| 1255 |
.stSelectbox>label {
|
| 1256 |
font-weight: 600;
|
|
|
|
| 1258 |
margin-bottom: 0.6rem;
|
| 1259 |
}
|
| 1260 |
/* FIX: Selectbox selected value text color and ensure it fits properly */
|
| 1261 |
+
[data-testid="stSelectbox"] input[type="text"] {
|
| 1262 |
+
color: black !important; /* Force text to be black */
|
| 1263 |
+
flex-grow: 1; /* Allow input to take up most space */
|
| 1264 |
+
padding: 12px 5px; /* Adjust vertical padding within the input */
|
| 1265 |
+
font-size: 1.05em; /* Ensure consistent font size */
|
| 1266 |
+
line-height: 1.2em; /* Ensure text line height */
|
| 1267 |
+
min-height: 1.2em; /* Minimum height for text content */
|
| 1268 |
+
background-color: transparent !important; /* Ensure no white overlay */
|
| 1269 |
+
border: none !important; /* Remove any default input borders */
|
| 1270 |
+
outline: none !important; /* Remove outline on focus */
|
| 1271 |
+
box-shadow: none !important; /* Remove any default input shadow */
|
| 1272 |
}
|
| 1273 |
|
| 1274 |
/* FIX: Dropdown arrow color and visibility */
|
| 1275 |
/* Target the button containing the SVG icon for the dropdown */
|
| 1276 |
[data-testid="stSelectbox"] button {
|
| 1277 |
background-color: transparent !important; /* Ensure button background is transparent */
|
|
|
|
| 1278 |
border: none !important; /* Remove button border */
|
| 1279 |
+
padding: 0 5px; /* Small padding for the arrow */
|
|
|
|
|
|
|
|
|
|
| 1280 |
cursor: pointer;
|
| 1281 |
+
display: flex; /* Flexbox to center the SVG inside the button */
|
| 1282 |
+
align-items: center;
|
| 1283 |
+
justify-content: center;
|
| 1284 |
}
|
| 1285 |
/* Target the SVG icon itself */
|
| 1286 |
[data-testid="stSelectbox"] svg {
|
| 1287 |
fill: black !important; /* Force the SVG icon to be black */
|
| 1288 |
color: black !important; /* Fallback for some SVG types */
|
| 1289 |
+
font-size: 1.5em !important; /* Make the arrow a bit larger */
|
| 1290 |
+
width: 1em !important; /* Ensure proper width */
|
| 1291 |
+
height: 1em !important; /* Ensure proper height */
|
| 1292 |
}
|
| 1293 |
/* Specific path inside SVG might also need fill */
|
| 1294 |
[data-testid="stSelectbox"] svg path {
|
|
|
|
| 1310 |
align-items: center; /* Center content horizontally */
|
| 1311 |
text-align: center; /* Ensure text alignment */
|
| 1312 |
min-height: 120px; /* Ensure enough height for the dropzone */
|
| 1313 |
+
overflow: hidden; /* Ensure content is clipped if it tries to escape */
|
| 1314 |
}
|
| 1315 |
[data-testid="stFileUploaderDropzone"]:hover {
|
| 1316 |
border-color: #5d6dbe; /* Highlight on hover */
|
| 1317 |
background-color: #f7f9fb;
|
| 1318 |
}
|
| 1319 |
/* FIX: "Drag and drop file here" text color and visibility */
|
| 1320 |
+
/* Target *any* text within the dropzone and force black color */
|
| 1321 |
+
[data-testid="stFileUploaderDropzone"] *, /* Wildcard selector for any child */
|
| 1322 |
[data-testid="stFileUploaderDropzone"] p,
|
| 1323 |
[data-testid="stFileUploaderDropzone"] span,
|
| 1324 |
+
[data-testid="stFileUploaderDropzone"] div {
|
| 1325 |
color: black !important; /* Force text to be black */
|
| 1326 |
+
white-space: normal !important; /* Allow text to wrap if it's long */
|
| 1327 |
+
word-break: break-word !important; /* Break long words to prevent horizontal overflow */
|
| 1328 |
+
font-weight: normal !important; /* Ensure normal font weight */
|
| 1329 |
+
opacity: 1 !important; /* Ensure full opacity */
|
| 1330 |
+
}
|
| 1331 |
+
/* If there's an internal 'div' specifically containing the main text */
|
| 1332 |
+
[data-testid="stFileUploaderDropzone"] > div > div > div:nth-child(2) > div:first-child {
|
| 1333 |
+
color: black !important;
|
| 1334 |
}
|
| 1335 |
+
/* Target specifically the text that says "Limit XMB per file" if it's a sibling of an icon */
|
| 1336 |
+
[data-testid="stFileUploaderDropzone"] > div > div > div > span {
|
| 1337 |
+
color: black !important;
|
| 1338 |
+
}
|
| 1339 |
+
|
| 1340 |
|
| 1341 |
/* IMPORTANT: This rule hides the default "Drag and drop file here" text.
|
| 1342 |
If you want that text to be visible (and black), you MUST REMOVE or COMMENT OUT this entire block.
|
|
|
|
| 1724 |
|
| 1725 |
st.markdown("---")
|
| 1726 |
st.markdown("<p class='footer-caption'>Built by Members of CSG Hackathon Team | Your data is stored privately and securely</p>", unsafe_allow_html=True)
|
| 1727 |
+
|
| 1728 |
# Main app logic
|
| 1729 |
def main():
|
| 1730 |
if not st.session_state.authenticated:
|