Nischal Subedi commited on
Commit
3178581
·
1 Parent(s): b29695d
Files changed (1) hide show
  1. app.py +12 -8
app.py CHANGED
@@ -184,7 +184,7 @@ Answer:"""
184
  error_message = "Error: AI answer generation failed."
185
  details = f"Details: {str(e)}"
186
  if "authentication" in str(e).lower():
187
- error_message = "Error: Authentication failed. Please double-check your OpenAI API key."
188
  details = ""
189
  elif "rate limit" in str(e).lower():
190
  error_message = "Error: You've exceeded your OpenAI API rate limit or quota. Please check your usage and plan limits, or wait and try again."
@@ -317,6 +317,7 @@ Answer:"""
317
  --error-bg: #FFEBEB;
318
  --error-border: #FFCACA;
319
  --error-text: #D32F2F;
 
320
  }
321
 
322
  /* Dark mode variables - for consistency if a dark mode toggle were present */
@@ -331,6 +332,7 @@ Answer:"""
331
  --error-bg: #3F1D1D;
332
  --error-border: #5A1A1A;
333
  --error-text: #FF7070;
 
334
  }
335
 
336
  /* Base container improvements */
@@ -349,7 +351,7 @@ Answer:"""
349
 
350
  /* Header styling - centered and prominent */
351
  .app-header-wrapper {
352
- background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%) !important;
353
  border: 2px solid var(--border-color) !important;
354
  border-radius: 16px !important;
355
  padding: 2.5rem 1.5rem !important; /* More vertical padding */
@@ -434,7 +436,7 @@ Answer:"""
434
  transform: translateY(-3px) !important; /* More pronounced lift */
435
  }
436
 
437
- /* Centered section titles with improved typography */
438
  .sub-section-title {
439
  font-family: 'Poppins', sans-serif !important;
440
  font-size: 1.7rem !important; /* Slightly larger */
@@ -443,12 +445,12 @@ Answer:"""
443
  text-align: center !important; /* Centered text */
444
  margin: 0 0 1.25rem 0 !important; /* More space below title */
445
  padding-bottom: 0.75rem !important;
446
- border-bottom: 2px solid var(--border-color) !important; /* Underline effect */
447
  display: block !important;
448
  letter-spacing: -0.01em !important;
449
  }
450
 
451
- /* Specific styling for the welcome/disclaimer markdown content */
452
  .dashboard-card-section p {
453
  line-height: 1.7 !important;
454
  color: var(--text-primary) !important;
@@ -483,7 +485,7 @@ Answer:"""
483
  .gradio-dropdown > div > input[type="text"]:focus,
484
  .gradio-dropdown .primary-wrap.focused { /* Apply focus style to dropdown wrap */
485
  outline: none !important;
486
- border-color: var(--border-focus) !important; /* Distinct border on focus */
487
  box-shadow: 0 0 0 4px rgba(60, 179, 113, 0.2) !important; /* Broader, softer glow on focus */
488
  }
489
 
@@ -690,7 +692,7 @@ Answer:"""
690
  display: none !important;
691
  }
692
 
693
- /* Footer styling - centered text */
694
  .app-footer-wrapper {
695
  background: var(--background-secondary) !important;
696
  border: 2px solid var(--border-color) !important;
@@ -706,12 +708,14 @@ Answer:"""
706
  line-height: 1.6 !important;
707
  }
708
  .app-footer a {
709
- color: var(--primary-color) !important;
710
  text-decoration: none !important;
711
  font-weight: 600 !important;
 
712
  }
713
  .app-footer a:hover {
714
  text-decoration: underline !important;
 
715
  }
716
 
717
  /* Responsive design for smaller screens */
 
184
  error_message = "Error: AI answer generation failed."
185
  details = f"Details: {str(e)}"
186
  if "authentication" in str(e).lower():
187
+ error_message = "Error: OpenAI API Key is invalid or expired. Please check your key."
188
  details = ""
189
  elif "rate limit" in str(e).lower():
190
  error_message = "Error: You've exceeded your OpenAI API rate limit or quota. Please check your usage and plan limits, or wait and try again."
 
317
  --error-bg: #FFEBEB;
318
  --error-border: #FFCACA;
319
  --error-text: #D32F2F;
320
+ --header-bg-color: hsl(180, 70%, 92%); /* Distinct light seafoam for header */
321
  }
322
 
323
  /* Dark mode variables - for consistency if a dark mode toggle were present */
 
332
  --error-bg: #3F1D1D;
333
  --error-border: #5A1A1A;
334
  --error-text: #FF7070;
335
+ --header-bg-color: #253842; /* Darker header for dark mode */
336
  }
337
 
338
  /* Base container improvements */
 
351
 
352
  /* Header styling - centered and prominent */
353
  .app-header-wrapper {
354
+ background: var(--header-bg-color) !important; /* Use new distinct header background color */
355
  border: 2px solid var(--border-color) !important;
356
  border-radius: 16px !important;
357
  padding: 2.5rem 1.5rem !important; /* More vertical padding */
 
436
  transform: translateY(-3px) !important; /* More pronounced lift */
437
  }
438
 
439
+ /* Centered section titles with improved typography and consistent line */
440
  .sub-section-title {
441
  font-family: 'Poppins', sans-serif !important;
442
  font-size: 1.7rem !important; /* Slightly larger */
 
445
  text-align: center !important; /* Centered text */
446
  margin: 0 0 1.25rem 0 !important; /* More space below title */
447
  padding-bottom: 0.75rem !important;
448
+ border-bottom: 2px solid var(--border-color) !important; /* Underline effect (the "line") */
449
  display: block !important;
450
  letter-spacing: -0.01em !important;
451
  }
452
 
453
+ /* Specific styling for the markdown content within cards */
454
  .dashboard-card-section p {
455
  line-height: 1.7 !important;
456
  color: var(--text-primary) !important;
 
485
  .gradio-dropdown > div > input[type="text"]:focus,
486
  .gradio-dropdown .primary-wrap.focused { /* Apply focus style to dropdown wrap */
487
  outline: none !important;
488
+ border-color: var(--border-focus) !important; /* Distinct border on focus (green) */
489
  box-shadow: 0 0 0 4px rgba(60, 179, 113, 0.2) !important; /* Broader, softer glow on focus */
490
  }
491
 
 
692
  display: none !important;
693
  }
694
 
695
+ /* Footer styling - centered text and green links */
696
  .app-footer-wrapper {
697
  background: var(--background-secondary) !important;
698
  border: 2px solid var(--border-color) !important;
 
708
  line-height: 1.6 !important;
709
  }
710
  .app-footer a {
711
+ color: var(--primary-color) !important; /* Green highlight for links */
712
  text-decoration: none !important;
713
  font-weight: 600 !important;
714
+ transition: text-decoration 0.2s ease, text-decoration-color 0.2s ease !important;
715
  }
716
  .app-footer a:hover {
717
  text-decoration: underline !important;
718
+ text-decoration-color: var(--primary-color) !important; /* Green underline on hover */
719
  }
720
 
721
  /* Responsive design for smaller screens */