anamjafar6 commited on
Commit
c4979a1
·
verified ·
1 Parent(s): 04db420

Update app.py

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