import gradio as gr # Custom Premium CSS for medical dashboard styling GRADIO_CUSTOM_CSS = """ /* Import Inter Font */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap'); /* Main Container Styles - Deep Obsidian Background */ .gradio-container { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; background: radial-gradient(circle at 50% 0%, #101626 0%, #060912 100%) !important; color: #e2e8f0 !important; max-width: 1400px !important; margin: auto !important; padding: 24px !important; border: none !important; box-shadow: none !important; } /* Typography & Headers */ h1, h2, h3, h4, h5, h6 { font-family: 'Inter', sans-serif !important; font-weight: 700 !important; color: #f1f5f9 !important; letter-spacing: -0.02em !important; } .clinical-header { text-align: center; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); } .clinical-header h1 { font-size: 3rem !important; font-weight: 900 !important; background: linear-gradient(135deg, #14b8a6 0%, #3b82f6 50%, #8b5cf6 100%) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; letter-spacing: -0.06em !important; margin-bottom: 12px !important; text-shadow: 0 0 40px rgba(59, 130, 246, 0.15) !important; } .clinical-header p { font-size: 1.15rem !important; color: #94a3b8 !important; font-weight: 400 !important; max-width: 700px; margin: 0 auto !important; line-height: 1.5; } /* UI Card Glassmorphism Elements */ .glass-panel, .block, .contain { background: rgba(13, 20, 35, 0.45) !important; backdrop-filter: blur(20px) !important; -webkit-backdrop-filter: blur(20px) !important; border: 1px solid rgba(255, 255, 255, 0.06) !important; border-radius: 16px !important; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important; } .glass-panel:hover { border-color: rgba(255, 255, 255, 0.1) !important; box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4) !important; } /* Button & Interactions */ .run-btn { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important; color: white !important; font-weight: 700 !important; border: none !important; border-radius: 12px !important; font-size: 1rem !important; letter-spacing: 0.02em !important; box-shadow: 0 0 20px rgba(20, 184, 166, 0.25) !important; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important; padding: 14px 24px !important; text-transform: uppercase !important; cursor: pointer !important; } .run-btn:hover { transform: translateY(-2px) !important; box-shadow: 0 0 30px rgba(20, 184, 166, 0.5) !important; filter: brightness(1.1) !important; } .run-btn:active { transform: translateY(1px) !important; } /* Custom Pathology Report Markdown Styling */ .report-card { background: rgba(15, 23, 42, 0.35) !important; border: 1px solid rgba(255, 255, 255, 0.04) !important; border-radius: 12px !important; padding: 24px !important; color: #cbd5e1 !important; line-height: 1.6 !important; font-size: 0.95rem !important; } .report-card h3 { color: #14b8a6 !important; font-size: 1.2rem !important; margin-top: 0 !important; margin-bottom: 12px !important; border-bottom: 1px solid rgba(20, 184, 166, 0.15) !important; padding-bottom: 8px !important; } .report-card strong { color: #f1f5f9 !important; } /* Custom Cards for FAISS Matches */ .case-card { background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); } .case-card:hover { border-color: rgba(255, 255, 255, 0.12); transform: translateX(6px); background: rgba(20, 30, 50, 0.6); } .case-badge-msih { background: rgba(248, 113, 113, 0.12) !important; color: #f87171 !important; padding: 3px 10px !important; border-radius: 6px !important; font-size: 0.72rem !important; font-weight: 700 !important; border: 1px solid rgba(248, 113, 113, 0.25) !important; text-transform: uppercase !important; letter-spacing: 0.05em !important; } .case-badge-mss { background: rgba(16, 185, 129, 0.1) !important; color: #34d399 !important; padding: 3px 10px !important; border-radius: 6px !important; font-size: 0.72rem !important; font-weight: 700 !important; border: 1px solid rgba(16, 185, 129, 0.2) !important; text-transform: uppercase !important; letter-spacing: 0.05em !important; } /* Tab & Input Customizations */ .tabs { border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important; } .tab-nav button { font-weight: 600 !important; font-size: 0.85rem !important; color: #94a3b8 !important; transition: all 0.2s ease !important; } .tab-nav button.selected { color: #14b8a6 !important; border-bottom-color: #14b8a6 !important; background: rgba(20, 184, 166, 0.05) !important; } /* Animations */ @keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } } .status-pulse { animation: pulse 2.5s infinite; } """ SYSTEM_STATUS_CONSOLE = """
No clinical reference matches found in indexing database.
" html = "Histology: {description}
{subtext}