Spaces:
Sleeping
Sleeping
Commit
·
2101408
1
Parent(s):
aac79d5
Fix: Separate CSS, add prompt box, pastel white theme, fix endless scrolling
Browse files- app.py +62 -319
- assets/styles.css +325 -0
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
import json
|
|
|
|
| 4 |
|
| 5 |
# ==================== API Functions ====================
|
| 6 |
|
|
@@ -65,12 +66,18 @@ def generate_empty_response():
|
|
| 65 |
return """
|
| 66 |
### 💬 Welcome to ICD-10 & CPT Coding Assistant
|
| 67 |
|
| 68 |
-
Please enter provider notes in the
|
| 69 |
|
| 70 |
**Tips:**
|
| 71 |
- Provide detailed clinical documentation
|
| 72 |
- Include symptoms, diagnoses, and procedures
|
| 73 |
- Be specific about treatments and prescriptions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
"""
|
| 75 |
|
| 76 |
def format_complete_response(result):
|
|
@@ -125,286 +132,21 @@ def load_example(example_name):
|
|
| 125 |
"""Load example provider notes"""
|
| 126 |
return EXAMPLES.get(example_name, "")
|
| 127 |
|
| 128 |
-
# ====================
|
| 129 |
-
|
| 130 |
-
custom_css = """
|
| 131 |
-
/* Global Styles */
|
| 132 |
-
.gradio-container {
|
| 133 |
-
max-width: 100% !important;
|
| 134 |
-
padding: 0 !important;
|
| 135 |
-
background: linear-gradient(135deg, #0d1117 0%, #1a1f2e 100%) !important;
|
| 136 |
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
/* Header Styling */
|
| 140 |
-
.header-container {
|
| 141 |
-
background: linear-gradient(90deg, #00d4aa 0%, #00a896 100%);
|
| 142 |
-
padding: 25px;
|
| 143 |
-
text-align: center;
|
| 144 |
-
border-radius: 0;
|
| 145 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
| 146 |
-
margin-bottom: 0;
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
-
.header-container h1 {
|
| 150 |
-
color: white;
|
| 151 |
-
font-size: 2rem;
|
| 152 |
-
font-weight: 700;
|
| 153 |
-
margin: 0;
|
| 154 |
-
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
| 155 |
-
}
|
| 156 |
-
|
| 157 |
-
.header-container p {
|
| 158 |
-
color: #e0f7f4;
|
| 159 |
-
font-size: 1rem;
|
| 160 |
-
margin: 8px 0 0 0;
|
| 161 |
-
}
|
| 162 |
-
|
| 163 |
-
/* Sidebar Styling */
|
| 164 |
-
.sidebar {
|
| 165 |
-
background: #1a1f2e !important;
|
| 166 |
-
border-right: 1px solid #00d4aa !important;
|
| 167 |
-
padding: 20px !important;
|
| 168 |
-
height: 100vh !important;
|
| 169 |
-
overflow-y: auto !important;
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
.sidebar-title {
|
| 173 |
-
color: #00d4aa !important;
|
| 174 |
-
font-size: 1.3rem !important;
|
| 175 |
-
font-weight: 600 !important;
|
| 176 |
-
margin-bottom: 20px !important;
|
| 177 |
-
padding-bottom: 10px !important;
|
| 178 |
-
border-bottom: 2px solid #00d4aa !important;
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
/* Example Buttons */
|
| 182 |
-
.example-btn {
|
| 183 |
-
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 184 |
-
color: white !important;
|
| 185 |
-
border: none !important;
|
| 186 |
-
border-radius: 8px !important;
|
| 187 |
-
padding: 12px 16px !important;
|
| 188 |
-
margin: 8px 0 !important;
|
| 189 |
-
font-weight: 500 !important;
|
| 190 |
-
cursor: pointer !important;
|
| 191 |
-
transition: all 0.3s ease !important;
|
| 192 |
-
width: 100% !important;
|
| 193 |
-
text-align: left !important;
|
| 194 |
-
}
|
| 195 |
-
|
| 196 |
-
.example-btn:hover {
|
| 197 |
-
background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%) !important;
|
| 198 |
-
transform: translateX(5px) !important;
|
| 199 |
-
box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4) !important;
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
/* Chat Container */
|
| 203 |
-
.chat-container {
|
| 204 |
-
background: #0d1117 !important;
|
| 205 |
-
border-radius: 12px !important;
|
| 206 |
-
padding: 20px !important;
|
| 207 |
-
height: calc(100vh - 200px) !important;
|
| 208 |
-
display: flex !important;
|
| 209 |
-
flex-direction: column !important;
|
| 210 |
-
}
|
| 211 |
-
|
| 212 |
-
/* Input Area */
|
| 213 |
-
.input-row {
|
| 214 |
-
background: #1a1f2e !important;
|
| 215 |
-
border: 2px solid #00d4aa !important;
|
| 216 |
-
border-radius: 12px !important;
|
| 217 |
-
padding: 15px !important;
|
| 218 |
-
margin-top: 10px !important;
|
| 219 |
-
}
|
| 220 |
-
|
| 221 |
-
.input-row textarea {
|
| 222 |
-
background: #0d1117 !important;
|
| 223 |
-
color: #e6e6e6 !important;
|
| 224 |
-
border: 1px solid #2d3748 !important;
|
| 225 |
-
border-radius: 8px !important;
|
| 226 |
-
font-size: 1rem !important;
|
| 227 |
-
padding: 12px !important;
|
| 228 |
-
}
|
| 229 |
-
|
| 230 |
-
.input-row textarea:focus {
|
| 231 |
-
border-color: #00d4aa !important;
|
| 232 |
-
outline: none !important;
|
| 233 |
-
box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1) !important;
|
| 234 |
-
}
|
| 235 |
-
|
| 236 |
-
/* Send Button */
|
| 237 |
-
.send-button {
|
| 238 |
-
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 239 |
-
color: white !important;
|
| 240 |
-
border: none !important;
|
| 241 |
-
border-radius: 8px !important;
|
| 242 |
-
padding: 12px 32px !important;
|
| 243 |
-
font-size: 1rem !important;
|
| 244 |
-
font-weight: 600 !important;
|
| 245 |
-
cursor: pointer !important;
|
| 246 |
-
transition: all 0.3s ease !important;
|
| 247 |
-
margin-top: 10px !important;
|
| 248 |
-
}
|
| 249 |
-
|
| 250 |
-
.send-button:hover {
|
| 251 |
-
background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%) !important;
|
| 252 |
-
box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4) !important;
|
| 253 |
-
transform: translateY(-2px) !important;
|
| 254 |
-
}
|
| 255 |
-
|
| 256 |
-
/* Clear Button */
|
| 257 |
-
.clear-button {
|
| 258 |
-
background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
|
| 259 |
-
color: white !important;
|
| 260 |
-
border: 1px solid #4a5568 !important;
|
| 261 |
-
border-radius: 8px !important;
|
| 262 |
-
padding: 12px 32px !important;
|
| 263 |
-
font-size: 1rem !important;
|
| 264 |
-
font-weight: 600 !important;
|
| 265 |
-
cursor: pointer !important;
|
| 266 |
-
transition: all 0.3s ease !important;
|
| 267 |
-
margin-top: 10px !important;
|
| 268 |
-
}
|
| 269 |
-
|
| 270 |
-
.clear-button:hover {
|
| 271 |
-
background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
|
| 272 |
-
border-color: #718096 !important;
|
| 273 |
-
transform: translateY(-2px) !important;
|
| 274 |
-
}
|
| 275 |
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
margin-bottom: 15px !important;
|
| 286 |
-
}
|
| 287 |
-
|
| 288 |
-
.output-container h3 {
|
| 289 |
-
color: #00d4aa !important;
|
| 290 |
-
border-bottom: 2px solid #00d4aa !important;
|
| 291 |
-
padding-bottom: 8px !important;
|
| 292 |
-
margin-top: 20px !important;
|
| 293 |
-
}
|
| 294 |
-
|
| 295 |
-
.output-container strong {
|
| 296 |
-
color: #00ffcc !important;
|
| 297 |
-
}
|
| 298 |
-
|
| 299 |
-
.output-container hr {
|
| 300 |
-
border: none !important;
|
| 301 |
-
border-top: 1px solid #2d3748 !important;
|
| 302 |
-
margin: 20px 0 !important;
|
| 303 |
-
}
|
| 304 |
-
|
| 305 |
-
/* API Config Section */
|
| 306 |
-
.api-config {
|
| 307 |
-
background: #1a1f2e !important;
|
| 308 |
-
border: 1px solid #2d3748 !important;
|
| 309 |
-
border-radius: 8px !important;
|
| 310 |
-
padding: 15px !important;
|
| 311 |
-
margin-bottom: 15px !important;
|
| 312 |
-
}
|
| 313 |
-
|
| 314 |
-
.api-config input {
|
| 315 |
-
background: #0d1117 !important;
|
| 316 |
-
color: #e6e6e6 !important;
|
| 317 |
-
border: 1px solid #2d3748 !important;
|
| 318 |
-
border-radius: 6px !important;
|
| 319 |
-
padding: 10px !important;
|
| 320 |
-
}
|
| 321 |
-
|
| 322 |
-
.api-config input:focus {
|
| 323 |
-
border-color: #00d4aa !important;
|
| 324 |
-
outline: none !important;
|
| 325 |
-
}
|
| 326 |
-
|
| 327 |
-
/* Check API Button */
|
| 328 |
-
.check-api-button {
|
| 329 |
-
background: linear-gradient(135deg, #00a896 0%, #008577 100%) !important;
|
| 330 |
-
color: white !important;
|
| 331 |
-
border: none !important;
|
| 332 |
-
border-radius: 6px !important;
|
| 333 |
-
padding: 10px 20px !important;
|
| 334 |
-
font-weight: 500 !important;
|
| 335 |
-
cursor: pointer !important;
|
| 336 |
-
transition: all 0.3s ease !important;
|
| 337 |
-
}
|
| 338 |
-
|
| 339 |
-
.check-api-button:hover {
|
| 340 |
-
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 341 |
-
box-shadow: 0 4px 12px rgba(0, 168, 150, 0.4) !important;
|
| 342 |
-
}
|
| 343 |
-
|
| 344 |
-
/* Footer */
|
| 345 |
-
.footer {
|
| 346 |
-
text-align: center;
|
| 347 |
-
padding: 20px;
|
| 348 |
-
color: #718096;
|
| 349 |
-
font-size: 0.9rem;
|
| 350 |
-
background: #0d1117;
|
| 351 |
-
border-top: 1px solid #2d3748;
|
| 352 |
-
margin-top: 20px;
|
| 353 |
-
}
|
| 354 |
-
|
| 355 |
-
.footer strong {
|
| 356 |
-
color: #00d4aa;
|
| 357 |
-
}
|
| 358 |
-
|
| 359 |
-
/* Scrollbar Styling */
|
| 360 |
-
::-webkit-scrollbar {
|
| 361 |
-
width: 8px;
|
| 362 |
-
}
|
| 363 |
-
|
| 364 |
-
::-webkit-scrollbar-track {
|
| 365 |
-
background: #0d1117;
|
| 366 |
-
}
|
| 367 |
-
|
| 368 |
-
::-webkit-scrollbar-thumb {
|
| 369 |
-
background: #00d4aa;
|
| 370 |
-
border-radius: 4px;
|
| 371 |
-
}
|
| 372 |
-
|
| 373 |
-
::-webkit-scrollbar-thumb:hover {
|
| 374 |
-
background: #00ffcc;
|
| 375 |
-
}
|
| 376 |
-
|
| 377 |
-
/* Accordion Styling */
|
| 378 |
-
.accordion {
|
| 379 |
-
background: #1a1f2e !important;
|
| 380 |
-
border: 1px solid #2d3748 !important;
|
| 381 |
-
border-radius: 8px !important;
|
| 382 |
-
}
|
| 383 |
-
|
| 384 |
-
.accordion summary {
|
| 385 |
-
color: #00d4aa !important;
|
| 386 |
-
font-weight: 600 !important;
|
| 387 |
-
padding: 12px !important;
|
| 388 |
-
cursor: pointer !important;
|
| 389 |
-
}
|
| 390 |
-
|
| 391 |
-
/* Responsive */
|
| 392 |
-
@media (max-width: 768px) {
|
| 393 |
-
.header-container h1 {
|
| 394 |
-
font-size: 1.5rem;
|
| 395 |
-
}
|
| 396 |
-
|
| 397 |
-
.sidebar {
|
| 398 |
-
height: auto !important;
|
| 399 |
-
border-right: none !important;
|
| 400 |
-
border-bottom: 1px solid #00d4aa !important;
|
| 401 |
-
}
|
| 402 |
-
}
|
| 403 |
-
"""
|
| 404 |
|
| 405 |
# ==================== Gradio Interface ====================
|
| 406 |
|
| 407 |
-
with gr.Blocks(css=
|
| 408 |
|
| 409 |
# Hidden state for API URL
|
| 410 |
api_url_state = gr.State(value="https://Distopia22-icd-cpt-coding-api.hf.space")
|
|
@@ -417,21 +159,21 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(), title="ICD-10 & CPT Codin
|
|
| 417 |
</div>
|
| 418 |
""")
|
| 419 |
|
| 420 |
-
# Main Layout
|
| 421 |
-
with gr.Row():
|
| 422 |
-
|
| 423 |
-
|
|
|
|
| 424 |
gr.HTML('<div class="sidebar-title">📚 Example Cases</div>')
|
| 425 |
|
| 426 |
-
# Example buttons
|
|
|
|
| 427 |
for example_name in EXAMPLES.keys():
|
| 428 |
-
gr.Button(
|
| 429 |
f"📄 {example_name}",
|
| 430 |
elem_classes="example-btn"
|
| 431 |
-
).click(
|
| 432 |
-
fn=lambda name=example_name: load_example(name),
|
| 433 |
-
outputs=gr.Textbox(elem_id="provider_notes_input", visible=False)
|
| 434 |
)
|
|
|
|
| 435 |
|
| 436 |
gr.Markdown("---")
|
| 437 |
|
|
@@ -446,43 +188,31 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(), title="ICD-10 & CPT Codin
|
|
| 446 |
|
| 447 |
check_api_btn = gr.Button("🔍 Check API Status", elem_classes="check-api-button", size="sm")
|
| 448 |
api_status_output = gr.Textbox(label="Status", lines=3, interactive=False)
|
| 449 |
-
|
| 450 |
-
check_api_btn.click(
|
| 451 |
-
fn=check_api_health,
|
| 452 |
-
inputs=[api_url_input],
|
| 453 |
-
outputs=[api_status_output]
|
| 454 |
-
)
|
| 455 |
-
|
| 456 |
-
# Update state when URL changes
|
| 457 |
-
api_url_input.change(
|
| 458 |
-
fn=lambda x: x,
|
| 459 |
-
inputs=[api_url_input],
|
| 460 |
-
outputs=[api_url_state]
|
| 461 |
-
)
|
| 462 |
|
| 463 |
-
# Right Chat Area
|
| 464 |
with gr.Column(scale=3, elem_classes="chat-container"):
|
| 465 |
-
|
|
|
|
| 466 |
output_area = gr.Markdown(
|
| 467 |
value=generate_empty_response(),
|
| 468 |
-
elem_classes="output-
|
| 469 |
-
label="
|
| 470 |
)
|
| 471 |
|
| 472 |
-
# Input Area
|
| 473 |
-
with gr.
|
| 474 |
-
with gr.
|
| 475 |
provider_notes_input = gr.Textbox(
|
| 476 |
label="",
|
| 477 |
placeholder="Enter clinical provider notes here...",
|
| 478 |
-
lines=
|
| 479 |
-
max_lines=
|
| 480 |
-
|
| 481 |
)
|
| 482 |
|
| 483 |
-
with gr.
|
| 484 |
-
send_btn = gr.Button("🚀 Send", elem_classes="send-button", size="
|
| 485 |
-
clear_btn = gr.Button("🗑️ Clear", elem_classes="clear-button", size="
|
| 486 |
|
| 487 |
# Footer
|
| 488 |
gr.HTML("""
|
|
@@ -494,6 +224,13 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(), title="ICD-10 & CPT Codin
|
|
| 494 |
|
| 495 |
# ==================== Event Handlers ====================
|
| 496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 497 |
# Send button - Analyze notes
|
| 498 |
send_btn.click(
|
| 499 |
fn=analyze_provider_notes,
|
|
@@ -507,13 +244,19 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(), title="ICD-10 & CPT Codin
|
|
| 507 |
outputs=[provider_notes_input, output_area]
|
| 508 |
)
|
| 509 |
|
| 510 |
-
#
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
|
| 518 |
# Launch the app
|
| 519 |
if __name__ == "__main__":
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
import json
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
# ==================== API Functions ====================
|
| 7 |
|
|
|
|
| 66 |
return """
|
| 67 |
### 💬 Welcome to ICD-10 & CPT Coding Assistant
|
| 68 |
|
| 69 |
+
Please enter provider notes in the text box below and click **Send** to analyze.
|
| 70 |
|
| 71 |
**Tips:**
|
| 72 |
- Provide detailed clinical documentation
|
| 73 |
- Include symptoms, diagnoses, and procedures
|
| 74 |
- Be specific about treatments and prescriptions
|
| 75 |
+
|
| 76 |
+
**How to use:**
|
| 77 |
+
1. Select an example from the sidebar, or
|
| 78 |
+
2. Type your own clinical notes below
|
| 79 |
+
3. Click the **Send** button
|
| 80 |
+
4. Review the ICD-10 and CPT codes generated
|
| 81 |
"""
|
| 82 |
|
| 83 |
def format_complete_response(result):
|
|
|
|
| 132 |
"""Load example provider notes"""
|
| 133 |
return EXAMPLES.get(example_name, "")
|
| 134 |
|
| 135 |
+
# ==================== Load External CSS ====================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
+
def load_css():
|
| 138 |
+
"""Load external CSS file"""
|
| 139 |
+
css_path = os.path.join(os.path.dirname(__file__), "assets", "styles.css")
|
| 140 |
+
try:
|
| 141 |
+
with open(css_path, "r", encoding="utf-8") as f:
|
| 142 |
+
return f.read()
|
| 143 |
+
except FileNotFoundError:
|
| 144 |
+
print("Warning: styles.css not found")
|
| 145 |
+
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
# ==================== Gradio Interface ====================
|
| 148 |
|
| 149 |
+
with gr.Blocks(css=load_css(), theme=gr.themes.Soft(), title="ICD-10 & CPT Coding Assistant") as demo:
|
| 150 |
|
| 151 |
# Hidden state for API URL
|
| 152 |
api_url_state = gr.State(value="https://Distopia22-icd-cpt-coding-api.hf.space")
|
|
|
|
| 159 |
</div>
|
| 160 |
""")
|
| 161 |
|
| 162 |
+
# Main Layout Container
|
| 163 |
+
with gr.Row(elem_classes="main-container"):
|
| 164 |
+
|
| 165 |
+
# ==================== Left Sidebar ====================
|
| 166 |
+
with gr.Column(scale=1, min_width=280, elem_classes="sidebar"):
|
| 167 |
gr.HTML('<div class="sidebar-title">📚 Example Cases</div>')
|
| 168 |
|
| 169 |
+
# Example buttons with event handlers
|
| 170 |
+
example_buttons = {}
|
| 171 |
for example_name in EXAMPLES.keys():
|
| 172 |
+
btn = gr.Button(
|
| 173 |
f"📄 {example_name}",
|
| 174 |
elem_classes="example-btn"
|
|
|
|
|
|
|
|
|
|
| 175 |
)
|
| 176 |
+
example_buttons[example_name] = btn
|
| 177 |
|
| 178 |
gr.Markdown("---")
|
| 179 |
|
|
|
|
| 188 |
|
| 189 |
check_api_btn = gr.Button("🔍 Check API Status", elem_classes="check-api-button", size="sm")
|
| 190 |
api_status_output = gr.Textbox(label="Status", lines=3, interactive=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
|
| 192 |
+
# ==================== Right Chat Area ====================
|
| 193 |
with gr.Column(scale=3, elem_classes="chat-container"):
|
| 194 |
+
|
| 195 |
+
# Output/Response Area
|
| 196 |
output_area = gr.Markdown(
|
| 197 |
value=generate_empty_response(),
|
| 198 |
+
elem_classes="output-area",
|
| 199 |
+
label=""
|
| 200 |
)
|
| 201 |
|
| 202 |
+
# Input Area (Prompt Box)
|
| 203 |
+
with gr.Group(elem_classes="input-container"):
|
| 204 |
+
with gr.Row():
|
| 205 |
provider_notes_input = gr.Textbox(
|
| 206 |
label="",
|
| 207 |
placeholder="Enter clinical provider notes here...",
|
| 208 |
+
lines=3,
|
| 209 |
+
max_lines=5,
|
| 210 |
+
show_label=False
|
| 211 |
)
|
| 212 |
|
| 213 |
+
with gr.Row():
|
| 214 |
+
send_btn = gr.Button("🚀 Send", elem_classes="send-button", size="sm")
|
| 215 |
+
clear_btn = gr.Button("🗑️ Clear", elem_classes="clear-button", size="sm")
|
| 216 |
|
| 217 |
# Footer
|
| 218 |
gr.HTML("""
|
|
|
|
| 224 |
|
| 225 |
# ==================== Event Handlers ====================
|
| 226 |
|
| 227 |
+
# Example button clicks
|
| 228 |
+
for example_name, btn in example_buttons.items():
|
| 229 |
+
btn.click(
|
| 230 |
+
fn=lambda name=example_name: load_example(name),
|
| 231 |
+
outputs=[provider_notes_input]
|
| 232 |
+
)
|
| 233 |
+
|
| 234 |
# Send button - Analyze notes
|
| 235 |
send_btn.click(
|
| 236 |
fn=analyze_provider_notes,
|
|
|
|
| 244 |
outputs=[provider_notes_input, output_area]
|
| 245 |
)
|
| 246 |
|
| 247 |
+
# Check API Health
|
| 248 |
+
check_api_btn.click(
|
| 249 |
+
fn=check_api_health,
|
| 250 |
+
inputs=[api_url_input],
|
| 251 |
+
outputs=[api_status_output]
|
| 252 |
+
)
|
| 253 |
+
|
| 254 |
+
# Update API URL state when changed
|
| 255 |
+
api_url_input.change(
|
| 256 |
+
fn=lambda x: x,
|
| 257 |
+
inputs=[api_url_input],
|
| 258 |
+
outputs=[api_url_state]
|
| 259 |
+
)
|
| 260 |
|
| 261 |
# Launch the app
|
| 262 |
if __name__ == "__main__":
|
assets/styles.css
CHANGED
|
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* ==================== Global Styles ==================== */
|
| 2 |
+
.gradio-container {
|
| 3 |
+
max-width: 100% !important;
|
| 4 |
+
padding: 0 !important;
|
| 5 |
+
margin: 0 !important;
|
| 6 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%) !important;
|
| 7 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
|
| 8 |
+
height: 100vh !important;
|
| 9 |
+
overflow: hidden !important;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
/* ==================== Header Styling ==================== */
|
| 13 |
+
.header-container {
|
| 14 |
+
background: linear-gradient(90deg, #00d4aa 0%, #00a896 100%);
|
| 15 |
+
padding: 20px 25px;
|
| 16 |
+
text-align: center;
|
| 17 |
+
border-radius: 0;
|
| 18 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 19 |
+
margin: 0;
|
| 20 |
+
position: sticky;
|
| 21 |
+
top: 0;
|
| 22 |
+
z-index: 100;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.header-container h1 {
|
| 26 |
+
color: white;
|
| 27 |
+
font-size: 1.8rem;
|
| 28 |
+
font-weight: 700;
|
| 29 |
+
margin: 0;
|
| 30 |
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.header-container p {
|
| 34 |
+
color: #e0f7f4;
|
| 35 |
+
font-size: 0.95rem;
|
| 36 |
+
margin: 5px 0 0 0;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* ==================== Layout Container ==================== */
|
| 40 |
+
.main-container {
|
| 41 |
+
display: flex;
|
| 42 |
+
height: calc(100vh - 100px);
|
| 43 |
+
overflow: hidden;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
/* ==================== Left Sidebar ==================== */
|
| 47 |
+
.sidebar {
|
| 48 |
+
background: #ffffff !important;
|
| 49 |
+
border-right: 2px solid #e0e7ef !important;
|
| 50 |
+
padding: 20px !important;
|
| 51 |
+
width: 280px !important;
|
| 52 |
+
min-width: 280px !important;
|
| 53 |
+
height: 100% !important;
|
| 54 |
+
overflow-y: auto !important;
|
| 55 |
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05) !important;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.sidebar-title {
|
| 59 |
+
color: #00a896 !important;
|
| 60 |
+
font-size: 1.2rem !important;
|
| 61 |
+
font-weight: 600 !important;
|
| 62 |
+
margin-bottom: 15px !important;
|
| 63 |
+
padding-bottom: 10px !important;
|
| 64 |
+
border-bottom: 2px solid #00d4aa !important;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* ==================== Example Buttons ==================== */
|
| 68 |
+
.example-btn {
|
| 69 |
+
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 70 |
+
color: white !important;
|
| 71 |
+
border: none !important;
|
| 72 |
+
border-radius: 10px !important;
|
| 73 |
+
padding: 12px 15px !important;
|
| 74 |
+
margin: 6px 0 !important;
|
| 75 |
+
font-weight: 500 !important;
|
| 76 |
+
font-size: 0.9rem !important;
|
| 77 |
+
cursor: pointer !important;
|
| 78 |
+
transition: all 0.3s ease !important;
|
| 79 |
+
width: 100% !important;
|
| 80 |
+
text-align: left !important;
|
| 81 |
+
box-shadow: 0 2px 5px rgba(0, 212, 170, 0.2) !important;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.example-btn:hover {
|
| 85 |
+
background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%) !important;
|
| 86 |
+
transform: translateX(5px) !important;
|
| 87 |
+
box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3) !important;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
/* ==================== Right Chat Area ==================== */
|
| 91 |
+
.chat-container {
|
| 92 |
+
flex: 1;
|
| 93 |
+
display: flex;
|
| 94 |
+
flex-direction: column;
|
| 95 |
+
background: #fafbfc !important;
|
| 96 |
+
padding: 20px !important;
|
| 97 |
+
height: 100% !important;
|
| 98 |
+
overflow: hidden !important;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
/* ==================== Output/Response Area ==================== */
|
| 102 |
+
.output-area {
|
| 103 |
+
flex: 1;
|
| 104 |
+
background: white !important;
|
| 105 |
+
border: 1px solid #e0e7ef !important;
|
| 106 |
+
border-radius: 12px !important;
|
| 107 |
+
padding: 20px !important;
|
| 108 |
+
margin-bottom: 15px !important;
|
| 109 |
+
overflow-y: auto !important;
|
| 110 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.output-area h3 {
|
| 114 |
+
color: #00a896 !important;
|
| 115 |
+
border-bottom: 2px solid #00d4aa !important;
|
| 116 |
+
padding-bottom: 8px !important;
|
| 117 |
+
margin-top: 15px !important;
|
| 118 |
+
margin-bottom: 12px !important;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
.output-area strong {
|
| 122 |
+
color: #00a896 !important;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.output-area hr {
|
| 126 |
+
border: none !important;
|
| 127 |
+
border-top: 1px solid #e0e7ef !important;
|
| 128 |
+
margin: 15px 0 !important;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.output-area p {
|
| 132 |
+
color: #2d3748 !important;
|
| 133 |
+
line-height: 1.6 !important;
|
| 134 |
+
margin: 8px 0 !important;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
/* ==================== Input Area (Prompt Box) ==================== */
|
| 138 |
+
.input-container {
|
| 139 |
+
background: white !important;
|
| 140 |
+
border: 2px solid #00d4aa !important;
|
| 141 |
+
border-radius: 12px !important;
|
| 142 |
+
padding: 15px !important;
|
| 143 |
+
box-shadow: 0 4px 12px rgba(0, 212, 170, 0.15) !important;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.input-container textarea {
|
| 147 |
+
background: #fafbfc !important;
|
| 148 |
+
color: #2d3748 !important;
|
| 149 |
+
border: 1px solid #e0e7ef !important;
|
| 150 |
+
border-radius: 8px !important;
|
| 151 |
+
font-size: 0.95rem !important;
|
| 152 |
+
padding: 12px !important;
|
| 153 |
+
resize: none !important;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.input-container textarea:focus {
|
| 157 |
+
border-color: #00d4aa !important;
|
| 158 |
+
outline: none !important;
|
| 159 |
+
box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1) !important;
|
| 160 |
+
background: white !important;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
/* ==================== Button Styling ==================== */
|
| 164 |
+
.send-button {
|
| 165 |
+
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 166 |
+
color: white !important;
|
| 167 |
+
border: none !important;
|
| 168 |
+
border-radius: 8px !important;
|
| 169 |
+
padding: 10px 28px !important;
|
| 170 |
+
font-size: 0.95rem !important;
|
| 171 |
+
font-weight: 600 !important;
|
| 172 |
+
cursor: pointer !important;
|
| 173 |
+
transition: all 0.3s ease !important;
|
| 174 |
+
margin-left: 8px !important;
|
| 175 |
+
box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3) !important;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.send-button:hover {
|
| 179 |
+
background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%) !important;
|
| 180 |
+
box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4) !important;
|
| 181 |
+
transform: translateY(-2px) !important;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.clear-button {
|
| 185 |
+
background: white !important;
|
| 186 |
+
color: #718096 !important;
|
| 187 |
+
border: 1px solid #e0e7ef !important;
|
| 188 |
+
border-radius: 8px !important;
|
| 189 |
+
padding: 10px 28px !important;
|
| 190 |
+
font-size: 0.95rem !important;
|
| 191 |
+
font-weight: 600 !important;
|
| 192 |
+
cursor: pointer !important;
|
| 193 |
+
transition: all 0.3s ease !important;
|
| 194 |
+
margin-left: 8px !important;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
.clear-button:hover {
|
| 198 |
+
background: #f7fafc !important;
|
| 199 |
+
border-color: #cbd5e0 !important;
|
| 200 |
+
color: #4a5568 !important;
|
| 201 |
+
transform: translateY(-2px) !important;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
/* ==================== API Configuration ==================== */
|
| 205 |
+
.api-config {
|
| 206 |
+
background: #f7fafc !important;
|
| 207 |
+
border: 1px solid #e0e7ef !important;
|
| 208 |
+
border-radius: 8px !important;
|
| 209 |
+
padding: 12px !important;
|
| 210 |
+
margin-bottom: 12px !important;
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
.api-config input {
|
| 214 |
+
background: white !important;
|
| 215 |
+
color: #2d3748 !important;
|
| 216 |
+
border: 1px solid #e0e7ef !important;
|
| 217 |
+
border-radius: 6px !important;
|
| 218 |
+
padding: 8px 12px !important;
|
| 219 |
+
font-size: 0.9rem !important;
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
.api-config input:focus {
|
| 223 |
+
border-color: #00d4aa !important;
|
| 224 |
+
outline: none !important;
|
| 225 |
+
box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1) !important;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.check-api-button {
|
| 229 |
+
background: linear-gradient(135deg, #00a896 0%, #008577 100%) !important;
|
| 230 |
+
color: white !important;
|
| 231 |
+
border: none !important;
|
| 232 |
+
border-radius: 6px !important;
|
| 233 |
+
padding: 8px 18px !important;
|
| 234 |
+
font-weight: 500 !important;
|
| 235 |
+
font-size: 0.85rem !important;
|
| 236 |
+
cursor: pointer !important;
|
| 237 |
+
transition: all 0.3s ease !important;
|
| 238 |
+
box-shadow: 0 2px 5px rgba(0, 168, 150, 0.2) !important;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.check-api-button:hover {
|
| 242 |
+
background: linear-gradient(135deg, #00d4aa 0%, #00a896 100%) !important;
|
| 243 |
+
box-shadow: 0 4px 10px rgba(0, 168, 150, 0.3) !important;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
/* ==================== Scrollbar Styling ==================== */
|
| 247 |
+
::-webkit-scrollbar {
|
| 248 |
+
width: 8px;
|
| 249 |
+
height: 8px;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
::-webkit-scrollbar-track {
|
| 253 |
+
background: #f1f5f9;
|
| 254 |
+
border-radius: 4px;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
::-webkit-scrollbar-thumb {
|
| 258 |
+
background: #00d4aa;
|
| 259 |
+
border-radius: 4px;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
::-webkit-scrollbar-thumb:hover {
|
| 263 |
+
background: #00a896;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
/* ==================== Accordion Styling ==================== */
|
| 267 |
+
.accordion {
|
| 268 |
+
background: white !important;
|
| 269 |
+
border: 1px solid #e0e7ef !important;
|
| 270 |
+
border-radius: 8px !important;
|
| 271 |
+
margin-bottom: 10px !important;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
.accordion summary {
|
| 275 |
+
color: #00a896 !important;
|
| 276 |
+
font-weight: 600 !important;
|
| 277 |
+
font-size: 0.9rem !important;
|
| 278 |
+
padding: 10px !important;
|
| 279 |
+
cursor: pointer !important;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
/* ==================== Footer ==================== */
|
| 283 |
+
.footer {
|
| 284 |
+
text-align: center;
|
| 285 |
+
padding: 15px;
|
| 286 |
+
color: #718096;
|
| 287 |
+
font-size: 0.85rem;
|
| 288 |
+
background: #ffffff;
|
| 289 |
+
border-top: 1px solid #e0e7ef;
|
| 290 |
+
margin-top: 0;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.footer strong {
|
| 294 |
+
color: #00a896;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
/* ==================== Responsive Design ==================== */
|
| 298 |
+
@media (max-width: 768px) {
|
| 299 |
+
.header-container h1 {
|
| 300 |
+
font-size: 1.3rem;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
.sidebar {
|
| 304 |
+
width: 220px !important;
|
| 305 |
+
min-width: 220px !important;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
.main-container {
|
| 309 |
+
flex-direction: column;
|
| 310 |
+
height: auto;
|
| 311 |
+
}
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
/* ==================== Fix Endless Scrolling ==================== */
|
| 315 |
+
body {
|
| 316 |
+
overflow: hidden !important;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
html {
|
| 320 |
+
overflow: hidden !important;
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
.gradio-container {
|
| 324 |
+
overflow: hidden !important;
|
| 325 |
+
}
|