Nischal Subedi commited on
Commit
3e20ea0
·
1 Parent(s): b9d91ef

updated UI_v37

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -416,17 +416,17 @@ Answer:"""
416
  border-bottom: 2px solid var(--border-dark) !important; width: 100%;
417
  transition: color var(--transition-speed), border-color var(--transition-speed);
418
  }
419
- .sub-section-title { /* MODIFIED FOR CENTERING */
420
  font-family: var(--font-family-header) !important;
421
- font-size: 2.5rem !important;
422
- font-weight: 700 !important;
423
  color: var(--text-primary-dark) !important;
424
  text-align: center !important;
425
  margin-top: 1.5rem !important;
426
  margin-bottom: 0.8rem !important;
427
  transition: color var(--transition-speed);
428
- display: block !important; /* ADDED: Ensure it's a block element */
429
- width: 100% !important; /* ADDED: Ensure it takes full width for centering */
430
  }
431
  @media (prefers-color-scheme: light) {
432
  .section-title, .sub-section-title { color: var(--text-primary-light) !important; border-bottom-color: var(--border-light) !important; }
@@ -472,7 +472,7 @@ Answer:"""
472
  .gradio-textbox textarea::placeholder, .gradio-textbox input[type=password]::placeholder { color: #808090 !important; }
473
  .gradio-textbox textarea:focus, .gradio-dropdown select:focus, .gradio-textbox input[type=password]:focus {
474
  border-color: var(--accent-main-dark) !important;
475
- box-shadow: 0 0 0 6px var(--focus-ring-dark) !important, inset<ctrl61> 0 1px 3px rgba(0,0,0,0.4);
476
  outline: none !important;
477
  }
478
  @media (prefers-color-scheme: light) {
@@ -662,7 +662,7 @@ Answer:"""
662
  .main-dashboard-container { padding: var(--padding-md) !important; margin-bottom: 0.6rem; border-radius: var(--radius-md); gap: 2rem; }
663
  .dashboard-card-section { padding: var(--padding-sm); border-radius: var(--radius-sm); }
664
  .section-title { font-size: 2.2rem !important; margin-bottom: 1.5rem !important; }
665
- .sub-section-title { font-size: 1.8rem !important; margin-bottom: 0.7rem !important; }
666
  .section-divider { margin: 1.8rem 0; } .input-row { gap: 1.5rem; } .input-field { min-width: 280px; }
667
  .gradio-textbox textarea { min-height: 160px; } .output-card .response-header { font-size: 1.7rem; }
668
  .examples-section { padding-top: 1.2rem; }
@@ -678,7 +678,7 @@ Answer:"""
678
  .main-dashboard-container { padding: var(--padding-sm) !important; margin-bottom: 0.5rem; border-radius: var(--radius-md); gap: 1.8rem; }
679
  .dashboard-card-section { padding: 1.5rem; border-radius: var(--radius-sm); }
680
  .section-title { font-size: 2rem !important; margin-bottom: 1.2rem !important; }
681
- .sub-section-title { font-size: 1.6rem !important; margin-top: 1rem !important; margin-bottom: 0.6rem !important; }
682
  .section-divider { margin: 1.5rem 0; } .input-row { flex-direction: column; gap: 1rem; } .input-field { min-width: 100%; }
683
  .gradio-textbox textarea { min-height: 140px; } .button-row { justify-content: stretch; gap: 1rem; }
684
  .gradio-button { width: 100%; padding: 1.1rem 2rem !important; font-size: 1.1rem !important; }
@@ -697,7 +697,7 @@ Answer:"""
697
  .main-dashboard-container { padding: 1.2rem !important; margin-bottom: 0.4rem; border-radius: var(--radius-sm); gap: 1.5rem; }
698
  .dashboard-card-section { padding: 1rem; border-radius: var(--radius-xs); }
699
  .section-title { font-size: 1.8rem !important; margin-bottom: 1rem !important; }
700
- .sub-section-title { font-size: 1.4rem !important; margin-top: 0.8rem !important; margin-bottom: 0.5rem !important; }
701
  .section-divider { margin: 1rem 0; }
702
  .gradio-textbox textarea, .gradio-dropdown select, .gradio-textbox input[type=password] { font-size: 1.05rem !important; padding: 1rem 1.2rem !important; }
703
  .gradio-textbox textarea { min-height: 120px; }
@@ -729,7 +729,7 @@ Answer:"""
729
 
730
  # --- Section 1: Introduction and Disclaimer Card ---
731
  with gr.Group(elem_classes="dashboard-card-section"):
732
- gr.Markdown("<h3 class='sub-section-title'>Welcome & Disclaimer</h3>") # Should be centered by CSS
733
  gr.Markdown(
734
  """
735
  <p>Navigate landlord-tenant laws with ease. This assistant provides detailed, state-specific answers grounded in legal authority.</p>
@@ -739,7 +739,7 @@ Answer:"""
739
 
740
  # --- Section 2: OpenAI API Key Input Card ---
741
  with gr.Group(elem_classes="dashboard-card-section"):
742
- gr.Markdown("<h3 class='sub-section-title'>OpenAI API Key</h3>") # Should be centered by CSS
743
  api_key_input = gr.Textbox(
744
  label="",
745
  type="password", placeholder="Enter your API key (e.g., sk-...)",
@@ -748,7 +748,7 @@ Answer:"""
748
 
749
  # --- Section 3: Query Input and State Selection Card ---
750
  with gr.Group(elem_classes="dashboard-card-section"):
751
- gr.Markdown("<h3 class='sub-section-title'>Ask Your Question</h3>") # Should be centered by CSS
752
  with gr.Row(elem_classes="input-row"):
753
  with gr.Column(elem_classes="input-field", scale=3):
754
  query_input = gr.Textbox(
@@ -766,7 +766,7 @@ Answer:"""
766
 
767
  # --- Section 4: Output Display Card ---
768
  with gr.Group(elem_classes="dashboard-card-section"):
769
- gr.Markdown("<h3 class='sub-section-title'>Legal Assistant's Response</h3>") # Should be centered by CSS
770
  output = gr.Markdown(
771
  value="<div class='placeholder output-card'>The answer will appear here after submitting your query.</div>",
772
  elem_classes="output-content-wrapper output-card"
@@ -774,7 +774,7 @@ Answer:"""
774
 
775
  # --- Section 5: Example Questions Section (NO ACCORDION, direct display) ---
776
  with gr.Group(elem_classes="dashboard-card-section examples-section"):
777
- gr.Markdown("<h3 class='sub-section-title'>Example Questions to Ask</h3>") # Should be centered by CSS
778
  if example_queries:
779
  gr.Examples(
780
  examples=example_queries, inputs=[query_input, state_input],
 
416
  border-bottom: 2px solid var(--border-dark) !important; width: 100%;
417
  transition: color var(--transition-speed), border-color var(--transition-speed);
418
  }
419
+ .sub-section-title {
420
  font-family: var(--font-family-header) !important;
421
+ font-size: 2.7rem !important; /* Slightly increased for more prominence */
422
+ font-weight: 800 !important; /* Increased font weight for more visual emphasis */
423
  color: var(--text-primary-dark) !important;
424
  text-align: center !important;
425
  margin-top: 1.5rem !important;
426
  margin-bottom: 0.8rem !important;
427
  transition: color var(--transition-speed);
428
+ display: block !important; /* Ensure it's a block element */
429
+ width: 100% !important; /* Ensure it takes full width for centering */
430
  }
431
  @media (prefers-color-scheme: light) {
432
  .section-title, .sub-section-title { color: var(--text-primary-light) !important; border-bottom-color: var(--border-light) !important; }
 
472
  .gradio-textbox textarea::placeholder, .gradio-textbox input[type=password]::placeholder { color: #808090 !important; }
473
  .gradio-textbox textarea:focus, .gradio-dropdown select:focus, .gradio-textbox input[type=password]:focus {
474
  border-color: var(--accent-main-dark) !important;
475
+ box-shadow: 0 0 0 6px var(--focus-ring-dark) !important, inset 0 1px 3px rgba(0,0,0,0.4);
476
  outline: none !important;
477
  }
478
  @media (prefers-color-scheme: light) {
 
662
  .main-dashboard-container { padding: var(--padding-md) !important; margin-bottom: 0.6rem; border-radius: var(--radius-md); gap: 2rem; }
663
  .dashboard-card-section { padding: var(--padding-sm); border-radius: var(--radius-sm); }
664
  .section-title { font-size: 2.2rem !important; margin-bottom: 1.5rem !important; }
665
+ .sub-section-title { font-size: 2.0rem !important; margin-bottom: 0.7rem !important; } /* Adjusted for responsiveness */
666
  .section-divider { margin: 1.8rem 0; } .input-row { gap: 1.5rem; } .input-field { min-width: 280px; }
667
  .gradio-textbox textarea { min-height: 160px; } .output-card .response-header { font-size: 1.7rem; }
668
  .examples-section { padding-top: 1.2rem; }
 
678
  .main-dashboard-container { padding: var(--padding-sm) !important; margin-bottom: 0.5rem; border-radius: var(--radius-md); gap: 1.8rem; }
679
  .dashboard-card-section { padding: 1.5rem; border-radius: var(--radius-sm); }
680
  .section-title { font-size: 2rem !important; margin-bottom: 1.2rem !important; }
681
+ .sub-section-title { font-size: 1.8rem !important; margin-top: 1rem !important; margin-bottom: 0.6rem !important; } /* Adjusted for responsiveness */
682
  .section-divider { margin: 1.5rem 0; } .input-row { flex-direction: column; gap: 1rem; } .input-field { min-width: 100%; }
683
  .gradio-textbox textarea { min-height: 140px; } .button-row { justify-content: stretch; gap: 1rem; }
684
  .gradio-button { width: 100%; padding: 1.1rem 2rem !important; font-size: 1.1rem !important; }
 
697
  .main-dashboard-container { padding: 1.2rem !important; margin-bottom: 0.4rem; border-radius: var(--radius-sm); gap: 1.5rem; }
698
  .dashboard-card-section { padding: 1rem; border-radius: var(--radius-xs); }
699
  .section-title { font-size: 1.8rem !important; margin-bottom: 1rem !important; }
700
+ .sub-section-title { font-size: 1.5rem !important; margin-top: 0.8rem !important; margin-bottom: 0.5rem !important; } /* Adjusted for responsiveness */
701
  .section-divider { margin: 1rem 0; }
702
  .gradio-textbox textarea, .gradio-dropdown select, .gradio-textbox input[type=password] { font-size: 1.05rem !important; padding: 1rem 1.2rem !important; }
703
  .gradio-textbox textarea { min-height: 120px; }
 
729
 
730
  # --- Section 1: Introduction and Disclaimer Card ---
731
  with gr.Group(elem_classes="dashboard-card-section"):
732
+ gr.Markdown("<h3 class='sub-section-title'>Welcome & Disclaimer</h3>") # Centered by CSS
733
  gr.Markdown(
734
  """
735
  <p>Navigate landlord-tenant laws with ease. This assistant provides detailed, state-specific answers grounded in legal authority.</p>
 
739
 
740
  # --- Section 2: OpenAI API Key Input Card ---
741
  with gr.Group(elem_classes="dashboard-card-section"):
742
+ gr.Markdown("<h3 class='sub-section-title'>OpenAI API Key</h3>") # Centered by CSS
743
  api_key_input = gr.Textbox(
744
  label="",
745
  type="password", placeholder="Enter your API key (e.g., sk-...)",
 
748
 
749
  # --- Section 3: Query Input and State Selection Card ---
750
  with gr.Group(elem_classes="dashboard-card-section"):
751
+ gr.Markdown("<h3 class='sub-section-title'>Ask Your Question</h3>") # Centered by CSS
752
  with gr.Row(elem_classes="input-row"):
753
  with gr.Column(elem_classes="input-field", scale=3):
754
  query_input = gr.Textbox(
 
766
 
767
  # --- Section 4: Output Display Card ---
768
  with gr.Group(elem_classes="dashboard-card-section"):
769
+ gr.Markdown("<h3 class='sub-section-title'>Legal Assistant's Response</h3>") # Centered by CSS
770
  output = gr.Markdown(
771
  value="<div class='placeholder output-card'>The answer will appear here after submitting your query.</div>",
772
  elem_classes="output-content-wrapper output-card"
 
774
 
775
  # --- Section 5: Example Questions Section (NO ACCORDION, direct display) ---
776
  with gr.Group(elem_classes="dashboard-card-section examples-section"):
777
+ gr.Markdown("<h3 class='sub-section-title'>Example Questions to Ask</h3>") # Centered by CSS
778
  if example_queries:
779
  gr.Examples(
780
  examples=example_queries, inputs=[query_input, state_input],