Spaces:
Sleeping
Sleeping
Commit ·
136ced3
1
Parent(s): d4f3644
Add securrity badge & Material Design
Browse files- Implement AES-256 encryption
- Apply Material Design color palette (#2196F3 blue) for trust
- Hide overflow scrollbars while maintaining functionality
- Add subtle spacing before Analyze button (0.25rem)
- app/main.py +58 -50
app/main.py
CHANGED
|
@@ -120,14 +120,17 @@ css = """
|
|
| 120 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');
|
| 121 |
|
| 122 |
:root {
|
| 123 |
-
/*
|
| 124 |
-
--primary-gradient: linear-gradient(135deg, #
|
|
|
|
| 125 |
--surface-dark: #0B0F19;
|
| 126 |
--surface-glass: rgba(17, 24, 39, 0.7);
|
| 127 |
--border-glass: rgba(255, 255, 255, 0.08);
|
| 128 |
--text-primary: #F9FAFB;
|
| 129 |
--text-secondary: #9CA3AF;
|
| 130 |
-
--accent: #
|
|
|
|
|
|
|
| 131 |
|
| 132 |
--font-heading: 'Outfit', sans-serif;
|
| 133 |
--font-body: 'Inter', sans-serif;
|
|
@@ -216,25 +219,19 @@ span, p, div { font-family: var(--font-body); }
|
|
| 216 |
flex-direction: column !important;
|
| 217 |
}
|
| 218 |
|
| 219 |
-
/* Prevent left column from expanding - constrain height */
|
| 220 |
.gradio-row > .gradio-column:first-child .glass-card {
|
| 221 |
-
max-height:
|
| 222 |
-
overflow
|
| 223 |
-
overflow-x: hidden;
|
| 224 |
}
|
| 225 |
|
| 226 |
-
/*
|
| 227 |
-
.gradio-
|
| 228 |
-
|
| 229 |
}
|
| 230 |
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
border-radius: 3px;
|
| 234 |
-
}
|
| 235 |
-
|
| 236 |
-
.gradio-row > .gradio-column:first-child .glass-card::-webkit-scrollbar-thumb:hover {
|
| 237 |
-
background: rgba(255, 255, 255, 0.3);
|
| 238 |
}
|
| 239 |
|
| 240 |
.card-header {
|
|
@@ -276,17 +273,19 @@ span, p, div { font-family: var(--font-body); }
|
|
| 276 |
/* Primary Button */
|
| 277 |
.primary-btn {
|
| 278 |
background: var(--primary-gradient) !important;
|
| 279 |
-
border:
|
| 280 |
color: white !important;
|
| 281 |
font-weight: 600 !important;
|
| 282 |
padding: 1rem !important;
|
| 283 |
border-radius: 10px !important;
|
| 284 |
-
transition:
|
| 285 |
-
box-shadow: 0 4px 15px rgba(
|
|
|
|
| 286 |
}
|
| 287 |
.primary-btn:hover {
|
| 288 |
transform: translateY(-2px);
|
| 289 |
-
box-shadow: 0 8px 25px rgba(
|
|
|
|
| 290 |
}
|
| 291 |
|
| 292 |
/* Quick Query Buttons */
|
|
@@ -346,20 +345,27 @@ span, p, div { font-family: var(--font-body); }
|
|
| 346 |
color: #60A5FA;
|
| 347 |
}
|
| 348 |
|
| 349 |
-
/*
|
| 350 |
.calendar-badge {
|
| 351 |
-
background:
|
| 352 |
-
color:
|
| 353 |
-
padding: 0.
|
| 354 |
border-radius: 100px;
|
| 355 |
font-weight: 600;
|
| 356 |
text-decoration: none;
|
| 357 |
-
border:
|
| 358 |
-
transition: all 0.
|
|
|
|
|
|
|
| 359 |
}
|
| 360 |
.calendar-badge:hover {
|
| 361 |
-
background:
|
| 362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
}
|
| 364 |
|
| 365 |
/* --- MODEL SELECTOR --- */
|
|
@@ -393,7 +399,7 @@ span, p, div { font-family: var(--font-body); }
|
|
| 393 |
background: var(--primary-gradient) !important;
|
| 394 |
border-color: transparent !important;
|
| 395 |
font-weight: 600 !important;
|
| 396 |
-
box-shadow: 0 3px 12px rgba(
|
| 397 |
}
|
| 398 |
|
| 399 |
.model-status {
|
|
@@ -408,23 +414,25 @@ span, p, div { font-family: var(--font-body); }
|
|
| 408 |
display: flex;
|
| 409 |
align-items: center;
|
| 410 |
gap: 0.75rem;
|
| 411 |
-
background: rgba(
|
| 412 |
-
border: 1px solid rgba(
|
| 413 |
border-radius: 12px;
|
| 414 |
-
padding: 0.
|
| 415 |
-
margin-top: 0.
|
|
|
|
| 416 |
transition: all 0.3s ease;
|
| 417 |
}
|
| 418 |
|
| 419 |
.security-badge:hover {
|
| 420 |
-
background: rgba(
|
| 421 |
-
border-color: rgba(
|
| 422 |
-
box-shadow: 0 0
|
| 423 |
}
|
| 424 |
|
| 425 |
.badge-icon {
|
| 426 |
-
font-size: 1.
|
| 427 |
line-height: 1;
|
|
|
|
| 428 |
}
|
| 429 |
|
| 430 |
.badge-content {
|
|
@@ -432,16 +440,16 @@ span, p, div { font-family: var(--font-body); }
|
|
| 432 |
}
|
| 433 |
|
| 434 |
.badge-title {
|
| 435 |
-
font-size: 0.
|
| 436 |
font-weight: 600;
|
| 437 |
-
color: var(--
|
| 438 |
-
margin-bottom: 0.
|
| 439 |
}
|
| 440 |
|
| 441 |
.badge-subtitle {
|
| 442 |
-
font-size: 0.
|
| 443 |
color: var(--text-secondary);
|
| 444 |
-
opacity: 0.
|
| 445 |
}
|
| 446 |
"""
|
| 447 |
|
|
@@ -453,8 +461,8 @@ with gr.Blocks(css=css, theme=gr.themes.Base(), title="Enterprise RAG") as demo:
|
|
| 453 |
<h1>ENTERPRISE RAG PLATFORM</h1>
|
| 454 |
<p>Secure, Scalable, Agentic Document Intelligence for the Modern Enterprise.</p>
|
| 455 |
<div style="margin-top: 3rem; margin-bottom: 6rem;" id="calendar-button">
|
| 456 |
-
<a href="https://cal.com" target="_blank" class="calendar-badge">
|
| 457 |
-
<span>📅</span> Book
|
| 458 |
</a>
|
| 459 |
</div>
|
| 460 |
</div>
|
|
@@ -489,9 +497,9 @@ with gr.Blocks(css=css, theme=gr.themes.Base(), title="Enterprise RAG") as demo:
|
|
| 489 |
|
| 490 |
load_status = gr.Markdown("", elem_classes="status-message")
|
| 491 |
|
| 492 |
-
#
|
| 493 |
gr.HTML(
|
| 494 |
-
'<div style="margin:
|
| 495 |
)
|
| 496 |
|
| 497 |
gr.Markdown("### OR UPLOAD DOCUMENTS", elem_classes="card-header")
|
|
@@ -512,9 +520,6 @@ with gr.Blocks(css=css, theme=gr.themes.Base(), title="Enterprise RAG") as demo:
|
|
| 512 |
</div>
|
| 513 |
""")
|
| 514 |
|
| 515 |
-
# Spacer before Process button
|
| 516 |
-
gr.HTML('<div style="height: 1.5rem"></div>')
|
| 517 |
-
|
| 518 |
process_btn = gr.Button(
|
| 519 |
"Process Documents", elem_classes="primary-btn"
|
| 520 |
)
|
|
@@ -555,6 +560,9 @@ with gr.Blocks(css=css, theme=gr.themes.Base(), title="Enterprise RAG") as demo:
|
|
| 555 |
elem_classes="gradio-textbox",
|
| 556 |
)
|
| 557 |
|
|
|
|
|
|
|
|
|
|
| 558 |
with gr.Row():
|
| 559 |
ask_btn = gr.Button(
|
| 560 |
"Analyze & Answer", elem_classes="primary-btn", scale=2
|
|
|
|
| 120 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');
|
| 121 |
|
| 122 |
:root {
|
| 123 |
+
/* Material Design Color Palette */
|
| 124 |
+
--primary-gradient: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
|
| 125 |
+
--cta-discovery-gradient: linear-gradient(135deg, #00C853 0%, #00A152 100%);
|
| 126 |
--surface-dark: #0B0F19;
|
| 127 |
--surface-glass: rgba(17, 24, 39, 0.7);
|
| 128 |
--border-glass: rgba(255, 255, 255, 0.08);
|
| 129 |
--text-primary: #F9FAFB;
|
| 130 |
--text-secondary: #9CA3AF;
|
| 131 |
+
--accent: #2196F3;
|
| 132 |
+
--accent-hover: #1976D2;
|
| 133 |
+
--cta-discovery: #00C853;
|
| 134 |
|
| 135 |
--font-heading: 'Outfit', sans-serif;
|
| 136 |
--font-body: 'Inter', sans-serif;
|
|
|
|
| 219 |
flex-direction: column !important;
|
| 220 |
}
|
| 221 |
|
| 222 |
+
/* Prevent left column from expanding - constrain height and hide scrollbar */
|
| 223 |
.gradio-row > .gradio-column:first-child .glass-card {
|
| 224 |
+
max-height: none;
|
| 225 |
+
overflow: visible;
|
|
|
|
| 226 |
}
|
| 227 |
|
| 228 |
+
/* Hide all scrollbars in main container */
|
| 229 |
+
.gradio-container {
|
| 230 |
+
overflow-x: hidden !important;
|
| 231 |
}
|
| 232 |
|
| 233 |
+
body {
|
| 234 |
+
overflow-x: hidden !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
}
|
| 236 |
|
| 237 |
.card-header {
|
|
|
|
| 273 |
/* Primary Button */
|
| 274 |
.primary-btn {
|
| 275 |
background: var(--primary-gradient) !important;
|
| 276 |
+
border: 1px solid rgba(33, 150, 243, 0.3) !important;
|
| 277 |
color: white !important;
|
| 278 |
font-weight: 600 !important;
|
| 279 |
padding: 1rem !important;
|
| 280 |
border-radius: 10px !important;
|
| 281 |
+
transition: all 0.3s ease;
|
| 282 |
+
box-shadow: 0 4px 15px rgba(33, 150, 243, 0.25);
|
| 283 |
+
margin-top: 0 !important;
|
| 284 |
}
|
| 285 |
.primary-btn:hover {
|
| 286 |
transform: translateY(-2px);
|
| 287 |
+
box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.5), 0 8px 25px rgba(33, 150, 243, 0.4);
|
| 288 |
+
border-color: rgba(33, 150, 243, 0.6) !important;
|
| 289 |
}
|
| 290 |
|
| 291 |
/* Quick Query Buttons */
|
|
|
|
| 345 |
color: #60A5FA;
|
| 346 |
}
|
| 347 |
|
| 348 |
+
/* Calendar/Discovery Badge - Professional Green CTA */
|
| 349 |
.calendar-badge {
|
| 350 |
+
background: linear-gradient(135deg, #00C853 0%, #00A152 100%) !important;
|
| 351 |
+
color: white;
|
| 352 |
+
padding: 0.75rem 1.6rem;
|
| 353 |
border-radius: 100px;
|
| 354 |
font-weight: 600;
|
| 355 |
text-decoration: none;
|
| 356 |
+
border: none;
|
| 357 |
+
transition: all 0.3s ease;
|
| 358 |
+
box-shadow: 0 4px 16px rgba(0, 200, 83, 0.35);
|
| 359 |
+
display: inline-block;
|
| 360 |
}
|
| 361 |
.calendar-badge:hover {
|
| 362 |
+
background: linear-gradient(135deg, #00A152 0%, #00853E 100%) !important;
|
| 363 |
+
transform: translateY(-2px);
|
| 364 |
+
box-shadow: 0 6px 24px rgba(0, 200, 83, 0.5);
|
| 365 |
+
}
|
| 366 |
+
.calendar-badge span {
|
| 367 |
+
font-size: 1.1rem;
|
| 368 |
+
margin-right: 0.3rem;
|
| 369 |
}
|
| 370 |
|
| 371 |
/* --- MODEL SELECTOR --- */
|
|
|
|
| 399 |
background: var(--primary-gradient) !important;
|
| 400 |
border-color: transparent !important;
|
| 401 |
font-weight: 600 !important;
|
| 402 |
+
box-shadow: 0 3px 12px rgba(33, 150, 243, 0.4) !important;
|
| 403 |
}
|
| 404 |
|
| 405 |
.model-status {
|
|
|
|
| 414 |
display: flex;
|
| 415 |
align-items: center;
|
| 416 |
gap: 0.75rem;
|
| 417 |
+
background: rgba(255, 255, 255, 0.03) !important;
|
| 418 |
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 419 |
border-radius: 12px;
|
| 420 |
+
padding: 0.5rem 0.8rem;
|
| 421 |
+
margin-top: 0.5rem;
|
| 422 |
+
margin-bottom: 0 !important;
|
| 423 |
transition: all 0.3s ease;
|
| 424 |
}
|
| 425 |
|
| 426 |
.security-badge:hover {
|
| 427 |
+
background: rgba(255, 255, 255, 0.05) !important;
|
| 428 |
+
border-color: rgba(255, 255, 255, 0.15) !important;
|
| 429 |
+
box-shadow: 0 0 15px rgba(100, 100, 100, 0.2);
|
| 430 |
}
|
| 431 |
|
| 432 |
.badge-icon {
|
| 433 |
+
font-size: 1.3rem;
|
| 434 |
line-height: 1;
|
| 435 |
+
opacity: 0.9;
|
| 436 |
}
|
| 437 |
|
| 438 |
.badge-content {
|
|
|
|
| 440 |
}
|
| 441 |
|
| 442 |
.badge-title {
|
| 443 |
+
font-size: 0.85rem;
|
| 444 |
font-weight: 600;
|
| 445 |
+
color: var(--text-primary);
|
| 446 |
+
margin-bottom: 0.15rem;
|
| 447 |
}
|
| 448 |
|
| 449 |
.badge-subtitle {
|
| 450 |
+
font-size: 0.7rem;
|
| 451 |
color: var(--text-secondary);
|
| 452 |
+
opacity: 0.7;
|
| 453 |
}
|
| 454 |
"""
|
| 455 |
|
|
|
|
| 461 |
<h1>ENTERPRISE RAG PLATFORM</h1>
|
| 462 |
<p>Secure, Scalable, Agentic Document Intelligence for the Modern Enterprise.</p>
|
| 463 |
<div style="margin-top: 3rem; margin-bottom: 6rem;" id="calendar-button">
|
| 464 |
+
<a href="https://cal.com/prateekgoel/30m-discovery-call" target="_blank" class="calendar-badge">
|
| 465 |
+
<span>📅</span> Book 30m Discovery Call
|
| 466 |
</a>
|
| 467 |
</div>
|
| 468 |
</div>
|
|
|
|
| 497 |
|
| 498 |
load_status = gr.Markdown("", elem_classes="status-message")
|
| 499 |
|
| 500 |
+
# Horizontal divider - more visible
|
| 501 |
gr.HTML(
|
| 502 |
+
'<div style="margin: 1rem 0; height: 2px; background: rgba(255,255,255,0.2); border-radius: 1px;"></div>'
|
| 503 |
)
|
| 504 |
|
| 505 |
gr.Markdown("### OR UPLOAD DOCUMENTS", elem_classes="card-header")
|
|
|
|
| 520 |
</div>
|
| 521 |
""")
|
| 522 |
|
|
|
|
|
|
|
|
|
|
| 523 |
process_btn = gr.Button(
|
| 524 |
"Process Documents", elem_classes="primary-btn"
|
| 525 |
)
|
|
|
|
| 560 |
elem_classes="gradio-textbox",
|
| 561 |
)
|
| 562 |
|
| 563 |
+
# Small spacing before action button
|
| 564 |
+
gr.HTML('<div style="height: 0.50rem"></div>')
|
| 565 |
+
|
| 566 |
with gr.Row():
|
| 567 |
ask_btn = gr.Button(
|
| 568 |
"Analyze & Answer", elem_classes="primary-btn", scale=2
|