Spaces:
Running
Running
Commit ·
8309422
1
Parent(s): 78982f6
Fix dark mode UI - glassmorphism cards, readable text, improved spacing
Browse files
app.py
CHANGED
|
@@ -18,67 +18,95 @@ DEMO_RESULT = json.loads(SAMPLE_PATH.read_text(encoding="utf-8")) if SAMPLE_PATH
|
|
| 18 |
|
| 19 |
|
| 20 |
CSS = """
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
#uplan-header {
|
| 23 |
-
border-bottom: 1px solid
|
| 24 |
-
padding:
|
| 25 |
-
margin-bottom:
|
| 26 |
}
|
| 27 |
#uplan-header h1 {
|
| 28 |
margin: 0;
|
| 29 |
-
font-size:
|
| 30 |
-
letter-spacing: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
#uplan-header p {
|
| 33 |
-
margin:
|
| 34 |
-
color:
|
| 35 |
font-size: 13px;
|
| 36 |
}
|
| 37 |
.tool-card {
|
| 38 |
-
border: 1px solid
|
| 39 |
-
border-radius:
|
| 40 |
-
padding:
|
| 41 |
-
background:
|
|
|
|
|
|
|
| 42 |
}
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
SEV_COLOR = {
|
| 47 |
-
"critical": ("
|
| 48 |
-
"warning": ("
|
| 49 |
-
"info": ("
|
| 50 |
-
"pass": ("
|
| 51 |
}
|
| 52 |
|
| 53 |
|
| 54 |
def badge(text: str, severity: str) -> str:
|
| 55 |
-
bg, color = SEV_COLOR.get(severity, ("
|
| 56 |
return (
|
| 57 |
-
f"<span style='display:inline-block;padding:
|
| 58 |
f"font-size:11px;font-weight:600;background:{bg};color:{color};"
|
|
|
|
| 59 |
f"margin:2px 3px 2px 0'>{text}</span>"
|
| 60 |
)
|
| 61 |
|
| 62 |
|
| 63 |
def money(value: Any, currency: str = "") -> str:
|
| 64 |
if value is None:
|
| 65 |
-
return "<span style='color:
|
| 66 |
try:
|
| 67 |
-
return f"<b>{currency} {float(value):,.0f}</b>"
|
| 68 |
except (TypeError, ValueError):
|
| 69 |
-
return f"<b>{value}</b>"
|
| 70 |
|
| 71 |
|
| 72 |
def score_bar(score: float) -> str:
|
| 73 |
pct = max(0, min(100, int(score * 100)))
|
| 74 |
-
color = "#
|
| 75 |
return f"""
|
| 76 |
-
<div style='margin-top:
|
| 77 |
-
<div style='display:flex;justify-content:space-between;font-size:12px;margin-bottom:
|
| 78 |
-
<span>Narrative coherence</span><b>{pct}%</b>
|
| 79 |
</div>
|
| 80 |
-
<div style='height:
|
| 81 |
-
<div style='height:
|
| 82 |
</div>
|
| 83 |
</div>
|
| 84 |
"""
|
|
@@ -195,7 +223,7 @@ def run_backend(files: list[Any] | None) -> dict[str, Any]:
|
|
| 195 |
def build_dashboard_html(raw_result: dict[str, Any]) -> str:
|
| 196 |
result = normalize_result(raw_result)
|
| 197 |
if not result:
|
| 198 |
-
return "<p style='color:
|
| 199 |
|
| 200 |
fields = result.get("reliable_fields", {})
|
| 201 |
synthesis = result.get("narrative_synthesis", {})
|
|
@@ -209,83 +237,87 @@ def build_dashboard_html(raw_result: dict[str, Any]) -> str:
|
|
| 209 |
account_total = sum(float(item.get("amount") or 0) for item in fields.get("financial_accounts", []))
|
| 210 |
income_total = sum(float(item.get("annual_amount") or 0) for item in fields.get("income_sources", []))
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
html = f"""
|
| 213 |
-
<div style='font-family:Inter,Arial,sans-serif;font-size:13px;line-height:1.
|
| 214 |
-
<div style='background:
|
| 215 |
<div style='display:flex;justify-content:space-between;align-items:center'>
|
| 216 |
-
<b>Readiness overview</b>{badge(overall, overall_sev)}
|
| 217 |
</div>
|
| 218 |
{score_bar(score)}
|
| 219 |
-
{"<div style='font-size:12px;color:#
|
| 220 |
</div>
|
| 221 |
|
| 222 |
-
<div style='background:
|
| 223 |
-
<b>Parties</b>
|
| 224 |
-
<div style='display:grid;grid-template-columns:1fr 1fr;gap:
|
| 225 |
-
<div><span style='
|
| 226 |
-
<div><span style='
|
| 227 |
</div>
|
| 228 |
-
<div style='margin-top:
|
| 229 |
</div>
|
| 230 |
|
| 231 |
-
<div style='background:
|
| 232 |
-
<b>Financial summary</b>
|
| 233 |
-
<div style='display:grid;grid-template-columns:1fr 1fr;gap:
|
| 234 |
-
<div><span style='
|
| 235 |
-
<div><span style='
|
| 236 |
-
<div><span style='
|
| 237 |
-
<div><span style='
|
| 238 |
</div>
|
| 239 |
</div>
|
| 240 |
"""
|
| 241 |
|
| 242 |
if docs:
|
| 243 |
rows = "".join(
|
| 244 |
-
f"<div style='display:flex;justify-content:space-between;padding:
|
| 245 |
-
f"<span>{doc.get('type','unknown').replace('_',' ').title()}</span>"
|
| 246 |
-
f"<span style='color:
|
| 247 |
for doc in docs
|
| 248 |
)
|
| 249 |
html += card("Documents", rows)
|
| 250 |
|
| 251 |
if fields.get("name_variants"):
|
| 252 |
rows = "".join(
|
| 253 |
-
f"<div style='font-size:12px'><span style='color:
|
| 254 |
for key, value in fields["name_variants"].items()
|
| 255 |
)
|
| 256 |
html += card("Name consistency", rows)
|
| 257 |
|
| 258 |
if findings:
|
| 259 |
rows = "".join(
|
| 260 |
-
f"<div style='padding:8px 0;border-bottom:1px solid
|
| 261 |
-
f"<div><b>{finding.get('rule_id','rule').replace('_',' ').title()}</b> {badge(finding.get('severity','info').title(), finding.get('severity','info'))}</div>"
|
| 262 |
-
f"<div style='font-size:12px;color:
|
| 263 |
f"</div>"
|
| 264 |
for finding in findings
|
| 265 |
)
|
| 266 |
html += card("Agent findings", rows)
|
| 267 |
|
| 268 |
if synthesis.get("compound_flags"):
|
| 269 |
-
rows = "".join(f"<div style='font-size:12px;padding:4px 0'>{item}</div>" for item in synthesis["compound_flags"])
|
| 270 |
-
html += card("Cross-document risks", rows, bg="
|
| 271 |
|
| 272 |
if result.get("next_steps"):
|
| 273 |
rows = "".join(
|
| 274 |
-
f"<div style='display:flex;gap:8px;padding:6px 0;border-bottom:1px solid
|
| 275 |
for step in result["next_steps"]
|
| 276 |
)
|
| 277 |
html += card("Next steps", rows)
|
| 278 |
|
| 279 |
cert = result.get("deletion_cert") or raw_result.get("full_result", {}).get("deletion_cert")
|
| 280 |
if cert:
|
| 281 |
-
html += f"<div style='background:
|
| 282 |
|
| 283 |
html += "</div>"
|
| 284 |
return html
|
| 285 |
|
| 286 |
|
| 287 |
-
def card(title: str, body: str, bg: str = "
|
| 288 |
-
return f"<div style='background:{bg};border:1px solid {border};border-radius:
|
| 289 |
|
| 290 |
|
| 291 |
SYSTEM_PROMPT = """You are Uplan's immigration document consultant AI.
|
|
@@ -351,23 +383,23 @@ def handle_upload(files, demo_mode: bool):
|
|
| 351 |
|
| 352 |
HEADER_HTML = """
|
| 353 |
<div id='uplan-header'>
|
| 354 |
-
<h1>Uplan</h1>
|
| 355 |
-
<p>Immigration document intelligence
|
| 356 |
</div>
|
| 357 |
"""
|
| 358 |
|
| 359 |
|
| 360 |
CHECKLIST_HTML = """
|
| 361 |
-
<div class='tool-card' style='font-size:13px;line-height:1.
|
| 362 |
-
<b>Packet checklist</b><br>
|
| 363 |
-
<span style='color:#
|
| 364 |
-
<span style='color:#
|
| 365 |
-
<span style='color:#
|
| 366 |
-
<hr
|
| 367 |
-
<b>Agent tools</b><br>
|
| 368 |
-
Auditor: document readiness and quality checks<br>
|
| 369 |
-
Strategist: roadmap and missing-evidence checklist<br>
|
| 370 |
-
Synthesis: cross-document risk narrative
|
| 371 |
</div>
|
| 372 |
"""
|
| 373 |
|
|
@@ -403,7 +435,7 @@ def build_ui():
|
|
| 403 |
|
| 404 |
with gr.Column(scale=2, min_width=380):
|
| 405 |
gr.Markdown("### Readiness dashboard")
|
| 406 |
-
dashboard = gr.HTML("<p style='color:
|
| 407 |
|
| 408 |
analyse_btn.click(handle_upload, [upload_box, demo_toggle], [dashboard, chatbot, result_state])
|
| 409 |
send_btn.click(chat_response, [chat_input, chatbot, result_state], [chatbot, chat_input])
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
CSS = """
|
| 21 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
| 22 |
+
|
| 23 |
+
.gradio-container {
|
| 24 |
+
max-width: 1440px !important;
|
| 25 |
+
font-family: 'Inter', sans-serif !important;
|
| 26 |
+
}
|
| 27 |
#uplan-header {
|
| 28 |
+
border-bottom: 1px solid rgba(255,255,255,0.08);
|
| 29 |
+
padding: 16px 0 20px;
|
| 30 |
+
margin-bottom: 16px;
|
| 31 |
}
|
| 32 |
#uplan-header h1 {
|
| 33 |
margin: 0;
|
| 34 |
+
font-size: 28px;
|
| 35 |
+
letter-spacing: -0.5px;
|
| 36 |
+
background: linear-gradient(135deg, #60a5fa, #a78bfa);
|
| 37 |
+
-webkit-background-clip: text;
|
| 38 |
+
-webkit-text-fill-color: transparent;
|
| 39 |
+
font-weight: 700;
|
| 40 |
}
|
| 41 |
#uplan-header p {
|
| 42 |
+
margin: 6px 0 0;
|
| 43 |
+
color: rgba(255,255,255,0.55);
|
| 44 |
font-size: 13px;
|
| 45 |
}
|
| 46 |
.tool-card {
|
| 47 |
+
border: 1px solid rgba(255,255,255,0.1);
|
| 48 |
+
border-radius: 10px;
|
| 49 |
+
padding: 14px;
|
| 50 |
+
background: rgba(255,255,255,0.04);
|
| 51 |
+
backdrop-filter: blur(8px);
|
| 52 |
+
color: rgba(255,255,255,0.85);
|
| 53 |
}
|
| 54 |
+
.tool-card b {
|
| 55 |
+
color: rgba(255,255,255,0.95);
|
| 56 |
+
}
|
| 57 |
+
.tool-card hr {
|
| 58 |
+
border: 0;
|
| 59 |
+
border-top: 1px solid rgba(255,255,255,0.08);
|
| 60 |
+
margin: 10px 0;
|
| 61 |
+
}
|
| 62 |
+
/* Chat input fix */
|
| 63 |
+
.gradio-container textarea {
|
| 64 |
+
min-height: 44px !important;
|
| 65 |
+
}
|
| 66 |
+
/* Better spacing for chat row */
|
| 67 |
+
.gradio-container .gap {
|
| 68 |
+
gap: 8px;
|
| 69 |
+
}
|
| 70 |
+
"
|
| 71 |
|
| 72 |
|
| 73 |
SEV_COLOR = {
|
| 74 |
+
"critical": ("rgba(239,68,68,0.15)", "#f87171"),
|
| 75 |
+
"warning": ("rgba(245,158,11,0.15)", "#fbbf24"),
|
| 76 |
+
"info": ("rgba(96,165,250,0.15)", "#60a5fa"),
|
| 77 |
+
"pass": ("rgba(52,211,153,0.15)", "#34d399"),
|
| 78 |
}
|
| 79 |
|
| 80 |
|
| 81 |
def badge(text: str, severity: str) -> str:
|
| 82 |
+
bg, color = SEV_COLOR.get(severity, ("rgba(255,255,255,0.06)", "rgba(255,255,255,0.6)"))
|
| 83 |
return (
|
| 84 |
+
f"<span style='display:inline-block;padding:3px 10px;border-radius:999px;"
|
| 85 |
f"font-size:11px;font-weight:600;background:{bg};color:{color};"
|
| 86 |
+
f"border:1px solid {color}22;"
|
| 87 |
f"margin:2px 3px 2px 0'>{text}</span>"
|
| 88 |
)
|
| 89 |
|
| 90 |
|
| 91 |
def money(value: Any, currency: str = "") -> str:
|
| 92 |
if value is None:
|
| 93 |
+
return "<span style='color:rgba(255,255,255,0.3)'>not found</span>"
|
| 94 |
try:
|
| 95 |
+
return f"<b style='color:#e2e8f0'>{currency} {float(value):,.0f}</b>"
|
| 96 |
except (TypeError, ValueError):
|
| 97 |
+
return f"<b style='color:#e2e8f0'>{value}</b>"
|
| 98 |
|
| 99 |
|
| 100 |
def score_bar(score: float) -> str:
|
| 101 |
pct = max(0, min(100, int(score * 100)))
|
| 102 |
+
color = "#f87171" if pct < 50 else "#fbbf24" if pct < 75 else "#34d399"
|
| 103 |
return f"""
|
| 104 |
+
<div style='margin-top:10px'>
|
| 105 |
+
<div style='display:flex;justify-content:space-between;font-size:12px;margin-bottom:6px;color:rgba(255,255,255,0.7)'>
|
| 106 |
+
<span>Narrative coherence</span><b style='color:{color}'>{pct}%</b>
|
| 107 |
</div>
|
| 108 |
+
<div style='height:8px;background:rgba(255,255,255,0.08);border-radius:999px;overflow:hidden'>
|
| 109 |
+
<div style='height:8px;width:{pct}%;background:linear-gradient(90deg,{color}cc,{color});border-radius:999px;transition:width 0.5s ease'></div>
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
"""
|
|
|
|
| 223 |
def build_dashboard_html(raw_result: dict[str, Any]) -> str:
|
| 224 |
result = normalize_result(raw_result)
|
| 225 |
if not result:
|
| 226 |
+
return "<p style='color:rgba(255,255,255,0.4);padding:16px'>Upload documents or run demo mode to begin.</p>"
|
| 227 |
|
| 228 |
fields = result.get("reliable_fields", {})
|
| 229 |
synthesis = result.get("narrative_synthesis", {})
|
|
|
|
| 237 |
account_total = sum(float(item.get("amount") or 0) for item in fields.get("financial_accounts", []))
|
| 238 |
income_total = sum(float(item.get("annual_amount") or 0) for item in fields.get("income_sources", []))
|
| 239 |
|
| 240 |
+
label_style = "color:rgba(255,255,255,0.45);font-size:11px;text-transform:uppercase;letter-spacing:0.5px"
|
| 241 |
+
card_bg = "rgba(255,255,255,0.04)"
|
| 242 |
+
card_border = "rgba(255,255,255,0.08)"
|
| 243 |
+
|
| 244 |
html = f"""
|
| 245 |
+
<div style='font-family:Inter,Arial,sans-serif;font-size:13px;line-height:1.6;color:rgba(255,255,255,0.85)'>
|
| 246 |
+
<div style='background:linear-gradient(135deg,rgba(96,165,250,0.08),rgba(167,139,250,0.08));border:1px solid {card_border};border-radius:10px;padding:16px;margin-bottom:12px'>
|
| 247 |
<div style='display:flex;justify-content:space-between;align-items:center'>
|
| 248 |
+
<b style='color:#e2e8f0'>Readiness overview</b>{badge(overall, overall_sev)}
|
| 249 |
</div>
|
| 250 |
{score_bar(score)}
|
| 251 |
+
{"<div style='font-size:12px;color:#f87171;margin-top:8px'>⚠ Human review required</div>" if synthesis.get("human_review_required") else ""}
|
| 252 |
</div>
|
| 253 |
|
| 254 |
+
<div style='background:{card_bg};border:1px solid {card_border};border-radius:10px;padding:16px;margin-bottom:12px'>
|
| 255 |
+
<b style='color:#e2e8f0'>Parties</b>
|
| 256 |
+
<div style='display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px'>
|
| 257 |
+
<div><span style='{label_style}'>Applicant</span><br><b style='color:#e2e8f0'>{result.get("applicant_name") or fields.get("beneficiary_name") or "not found"}</b></div>
|
| 258 |
+
<div><span style='{label_style}'>Sponsor</span><br><b style='color:#e2e8f0'>{result.get("sponsor_name") or "not found"}</b></div>
|
| 259 |
</div>
|
| 260 |
+
<div style='margin-top:8px;color:rgba(255,255,255,0.6)'>Relationship: <b style='color:#e2e8f0'>{result.get("sponsor_relationship") or fields.get("spon_relationship") or "not found"}</b></div>
|
| 261 |
</div>
|
| 262 |
|
| 263 |
+
<div style='background:{card_bg};border:1px solid {card_border};border-radius:10px;padding:16px;margin-bottom:12px'>
|
| 264 |
+
<b style='color:#e2e8f0'>Financial summary</b>
|
| 265 |
+
<div style='display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px'>
|
| 266 |
+
<div><span style='{label_style}'>Required funds</span><br>{money(t_req, currency)}</div>
|
| 267 |
+
<div><span style='{label_style}'>Liquid / deposit evidence</span><br>{money(account_total or fields.get("balance_closing"), currency)}</div>
|
| 268 |
+
<div><span style='{label_style}'>Affidavit income</span><br>{money(fields.get("i_aff") or income_total, currency)}</div>
|
| 269 |
+
<div><span style='{label_style}'>Tax verified income</span><br>{money(fields.get("i_tax"), currency)}</div>
|
| 270 |
</div>
|
| 271 |
</div>
|
| 272 |
"""
|
| 273 |
|
| 274 |
if docs:
|
| 275 |
rows = "".join(
|
| 276 |
+
f"<div style='display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid rgba(255,255,255,0.06)'>"
|
| 277 |
+
f"<span style='color:rgba(255,255,255,0.8)'>{doc.get('type','unknown').replace('_',' ').title()}</span>"
|
| 278 |
+
f"<span style='color:rgba(255,255,255,0.45)'>{doc.get('pages',0)}p · {doc.get('quality','unknown')} · {badge(doc.get('status','seen'), 'pass')}</span></div>"
|
| 279 |
for doc in docs
|
| 280 |
)
|
| 281 |
html += card("Documents", rows)
|
| 282 |
|
| 283 |
if fields.get("name_variants"):
|
| 284 |
rows = "".join(
|
| 285 |
+
f"<div style='font-size:12px;color:rgba(255,255,255,0.7)'><span style='color:rgba(255,255,255,0.4)'>{key.replace('_',' ').title()}</span>: <span style='color:#e2e8f0'>{value}</span></div>"
|
| 286 |
for key, value in fields["name_variants"].items()
|
| 287 |
)
|
| 288 |
html += card("Name consistency", rows)
|
| 289 |
|
| 290 |
if findings:
|
| 291 |
rows = "".join(
|
| 292 |
+
f"<div style='padding:8px 0;border-bottom:1px solid rgba(255,255,255,0.06)'>"
|
| 293 |
+
f"<div><b style='color:#e2e8f0'>{finding.get('rule_id','rule').replace('_',' ').title()}</b> {badge(finding.get('severity','info').title(), finding.get('severity','info'))}</div>"
|
| 294 |
+
f"<div style='font-size:12px;color:rgba(255,255,255,0.55);margin-top:3px'>{finding.get('message','')}</div>"
|
| 295 |
f"</div>"
|
| 296 |
for finding in findings
|
| 297 |
)
|
| 298 |
html += card("Agent findings", rows)
|
| 299 |
|
| 300 |
if synthesis.get("compound_flags"):
|
| 301 |
+
rows = "".join(f"<div style='font-size:12px;padding:4px 0;color:rgba(255,255,255,0.75)'>{item}</div>" for item in synthesis["compound_flags"])
|
| 302 |
+
html += card("Cross-document risks", rows, bg="rgba(245,158,11,0.08)", border="rgba(245,158,11,0.2)")
|
| 303 |
|
| 304 |
if result.get("next_steps"):
|
| 305 |
rows = "".join(
|
| 306 |
+
f"<div style='display:flex;gap:8px;padding:6px 0;border-bottom:1px solid rgba(255,255,255,0.06);align-items:flex-start'>{badge(step.get('priority','info').upper(), step.get('priority','info'))}<span style='color:rgba(255,255,255,0.75)'>{step.get('action','')}</span></div>"
|
| 307 |
for step in result["next_steps"]
|
| 308 |
)
|
| 309 |
html += card("Next steps", rows)
|
| 310 |
|
| 311 |
cert = result.get("deletion_cert") or raw_result.get("full_result", {}).get("deletion_cert")
|
| 312 |
if cert:
|
| 313 |
+
html += f"<div style='background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:10px;padding:12px;margin-bottom:4px'><div style='font-size:11px;color:rgba(255,255,255,0.4)'>Deletion certificate</div><pre style='white-space:pre-wrap;font-size:10px;color:rgba(255,255,255,0.55);margin-top:6px'>{cert}</pre></div>"
|
| 314 |
|
| 315 |
html += "</div>"
|
| 316 |
return html
|
| 317 |
|
| 318 |
|
| 319 |
+
def card(title: str, body: str, bg: str = "rgba(255,255,255,0.04)", border: str = "rgba(255,255,255,0.08)") -> str:
|
| 320 |
+
return f"<div style='background:{bg};border:1px solid {border};border-radius:10px;padding:16px;margin-bottom:12px;backdrop-filter:blur(8px)'><b style='color:#e2e8f0'>{title}</b><div style='margin-top:9px'>{body}</div></div>"
|
| 321 |
|
| 322 |
|
| 323 |
SYSTEM_PROMPT = """You are Uplan's immigration document consultant AI.
|
|
|
|
| 383 |
|
| 384 |
HEADER_HTML = """
|
| 385 |
<div id='uplan-header'>
|
| 386 |
+
<h1>⚡ Uplan</h1>
|
| 387 |
+
<p>Immigration document intelligence — reads financial packets, audits evidence quality, flags inconsistencies, and builds a readiness roadmap.</p>
|
| 388 |
</div>
|
| 389 |
"""
|
| 390 |
|
| 391 |
|
| 392 |
CHECKLIST_HTML = """
|
| 393 |
+
<div class='tool-card' style='font-size:13px;line-height:1.9'>
|
| 394 |
+
<b>📋 Packet checklist</b><br>
|
| 395 |
+
<span style='color:#f87171'>Required:</span> affidavit, bank statement, tax return<br>
|
| 396 |
+
<span style='color:#fbbf24'>Recommended:</span> bank balance certificate<br>
|
| 397 |
+
<span style='color:#60a5fa'>Optional:</span> passport / identity document
|
| 398 |
+
<hr>
|
| 399 |
+
<b>🤖 Agent tools</b><br>
|
| 400 |
+
<span style='color:rgba(255,255,255,0.6)'>Auditor:</span> document readiness and quality checks<br>
|
| 401 |
+
<span style='color:rgba(255,255,255,0.6)'>Strategist:</span> roadmap and missing-evidence checklist<br>
|
| 402 |
+
<span style='color:rgba(255,255,255,0.6)'>Synthesis:</span> cross-document risk narrative
|
| 403 |
</div>
|
| 404 |
"""
|
| 405 |
|
|
|
|
| 435 |
|
| 436 |
with gr.Column(scale=2, min_width=380):
|
| 437 |
gr.Markdown("### Readiness dashboard")
|
| 438 |
+
dashboard = gr.HTML("<p style='color:rgba(255,255,255,0.4);padding:16px;text-align:center'>Load demo or upload documents to begin.</p>")
|
| 439 |
|
| 440 |
analyse_btn.click(handle_upload, [upload_box, demo_toggle], [dashboard, chatbot, result_state])
|
| 441 |
send_btn.click(chat_response, [chat_input, chatbot, result_state], [chatbot, chat_input])
|