Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -236,6 +236,8 @@ Answer:"""
|
|
| 236 |
|
| 237 |
|
| 238 |
|
|
|
|
|
|
|
| 239 |
# STREAMLIT UI
|
| 240 |
|
| 241 |
def main():
|
|
@@ -248,114 +250,114 @@ def main():
|
|
| 248 |
layout="wide"
|
| 249 |
)
|
| 250 |
|
| 251 |
-
# Custom CSS for professional styling and centered layout
|
| 252 |
-
st.markdown("""
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
""", unsafe_allow_html=True)
|
| 359 |
|
| 360 |
# Header Section with gradient background
|
| 361 |
st.markdown("""
|
|
|
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
+
# STREAMLIT UI
|
| 240 |
+
|
| 241 |
# STREAMLIT UI
|
| 242 |
|
| 243 |
def main():
|
|
|
|
| 250 |
layout="wide"
|
| 251 |
)
|
| 252 |
|
| 253 |
+
# Custom CSS for professional styling and centered layout
|
| 254 |
+
st.markdown("""
|
| 255 |
+
<style>
|
| 256 |
+
/* Import Google Font */
|
| 257 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
|
| 258 |
+
|
| 259 |
+
html, body, [class*="css"] {
|
| 260 |
+
font-family: 'Inter', sans-serif;
|
| 261 |
+
color: #222; /* Default text color for light background */
|
| 262 |
+
background-color: #f9f9f9; /* Light background */
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
/* Center main container */
|
| 266 |
+
.main > div {
|
| 267 |
+
max-width: 900px;
|
| 268 |
+
margin: 0 auto;
|
| 269 |
+
padding: 2rem 1rem;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
/* Header styling */
|
| 273 |
+
.header-container {
|
| 274 |
+
text-align: center;
|
| 275 |
+
padding: 2rem 0;
|
| 276 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 277 |
+
border-radius: 15px;
|
| 278 |
+
margin-bottom: 2rem;
|
| 279 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 280 |
+
}
|
| 281 |
+
.header-title {
|
| 282 |
+
color: #fff;
|
| 283 |
+
font-size: 2.5rem;
|
| 284 |
+
font-weight: 700;
|
| 285 |
+
margin-bottom: 0.5rem;
|
| 286 |
+
}
|
| 287 |
+
.header-subtitle {
|
| 288 |
+
color: rgba(255,255,255,0.9);
|
| 289 |
+
font-size: 1.1rem;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
/* Answer box */
|
| 293 |
+
.answer-box {
|
| 294 |
+
background-color: #ffffff;
|
| 295 |
+
color: #222;
|
| 296 |
+
border-radius: 15px;
|
| 297 |
+
padding: 1.5rem;
|
| 298 |
+
margin: 1rem 0;
|
| 299 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
| 300 |
+
border-left: 4px solid #667eea;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
/* Source cards */
|
| 304 |
+
.source-card {
|
| 305 |
+
background-color: #f4f4f8;
|
| 306 |
+
color: #222;
|
| 307 |
+
border-radius: 10px;
|
| 308 |
+
padding: 1rem;
|
| 309 |
+
margin: 0.5rem 0;
|
| 310 |
+
border-left: 3px solid #764ba2;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
/* Buttons */
|
| 314 |
+
.stButton > button {
|
| 315 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 316 |
+
color: #fff;
|
| 317 |
+
border: none;
|
| 318 |
+
border-radius: 8px;
|
| 319 |
+
padding: 0.5rem 2rem;
|
| 320 |
+
font-weight: 600;
|
| 321 |
+
transition: transform 0.2s, box-shadow 0.2s;
|
| 322 |
+
}
|
| 323 |
+
.stButton > button:hover {
|
| 324 |
+
transform: translateY(-2px);
|
| 325 |
+
box-shadow: 0 4px 12px rgba(102,126,234,0.4);
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
/* Uploaded file box */
|
| 329 |
+
.uploadedFile {
|
| 330 |
+
background-color: #fff;
|
| 331 |
+
border-radius: 10px;
|
| 332 |
+
padding: 1rem;
|
| 333 |
+
border: 1px solid #e0e0e0;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
/* Inputs */
|
| 337 |
+
.stTextInput > div > div > input,
|
| 338 |
+
.stTextArea > div > div > textarea {
|
| 339 |
+
border-radius: 8px;
|
| 340 |
+
border: 2px solid #e0e0e0;
|
| 341 |
+
padding: 0.75rem;
|
| 342 |
+
color: #222;
|
| 343 |
+
background-color: #fff;
|
| 344 |
+
}
|
| 345 |
+
.stTextInput > div > div > input:focus,
|
| 346 |
+
.stTextArea > div > div > textarea:focus {
|
| 347 |
+
border-color: #667eea;
|
| 348 |
+
box-shadow: 0 0 0 2px rgba(102,126,234,0.1);
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
/* Footer */
|
| 352 |
+
.footer {
|
| 353 |
+
text-align: center;
|
| 354 |
+
padding: 2rem 0;
|
| 355 |
+
margin-top: 3rem;
|
| 356 |
+
border-top: 1px solid #ddd;
|
| 357 |
+
color: #666;
|
| 358 |
+
}
|
| 359 |
+
</style>
|
| 360 |
+
""", unsafe_allow_html=True)
|
| 361 |
|
| 362 |
# Header Section with gradient background
|
| 363 |
st.markdown("""
|