Spaces:
Sleeping
Sleeping
Commit ·
1839f85
1
Parent(s): 4412848
feat: premium dark medical UI — navy/cyan theme
Browse files
app.py
CHANGED
|
@@ -171,200 +171,292 @@ LOGO_ITU = _encode_logo(str(Path(__file__).parent / "ITULog.png"))
|
|
| 171 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 172 |
|
| 173 |
CSS = """
|
| 174 |
-
|
|
|
|
| 175 |
:root {
|
| 176 |
-
--
|
| 177 |
-
--
|
| 178 |
-
--
|
| 179 |
-
--
|
| 180 |
-
--
|
| 181 |
-
--
|
| 182 |
-
--
|
| 183 |
-
--
|
| 184 |
-
--
|
| 185 |
-
--
|
| 186 |
-
--
|
| 187 |
-
--
|
| 188 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
}
|
|
|
|
| 190 |
|
| 191 |
body, .gradio-container {
|
| 192 |
-
background: var(--
|
| 193 |
-
font-family:
|
| 194 |
-
color: var(--
|
|
|
|
| 195 |
}
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
-
/* ── Header
|
| 198 |
#header {
|
| 199 |
-
background: var(--
|
| 200 |
-
border-bottom:
|
| 201 |
-
padding:
|
| 202 |
display: flex;
|
| 203 |
align-items: center;
|
| 204 |
justify-content: space-between;
|
| 205 |
-
|
| 206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
}
|
| 208 |
-
#logo-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
font-weight: 700;
|
| 212 |
-
color: var(--accent);
|
| 213 |
-
letter-spacing: 1px;
|
| 214 |
}
|
| 215 |
-
#logo-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
letter-spacing: 0;
|
| 221 |
}
|
|
|
|
| 222 |
|
| 223 |
-
/* ──
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
.tab-nav button {
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
padding:
|
| 230 |
-
|
| 231 |
}
|
|
|
|
| 232 |
.tab-nav button.selected {
|
| 233 |
-
color: var(--
|
| 234 |
-
border-bottom-color: var(--
|
|
|
|
| 235 |
}
|
| 236 |
|
| 237 |
-
/* ── Cards ── */
|
| 238 |
.card {
|
| 239 |
-
background: var(--
|
| 240 |
-
border: 1px solid var(--border);
|
| 241 |
-
border-radius: var(--radius);
|
| 242 |
-
padding: 22px;
|
| 243 |
-
box-shadow: var(--shadow);
|
| 244 |
-
margin-bottom: 16px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
}
|
| 246 |
.card-title {
|
| 247 |
-
font-size:
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
margin-bottom: 12px;
|
| 253 |
-
padding-bottom: 8px;
|
| 254 |
-
border-bottom: 1px solid var(--primary-lt);
|
| 255 |
}
|
| 256 |
|
| 257 |
-
/* ── Upload zone ── */
|
| 258 |
-
#upload-zone {
|
| 259 |
-
border:
|
| 260 |
border-radius: var(--radius) !important;
|
| 261 |
-
background: var(--
|
| 262 |
-
min-height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
|
| 265 |
-
/* ── Sliders ── */
|
| 266 |
-
input[type=range] { accent-color: var(--
|
| 267 |
-
.gradio-slider label
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
|
| 269 |
-
/* ── Buttons ── */
|
| 270 |
#btn-analyse {
|
| 271 |
-
background: var(--
|
| 272 |
-
color:
|
| 273 |
-
border:
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
font-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
|
|
|
|
|
|
|
|
|
| 281 |
}
|
| 282 |
-
#btn-analyse:hover { background: #155d90 !important; }
|
| 283 |
#btn-reset {
|
| 284 |
-
background: transparent !important;
|
| 285 |
-
|
| 286 |
-
border:
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
padding:
|
| 290 |
-
|
| 291 |
-
width: 100% !important;
|
| 292 |
}
|
|
|
|
| 293 |
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
|
|
|
|
|
|
| 300 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
.metric-badge {
|
| 302 |
-
flex: 1;
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
|
|
|
|
|
|
| 309 |
}
|
| 310 |
.metric-badge .val {
|
| 311 |
-
font-size: 22px;
|
| 312 |
-
font-
|
| 313 |
-
color: var(--primary);
|
| 314 |
}
|
| 315 |
-
.metric-badge .val.ischemic
|
| 316 |
-
.metric-badge .val.borderline
|
| 317 |
-
.metric-badge .val.ok
|
| 318 |
.metric-badge .lbl {
|
| 319 |
-
font-size:
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
letter-spacing: 0.4px;
|
| 323 |
}
|
| 324 |
|
| 325 |
-
/* ──
|
| 326 |
-
#
|
| 327 |
-
border-radius: var(--radius);
|
| 328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
}
|
| 330 |
|
| 331 |
-
/* ──
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
border
|
| 335 |
-
font-size: 13px;
|
| 336 |
-
font-weight: 500;
|
| 337 |
-
border: 1px solid var(--border);
|
| 338 |
-
background: var(--primary-lt);
|
| 339 |
-
color: var(--primary);
|
| 340 |
}
|
|
|
|
| 341 |
|
| 342 |
-
/* ──
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
#footer {
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
"""
|
| 352 |
|
|
|
|
| 353 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 354 |
# HEADER HTML
|
| 355 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 356 |
|
| 357 |
def _header_html() -> str:
|
| 358 |
-
itu_tag = (f'<img src="{LOGO_ITU}" alt="ITU
|
| 359 |
if LOGO_ITU else
|
| 360 |
-
'<span style="font-
|
| 361 |
return f"""
|
| 362 |
<div id="header">
|
| 363 |
-
<div id="logo-itu">{itu_tag}</div>
|
| 364 |
<div id="logo-angio">
|
| 365 |
-
|
| 366 |
-
<
|
| 367 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
</div>"""
|
| 369 |
|
| 370 |
# ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -1565,31 +1657,44 @@ with gr.Blocks(css=CSS, title="Angio AI") as demo:
|
|
| 1565 |
with gr.Column(scale=1):
|
| 1566 |
gr.HTML("""
|
| 1567 |
<div class="card">
|
| 1568 |
-
<div class="card-title">
|
| 1569 |
-
<
|
| 1570 |
-
<
|
| 1571 |
-
|
| 1572 |
-
|
| 1573 |
-
<
|
| 1574 |
-
<
|
| 1575 |
-
|
| 1576 |
-
|
| 1577 |
-
|
| 1578 |
-
|
| 1579 |
-
|
| 1580 |
-
|
| 1581 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1582 |
</div>
|
| 1583 |
</div>
|
| 1584 |
<div class="card">
|
| 1585 |
-
<div class="card-title">
|
| 1586 |
-
<div style="font-size:
|
| 1587 |
-
|
| 1588 |
-
<
|
| 1589 |
-
<
|
| 1590 |
-
<code>mask2former_best.pth</code><br>
|
| 1591 |
-
<code>binary_best.pth</code><br>
|
| 1592 |
-
<code>best.pt</code>
|
| 1593 |
</div>
|
| 1594 |
</div>
|
| 1595 |
""")
|
|
|
|
| 171 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 172 |
|
| 173 |
CSS = """
|
| 174 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');
|
| 175 |
+
|
| 176 |
:root {
|
| 177 |
+
--navy-950: #040d1a;
|
| 178 |
+
--navy-900: #071224;
|
| 179 |
+
--navy-800: #0d1e38;
|
| 180 |
+
--navy-700: #112a50;
|
| 181 |
+
--navy-600: #1a3a68;
|
| 182 |
+
--cyan-400: #22d3ee;
|
| 183 |
+
--cyan-300: #67e8f9;
|
| 184 |
+
--cyan-glow: rgba(34,211,238,0.12);
|
| 185 |
+
--green-400: #34d399;
|
| 186 |
+
--red-400: #f87171;
|
| 187 |
+
--amber-400: #fbbf24;
|
| 188 |
+
--white: #f0f9ff;
|
| 189 |
+
--w60: rgba(240,249,255,0.60);
|
| 190 |
+
--w30: rgba(240,249,255,0.30);
|
| 191 |
+
--w10: rgba(240,249,255,0.08);
|
| 192 |
+
--border: rgba(34,211,238,0.18);
|
| 193 |
+
--border-s: rgba(240,249,255,0.09);
|
| 194 |
+
--shadow: 0 4px 24px rgba(0,0,0,0.40);
|
| 195 |
+
--radius: 12px;
|
| 196 |
+
--radius-s: 8px;
|
| 197 |
+
--font: 'Inter', system-ui, sans-serif;
|
| 198 |
+
--mono: 'JetBrains Mono', 'Courier New', monospace;
|
| 199 |
}
|
| 200 |
+
*, *::before, *::after { box-sizing: border-box; }
|
| 201 |
|
| 202 |
body, .gradio-container {
|
| 203 |
+
background: var(--navy-950) !important;
|
| 204 |
+
font-family: var(--font) !important;
|
| 205 |
+
color: var(--white) !important;
|
| 206 |
+
min-height: 100vh;
|
| 207 |
}
|
| 208 |
+
.gradio-container { padding: 0 !important; max-width: 100% !important; }
|
| 209 |
+
footer { display: none !important; }
|
| 210 |
+
.gap { gap: 16px !important; }
|
| 211 |
|
| 212 |
+
/* ── Header ─────────────────────────────────────────────────────────── */
|
| 213 |
#header {
|
| 214 |
+
background: var(--navy-900);
|
| 215 |
+
border-bottom: 1px solid var(--border-s);
|
| 216 |
+
padding: 0 32px;
|
| 217 |
display: flex;
|
| 218 |
align-items: center;
|
| 219 |
justify-content: space-between;
|
| 220 |
+
min-height: 72px;
|
| 221 |
+
position: relative;
|
| 222 |
+
overflow: hidden;
|
| 223 |
+
}
|
| 224 |
+
#header::after {
|
| 225 |
+
content: '';
|
| 226 |
+
position: absolute;
|
| 227 |
+
bottom: 0; left: 0; right: 0; height: 2px;
|
| 228 |
+
background: linear-gradient(90deg,
|
| 229 |
+
transparent 0%, var(--cyan-400) 15%, var(--cyan-400) 17%,
|
| 230 |
+
transparent 19%, transparent 24%,
|
| 231 |
+
var(--cyan-400) 26%, #fff 28%, var(--cyan-400) 30%,
|
| 232 |
+
transparent 32%, transparent 38%,
|
| 233 |
+
var(--cyan-400) 40%, var(--cyan-400) 42%,
|
| 234 |
+
transparent 44%, transparent 100%);
|
| 235 |
+
opacity: 0.7;
|
| 236 |
+
}
|
| 237 |
+
#logo-angio .name {
|
| 238 |
+
font-size: 22px; font-weight: 700;
|
| 239 |
+
color: var(--cyan-400) !important;
|
| 240 |
+
letter-spacing: 3px; text-transform: uppercase;
|
| 241 |
+
font-family: var(--mono) !important;
|
| 242 |
}
|
| 243 |
+
#logo-angio .sub {
|
| 244 |
+
font-size: 10px; color: var(--w60) !important;
|
| 245 |
+
letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px;
|
|
|
|
|
|
|
|
|
|
| 246 |
}
|
| 247 |
+
#logo-itu img { height: 44px; filter: brightness(0) invert(1) opacity(0.65); }
|
| 248 |
+
.header-meta {
|
| 249 |
+
text-align: right; font-size: 11px;
|
| 250 |
+
color: var(--w60) !important; line-height: 1.7;
|
| 251 |
+
font-family: var(--mono) !important;
|
|
|
|
| 252 |
}
|
| 253 |
+
.header-meta b { color: var(--cyan-300) !important; font-weight: 600; }
|
| 254 |
|
| 255 |
+
/* ── Tabs ─────────────────────────────────────────────────────────── */
|
| 256 |
+
.tab-nav {
|
| 257 |
+
background: var(--navy-900) !important;
|
| 258 |
+
border-bottom: 1px solid var(--border-s) !important;
|
| 259 |
+
padding: 0 24px !important;
|
| 260 |
+
}
|
| 261 |
.tab-nav button {
|
| 262 |
+
font-family: var(--font) !important; font-size: 13px !important;
|
| 263 |
+
font-weight: 500 !important; color: var(--w60) !important;
|
| 264 |
+
background: transparent !important; border: none !important;
|
| 265 |
+
border-bottom: 2px solid transparent !important;
|
| 266 |
+
padding: 14px 20px !important;
|
| 267 |
+
transition: color 0.2s, border-color 0.2s !important;
|
| 268 |
}
|
| 269 |
+
.tab-nav button:hover { color: var(--white) !important; }
|
| 270 |
.tab-nav button.selected {
|
| 271 |
+
color: var(--cyan-400) !important;
|
| 272 |
+
border-bottom-color: var(--cyan-400) !important;
|
| 273 |
+
font-weight: 600 !important;
|
| 274 |
}
|
| 275 |
|
| 276 |
+
/* ── Cards ────────────────────────────────────────────────────────── */
|
| 277 |
.card {
|
| 278 |
+
background: var(--navy-800) !important;
|
| 279 |
+
border: 1px solid var(--border-s) !important;
|
| 280 |
+
border-radius: var(--radius) !important;
|
| 281 |
+
padding: 20px 22px !important;
|
| 282 |
+
box-shadow: var(--shadow) !important;
|
| 283 |
+
margin-bottom: 16px !important;
|
| 284 |
+
position: relative; overflow: hidden;
|
| 285 |
+
}
|
| 286 |
+
.card::before {
|
| 287 |
+
content: ''; position: absolute;
|
| 288 |
+
top: 0; left: 0; right: 0; height: 1px;
|
| 289 |
+
background: linear-gradient(90deg, transparent, var(--cyan-400), transparent);
|
| 290 |
+
opacity: 0.35;
|
| 291 |
}
|
| 292 |
.card-title {
|
| 293 |
+
font-size: 10px !important; font-weight: 600 !important;
|
| 294 |
+
color: var(--cyan-400) !important; text-transform: uppercase !important;
|
| 295 |
+
letter-spacing: 2px !important; margin-bottom: 14px !important;
|
| 296 |
+
padding-bottom: 10px !important; border-bottom: 1px solid var(--border-s) !important;
|
| 297 |
+
font-family: var(--mono) !important;
|
|
|
|
|
|
|
|
|
|
| 298 |
}
|
| 299 |
|
| 300 |
+
/* ── Upload zone ──────────────────────────────────────────────────── */
|
| 301 |
+
#upload-zone, #upload-zone > div {
|
| 302 |
+
border: 1px dashed var(--cyan-400) !important;
|
| 303 |
border-radius: var(--radius) !important;
|
| 304 |
+
background: var(--cyan-glow) !important;
|
| 305 |
+
min-height: 160px !important;
|
| 306 |
+
transition: all 0.2s !important;
|
| 307 |
+
}
|
| 308 |
+
#upload-zone:hover {
|
| 309 |
+
border-color: var(--cyan-300) !important;
|
| 310 |
+
box-shadow: 0 0 20px var(--cyan-glow) !important;
|
| 311 |
}
|
| 312 |
+
#upload-zone label, #upload-zone span, #upload-zone p {
|
| 313 |
+
color: var(--w60) !important; font-size: 13px !important;
|
| 314 |
+
}
|
| 315 |
+
#upload-zone svg { stroke: var(--cyan-400) !important; opacity: 0.6; }
|
| 316 |
|
| 317 |
+
/* ── Sliders ──────────────────────────────────────────────────────── */
|
| 318 |
+
input[type=range] { accent-color: var(--cyan-400) !important; }
|
| 319 |
+
.gradio-slider label, .gradio-slider .label-wrap span {
|
| 320 |
+
color: var(--w60) !important; font-size: 12px !important;
|
| 321 |
+
font-family: var(--mono) !important;
|
| 322 |
+
}
|
| 323 |
+
.gradio-slider .info { color: var(--w30) !important; font-size: 11px !important; }
|
| 324 |
|
| 325 |
+
/* ── Buttons ──────────────────────────────────────────────────────── */
|
| 326 |
#btn-analyse {
|
| 327 |
+
background: linear-gradient(135deg, #0ea5e9, var(--cyan-400)) !important;
|
| 328 |
+
color: var(--navy-950) !important; border: none !important;
|
| 329 |
+
border-radius: var(--radius-s) !important;
|
| 330 |
+
font-size: 12px !important; font-weight: 700 !important;
|
| 331 |
+
padding: 13px 32px !important; letter-spacing: 2px !important;
|
| 332 |
+
text-transform: uppercase !important; font-family: var(--mono) !important;
|
| 333 |
+
cursor: pointer !important; width: 100% !important;
|
| 334 |
+
box-shadow: 0 0 24px rgba(34,211,238,0.30) !important;
|
| 335 |
+
transition: all 0.2s !important;
|
| 336 |
+
}
|
| 337 |
+
#btn-analyse:hover {
|
| 338 |
+
box-shadow: 0 0 36px rgba(34,211,238,0.50) !important;
|
| 339 |
+
transform: translateY(-1px) !important;
|
| 340 |
}
|
|
|
|
| 341 |
#btn-reset {
|
| 342 |
+
background: transparent !important; color: var(--w60) !important;
|
| 343 |
+
border: 1px solid var(--border-s) !important;
|
| 344 |
+
border-radius: var(--radius-s) !important;
|
| 345 |
+
font-size: 11px !important; font-family: var(--mono) !important;
|
| 346 |
+
letter-spacing: 1px !important; text-transform: uppercase !important;
|
| 347 |
+
padding: 10px 20px !important; cursor: pointer !important;
|
| 348 |
+
width: 100% !important; transition: all 0.2s !important;
|
|
|
|
| 349 |
}
|
| 350 |
+
#btn-reset:hover { border-color: var(--w30) !important; color: var(--white) !important; }
|
| 351 |
|
| 352 |
+
button.sm.secondary, button.lg.secondary {
|
| 353 |
+
background: transparent !important; color: var(--cyan-400) !important;
|
| 354 |
+
border: 1px solid var(--border) !important;
|
| 355 |
+
border-radius: var(--radius-s) !important;
|
| 356 |
+
font-size: 11px !important; font-family: var(--mono) !important;
|
| 357 |
+
letter-spacing: 1.5px !important; text-transform: uppercase !important;
|
| 358 |
+
width: 100% !important; padding: 9px 12px !important;
|
| 359 |
+
margin-top: 8px !important; transition: all 0.2s !important;
|
| 360 |
}
|
| 361 |
+
button.sm.secondary:hover, button.lg.secondary:hover {
|
| 362 |
+
background: var(--cyan-glow) !important;
|
| 363 |
+
box-shadow: 0 0 16px var(--cyan-glow) !important;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
/* ── Metric badges ────────────────────────────────────────────────── */
|
| 367 |
+
.metric-row { display:flex !important; gap:10px !important; flex-wrap:wrap !important; margin-bottom:16px !important; }
|
| 368 |
.metric-badge {
|
| 369 |
+
flex: 1 !important; min-width: 100px !important;
|
| 370 |
+
background: var(--navy-900) !important; border: 1px solid var(--border-s) !important;
|
| 371 |
+
border-radius: var(--radius-s) !important; padding: 14px 10px !important;
|
| 372 |
+
text-align: center !important; position: relative; overflow: hidden;
|
| 373 |
+
}
|
| 374 |
+
.metric-badge::before {
|
| 375 |
+
content: ''; position: absolute;
|
| 376 |
+
top: 0; left: 0; right: 0; height: 1px;
|
| 377 |
+
background: var(--cyan-400); opacity: 0.3;
|
| 378 |
}
|
| 379 |
.metric-badge .val {
|
| 380 |
+
font-size: 22px !important; font-weight: 700 !important;
|
| 381 |
+
color: var(--cyan-400) !important; font-family: var(--mono) !important; line-height: 1.2;
|
|
|
|
| 382 |
}
|
| 383 |
+
.metric-badge .val.ischemic { color: var(--red-400) !important; text-shadow: 0 0 12px rgba(248,113,113,0.4); }
|
| 384 |
+
.metric-badge .val.borderline{ color: var(--amber-400) !important; }
|
| 385 |
+
.metric-badge .val.ok { color: var(--green-400) !important; text-shadow: 0 0 12px rgba(52,211,153,0.4); }
|
| 386 |
.metric-badge .lbl {
|
| 387 |
+
font-size: 9px !important; color: var(--w30) !important;
|
| 388 |
+
text-transform: uppercase !important; letter-spacing: 1.5px !important;
|
| 389 |
+
margin-top: 4px !important; font-family: var(--mono) !important;
|
|
|
|
| 390 |
}
|
| 391 |
|
| 392 |
+
/* ── Status box ───────────────────────────────────────────────────── */
|
| 393 |
+
#status-box {
|
| 394 |
+
padding: 12px 18px !important; border-radius: var(--radius-s) !important;
|
| 395 |
+
font-size: 12px !important; font-weight: 500 !important;
|
| 396 |
+
border: 1px solid var(--border) !important;
|
| 397 |
+
background: var(--cyan-glow) !important;
|
| 398 |
+
color: var(--cyan-300) !important;
|
| 399 |
+
font-family: var(--mono) !important; letter-spacing: 0.5px;
|
| 400 |
}
|
| 401 |
|
| 402 |
+
/* ── Images ───────────────────────────────────────────────────────── */
|
| 403 |
+
.gradio-image img {
|
| 404 |
+
border-radius: var(--radius-s) !important;
|
| 405 |
+
border: 1px solid var(--border-s) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 406 |
}
|
| 407 |
+
.gradio-image .label-wrap { display: none !important; }
|
| 408 |
|
| 409 |
+
/* ── Code (JSON) ──────────────────────────────────────────────────── */
|
| 410 |
+
.gradio-code, .cm-editor, .cm-scroller {
|
| 411 |
+
background: var(--navy-950) !important;
|
| 412 |
+
border: 1px solid var(--border-s) !important;
|
| 413 |
+
font-family: var(--mono) !important; font-size: 12px !important;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
/* ── Footer ───────────────────────────────────────────────────────── */
|
| 417 |
#footer {
|
| 418 |
+
background: var(--navy-950) !important;
|
| 419 |
+
border-top: 1px solid var(--border-s) !important;
|
| 420 |
+
padding: 14px 32px !important; text-align: center !important;
|
| 421 |
+
font-size: 11px !important; color: var(--w30) !important;
|
| 422 |
+
font-family: var(--mono) !important; letter-spacing: 0.5px;
|
| 423 |
+
}
|
| 424 |
+
#footer b { color: var(--cyan-400) !important; }
|
| 425 |
+
|
| 426 |
+
/* ── Gradio overrides ─────────────────────────────────────────────── */
|
| 427 |
+
.gradio-container .prose, .gradio-container h1, .gradio-container h2,
|
| 428 |
+
.gradio-container h3, .gradio-container p, .gradio-container label,
|
| 429 |
+
.gradio-container span { color: var(--white) !important; }
|
| 430 |
+
.gradio-container input, .gradio-container textarea, .gradio-container select {
|
| 431 |
+
background: var(--navy-800) !important;
|
| 432 |
+
border-color: var(--border-s) !important; color: var(--white) !important;
|
| 433 |
}
|
| 434 |
+
::-webkit-scrollbar { width: 5px; height: 5px; }
|
| 435 |
+
::-webkit-scrollbar-track { background: var(--navy-950); }
|
| 436 |
+
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 3px; }
|
| 437 |
+
::-webkit-scrollbar-thumb:hover { background: var(--cyan-400); }
|
| 438 |
"""
|
| 439 |
|
| 440 |
+
|
| 441 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 442 |
# HEADER HTML
|
| 443 |
# ─────────────────────────────────────────────────────────────────────────────
|
| 444 |
|
| 445 |
def _header_html() -> str:
|
| 446 |
+
itu_tag = (f'<img src="{LOGO_ITU}" alt="ITU">'
|
| 447 |
if LOGO_ITU else
|
| 448 |
+
'<span style="font-size:11px;color:rgba(240,249,255,0.4);font-family:JetBrains Mono,monospace">ITU LAHORE</span>')
|
| 449 |
return f"""
|
| 450 |
<div id="header">
|
|
|
|
| 451 |
<div id="logo-angio">
|
| 452 |
+
<div class="name">Angio AI</div>
|
| 453 |
+
<div class="sub">Coronary Angiography Analysis System</div>
|
| 454 |
</div>
|
| 455 |
+
<div class="header-meta">
|
| 456 |
+
<b>Muhammad Adil</b> · MS Data Science<br>
|
| 457 |
+
Supervisor: Dr. Arif Mehmood · ITU Lahore
|
| 458 |
+
</div>
|
| 459 |
+
<div id="logo-itu">{itu_tag}</div>
|
| 460 |
</div>"""
|
| 461 |
|
| 462 |
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
| 1657 |
with gr.Column(scale=1):
|
| 1658 |
gr.HTML("""
|
| 1659 |
<div class="card">
|
| 1660 |
+
<div class="card-title">Analysis Pipeline</div>
|
| 1661 |
+
<div style="display:flex;flex-direction:column;gap:0">
|
| 1662 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(240,249,255,0.07)">
|
| 1663 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">01</span>
|
| 1664 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">Keyframe extraction</span>
|
| 1665 |
+
</div>
|
| 1666 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(240,249,255,0.07)">
|
| 1667 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">02</span>
|
| 1668 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">Stenosis detection</span>
|
| 1669 |
+
</div>
|
| 1670 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(240,249,255,0.07)">
|
| 1671 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">03</span>
|
| 1672 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">26-class coronary segmentation</span>
|
| 1673 |
+
</div>
|
| 1674 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(240,249,255,0.07)">
|
| 1675 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">04</span>
|
| 1676 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">Binary vessel segmentation</span>
|
| 1677 |
+
</div>
|
| 1678 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(240,249,255,0.07)">
|
| 1679 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">05</span>
|
| 1680 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">FFR estimation — QFR v4</span>
|
| 1681 |
+
</div>
|
| 1682 |
+
<div style="display:flex;align-items:center;gap:10px;padding:8px 0">
|
| 1683 |
+
<span style="font-family:JetBrains Mono,monospace;font-size:10px;color:#22d3ee;min-width:18px">06</span>
|
| 1684 |
+
<span style="font-size:12px;color:rgba(240,249,255,0.7)">SYNTAX score computation</span>
|
| 1685 |
+
</div>
|
| 1686 |
+
</div>
|
| 1687 |
+
<div style="margin-top:14px;padding-top:12px;border-top:1px solid rgba(240,249,255,0.07);font-size:11px;color:rgba(240,249,255,0.35);font-family:JetBrains Mono,monospace;line-height:1.8">
|
| 1688 |
+
FFR ≤ 0.80 → ischemic | 1−(0.33·DS+0.60·DS²)<br>
|
| 1689 |
+
Tu et al. JACC 2016 · FAVOR II
|
| 1690 |
</div>
|
| 1691 |
</div>
|
| 1692 |
<div class="card">
|
| 1693 |
+
<div class="card-title">Checkpoints</div>
|
| 1694 |
+
<div style="font-family:JetBrains Mono,monospace;font-size:11px;color:rgba(240,249,255,0.45);line-height:2.2">
|
| 1695 |
+
<span style="color:#22d3ee">►</span> mask2former_best.pth<br>
|
| 1696 |
+
<span style="color:#22d3ee">►</span> binary_best.pth<br>
|
| 1697 |
+
<span style="color:#22d3ee">►</span> best.pt
|
|
|
|
|
|
|
|
|
|
| 1698 |
</div>
|
| 1699 |
</div>
|
| 1700 |
""")
|