Nischal Subedi
commited on
Commit
·
4d38bdb
1
Parent(s):
cc72c3f
UI update
Browse files
app.py
CHANGED
|
@@ -309,8 +309,8 @@ Answer:"""
|
|
| 309 |
:root {
|
| 310 |
--primary-color: #FF8C00; /* Darker Orange for buttons/accents */
|
| 311 |
--primary-hover: #E07B00; /* Slightly darker orange for hover */
|
| 312 |
-
--background-primary: hsl(30, 100%, 99%); /* Very bright, almost white, distinctly warm cream */
|
| 313 |
-
--background-secondary: hsl(30, 100%, 96%); /* Slightly deeper,
|
| 314 |
--text-primary: #4A3C32; /* Dark warm brown/charcoal for main text */
|
| 315 |
--text-secondary: #8C7B6F; /* Muted warm gray/brown for secondary text */
|
| 316 |
--border-color: hsl(30, 70%, 85%); /* Light, warm orange-brown for borders */
|
|
@@ -385,7 +385,7 @@ Answer:"""
|
|
| 385 |
}
|
| 386 |
|
| 387 |
.app-header-logo {
|
| 388 |
-
font-size:
|
| 389 |
margin-bottom: 0.75rem !important;
|
| 390 |
display: block !important;
|
| 391 |
color: var(--primary-color) !important; /* Theme color */
|
|
@@ -483,12 +483,15 @@ Answer:"""
|
|
| 483 |
}
|
| 484 |
|
| 485 |
/* Improved input styling with clear boundaries and focus */
|
|
|
|
| 486 |
.gradio-textbox {
|
|
|
|
| 487 |
margin-bottom: 0.75rem !important;
|
| 488 |
}
|
|
|
|
| 489 |
.gradio-textbox textarea,
|
| 490 |
.gradio-textbox input {
|
| 491 |
-
background-color: var(--background-primary) !important; /*
|
| 492 |
border: 2px solid var(--border-color) !important; /* Clear border */
|
| 493 |
border-radius: 8px !important;
|
| 494 |
padding: 0.85rem 1rem !important; /* Slightly more padding */
|
|
@@ -498,6 +501,10 @@ Answer:"""
|
|
| 498 |
transition: border-color 0.2s ease, box-shadow 0.2s ease !important; /* Smooth transitions */
|
| 499 |
box-shadow: var(--shadow-sm) !important;
|
| 500 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 501 |
/* Focus styles for textboxes */
|
| 502 |
.gradio-textbox textarea:focus,
|
| 503 |
.gradio-textbox input:focus {
|
|
@@ -507,9 +514,11 @@ Answer:"""
|
|
| 507 |
}
|
| 508 |
|
| 509 |
/* Styling for the radio button group (state selection) */
|
|
|
|
| 510 |
.gradio-radio {
|
|
|
|
| 511 |
padding: 0 !important; /* Remove any default padding */
|
| 512 |
-
margin-top: 1rem !important; /*
|
| 513 |
}
|
| 514 |
/* Hide default radio circle/dot */
|
| 515 |
.gradio-radio input[type="radio"] {
|
|
@@ -887,7 +896,7 @@ Answer:"""
|
|
| 887 |
|
| 888 |
# Changed from gr.Row to gr.Column for vertical stacking
|
| 889 |
with gr.Column(elem_classes="input-column"): # New column to stack inputs
|
| 890 |
-
with gr.Column(elem_classes="input-field", scale=
|
| 891 |
query_input = gr.Textbox(
|
| 892 |
label="Your Question",
|
| 893 |
placeholder="E.g., What are the rules for security deposit returns in my state?",
|
|
@@ -895,7 +904,7 @@ Answer:"""
|
|
| 895 |
max_lines=15, # Increased max height
|
| 896 |
elem_classes=["input-field-group"]
|
| 897 |
)
|
| 898 |
-
with gr.Column(elem_classes="input-field", scale=
|
| 899 |
state_input = gr.Radio(
|
| 900 |
label="Select State",
|
| 901 |
choices=radio_choices,
|
|
|
|
| 309 |
:root {
|
| 310 |
--primary-color: #FF8C00; /* Darker Orange for buttons/accents */
|
| 311 |
--primary-hover: #E07B00; /* Slightly darker orange for hover */
|
| 312 |
+
--background-primary: hsl(30, 100%, 99.5%); /* Very bright, almost white, distinctly warm cream */
|
| 313 |
+
--background-secondary: hsl(30, 100%, 96%); /* Slightly deeper, yet still very light, warm peach/cream */
|
| 314 |
--text-primary: #4A3C32; /* Dark warm brown/charcoal for main text */
|
| 315 |
--text-secondary: #8C7B6F; /* Muted warm gray/brown for secondary text */
|
| 316 |
--border-color: hsl(30, 70%, 85%); /* Light, warm orange-brown for borders */
|
|
|
|
| 385 |
}
|
| 386 |
|
| 387 |
.app-header-logo {
|
| 388 |
+
font-size: 8rem !important; /* Significantly larger icon */
|
| 389 |
margin-bottom: 0.75rem !important;
|
| 390 |
display: block !important;
|
| 391 |
color: var(--primary-color) !important; /* Theme color */
|
|
|
|
| 483 |
}
|
| 484 |
|
| 485 |
/* Improved input styling with clear boundaries and focus */
|
| 486 |
+
/* Target the main textbox container to remove any default background */
|
| 487 |
.gradio-textbox {
|
| 488 |
+
background-color: transparent !important; /* Ensure parent container is transparent */
|
| 489 |
margin-bottom: 0.75rem !important;
|
| 490 |
}
|
| 491 |
+
/* Target the actual input elements for background color */
|
| 492 |
.gradio-textbox textarea,
|
| 493 |
.gradio-textbox input {
|
| 494 |
+
background-color: var(--background-primary) !important; /* Pure white for content area */
|
| 495 |
border: 2px solid var(--border-color) !important; /* Clear border */
|
| 496 |
border-radius: 8px !important;
|
| 497 |
padding: 0.85rem 1rem !important; /* Slightly more padding */
|
|
|
|
| 501 |
transition: border-color 0.2s ease, box-shadow 0.2s ease !important; /* Smooth transitions */
|
| 502 |
box-shadow: var(--shadow-sm) !important;
|
| 503 |
}
|
| 504 |
+
/* Target the internal scrollable div within gradio-textbox */
|
| 505 |
+
.gradio-textbox .scroll-hide {
|
| 506 |
+
background-color: var(--background-primary) !important; /* Ensure scrollable area is white */
|
| 507 |
+
}
|
| 508 |
/* Focus styles for textboxes */
|
| 509 |
.gradio-textbox textarea:focus,
|
| 510 |
.gradio-textbox input:focus {
|
|
|
|
| 514 |
}
|
| 515 |
|
| 516 |
/* Styling for the radio button group (state selection) */
|
| 517 |
+
/* Target the main radio container to remove any default background */
|
| 518 |
.gradio-radio {
|
| 519 |
+
background-color: transparent !important; /* Ensure parent container is transparent */
|
| 520 |
padding: 0 !important; /* Remove any default padding */
|
| 521 |
+
margin-top: 1rem !important; /* Add a little space above */
|
| 522 |
}
|
| 523 |
/* Hide default radio circle/dot */
|
| 524 |
.gradio-radio input[type="radio"] {
|
|
|
|
| 896 |
|
| 897 |
# Changed from gr.Row to gr.Column for vertical stacking
|
| 898 |
with gr.Column(elem_classes="input-column"): # New column to stack inputs
|
| 899 |
+
with gr.Column(elem_classes="input-field", scale=1): # Query box takes full width, scale=1 for numerical value
|
| 900 |
query_input = gr.Textbox(
|
| 901 |
label="Your Question",
|
| 902 |
placeholder="E.g., What are the rules for security deposit returns in my state?",
|
|
|
|
| 904 |
max_lines=15, # Increased max height
|
| 905 |
elem_classes=["input-field-group"]
|
| 906 |
)
|
| 907 |
+
with gr.Column(elem_classes="input-field", scale=1): # State radio buttons take full width below, scale=1 for numerical value
|
| 908 |
state_input = gr.Radio(
|
| 909 |
label="Select State",
|
| 910 |
choices=radio_choices,
|