Nischal Subedi
commited on
Commit
·
7f1c90c
1
Parent(s):
720834f
UI update
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ Answer:"""
|
|
| 93 |
def process_query_cached(self, query: str, state: str, openai_api_key: str, n_results: int = 5) -> Dict[str, any]:
|
| 94 |
logging.info(f"Processing query (cache key: '{query}'|'{state}'|key_hidden) with n_results={n_results}")
|
| 95 |
|
| 96 |
-
if not state or state
|
| 97 |
logging.warning("No valid state provided for query.")
|
| 98 |
return {"answer": "<div class='error-message'>Error: Please select a valid state.</div>", "context_used": "N/A - Invalid Input"}
|
| 99 |
if not query or not query.strip():
|
|
@@ -473,16 +473,20 @@ Answer:"""
|
|
| 473 |
font-weight: 700 !important; /* Bolder */
|
| 474 |
color: var(--text-primary) !important;
|
| 475 |
margin: 0 !important; /* No margin on h3 itself as parent handles spacing */
|
| 476 |
-
|
| 477 |
-
|
|
|
|
| 478 |
display: inline-block !important; /* Allow centering within text-align: center of parent */
|
| 479 |
text-align: center !important; /* Fallback centering */
|
|
|
|
| 480 |
}
|
| 481 |
|
| 482 |
/* General content area padding within dashboard sections (below the title bar) */
|
| 483 |
.dashboard-card-content-area {
|
| 484 |
padding: 0 1.75rem 1.75rem 1.75rem !important; /* Match overall padding, 0 top because title bar handles it */
|
| 485 |
background-color: var(--background-primary) !important; /* Pure white background */
|
|
|
|
|
|
|
| 486 |
}
|
| 487 |
.dashboard-card-section p {
|
| 488 |
line-height: 1.7 !important;
|
|
@@ -490,6 +494,9 @@ Answer:"""
|
|
| 490 |
font-size: 1rem !important;
|
| 491 |
text-align: left !important; /* Ensure content text is left-aligned */
|
| 492 |
background-color: transparent !important; /* Ensure p tags don't have unexpected backgrounds */
|
|
|
|
|
|
|
|
|
|
| 493 |
}
|
| 494 |
.dashboard-card-section strong {
|
| 495 |
color: var(--primary-color) !important; /* Highlight strong text with primary color */
|
|
@@ -976,8 +983,8 @@ Answer:"""
|
|
| 976 |
with gr.Group(elem_classes="app-footer-wrapper"):
|
| 977 |
gr.Markdown(
|
| 978 |
"""
|
| 979 |
-
|
| 980 |
-
|
| 981 |
"""
|
| 982 |
)
|
| 983 |
|
|
|
|
| 93 |
def process_query_cached(self, query: str, state: str, openai_api_key: str, n_results: int = 5) -> Dict[str, any]:
|
| 94 |
logging.info(f"Processing query (cache key: '{query}'|'{state}'|key_hidden) with n_results={n_results}")
|
| 95 |
|
| 96 |
+
if not state or state is None: # Removed "Select a state..." from error check as it's not a choice
|
| 97 |
logging.warning("No valid state provided for query.")
|
| 98 |
return {"answer": "<div class='error-message'>Error: Please select a valid state.</div>", "context_used": "N/A - Invalid Input"}
|
| 99 |
if not query or not query.strip():
|
|
|
|
| 473 |
font-weight: 700 !important; /* Bolder */
|
| 474 |
color: var(--text-primary) !important;
|
| 475 |
margin: 0 !important; /* No margin on h3 itself as parent handles spacing */
|
| 476 |
+
padding-bottom: 0.3rem !important; /* REDUCED to bring text closer to border */
|
| 477 |
+
border-bottom: 2px solid var(--border-color) !important; /* Underline effect */
|
| 478 |
+
line-height: 1.1 !important; /* Ensure line height does not add extra space */
|
| 479 |
display: inline-block !important; /* Allow centering within text-align: center of parent */
|
| 480 |
text-align: center !important; /* Fallback centering */
|
| 481 |
+
letter-spacing: -0.01em !important;
|
| 482 |
}
|
| 483 |
|
| 484 |
/* General content area padding within dashboard sections (below the title bar) */
|
| 485 |
.dashboard-card-content-area {
|
| 486 |
padding: 0 1.75rem 1.75rem 1.75rem !important; /* Match overall padding, 0 top because title bar handles it */
|
| 487 |
background-color: var(--background-primary) !important; /* Pure white background */
|
| 488 |
+
box-sizing: border-box; /* Include padding in width */
|
| 489 |
+
width: 100%; /* Ensure it spans full width */
|
| 490 |
}
|
| 491 |
.dashboard-card-section p {
|
| 492 |
line-height: 1.7 !important;
|
|
|
|
| 494 |
font-size: 1rem !important;
|
| 495 |
text-align: left !important; /* Ensure content text is left-aligned */
|
| 496 |
background-color: transparent !important; /* Ensure p tags don't have unexpected backgrounds */
|
| 497 |
+
margin: 0 !important; /* Remove default paragraph margins */
|
| 498 |
+
padding: 0 !important; /* Remove default paragraph padding */
|
| 499 |
+
white-space: normal !important; /* Ensure text wraps */
|
| 500 |
}
|
| 501 |
.dashboard-card-section strong {
|
| 502 |
color: var(--primary-color) !important; /* Highlight strong text with primary color */
|
|
|
|
| 983 |
with gr.Group(elem_classes="app-footer-wrapper"):
|
| 984 |
gr.Markdown(
|
| 985 |
"""
|
| 986 |
+
<p>**Disclaimer:** This tool is for informational purposes only and does not constitute legal advice. For specific legal guidance, always consult with a licensed attorney in your jurisdiction.</p>
|
| 987 |
+
<p>Developed by **Nischal Subedi**. Connect on [LinkedIn](https://www.linkedin.com/in/nischal1/) or explore insights at [Substack](https://datascientistinsights.substack.com/).</p>
|
| 988 |
"""
|
| 989 |
)
|
| 990 |
|