Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -48,145 +48,7 @@ button.secondary { background: #f3f4f6 !important; color: #374151 !important; bo
|
|
| 48 |
input[type=number] { background: #f9fafb !important; color: #1a202c !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; }
|
| 49 |
"""
|
| 50 |
|
| 51 |
-
HEADER = """<div style="
|
| 52 |
-
background: linear-gradient(135deg, #0a0f1e 0%, #0d0508 50%, #0a0f1e 100%);
|
| 53 |
-
border-bottom: 1px solid rgba(193,18,31,0.3);
|
| 54 |
-
position: relative;
|
| 55 |
-
overflow: hidden;
|
| 56 |
-
padding: 0;
|
| 57 |
-
">
|
| 58 |
-
<!-- Animated grid background -->
|
| 59 |
-
<div style="
|
| 60 |
-
position: absolute; top: 0; left: 0; right: 0; bottom: 0;
|
| 61 |
-
background-image:
|
| 62 |
-
linear-gradient(rgba(193,18,31,0.05) 1px, transparent 1px),
|
| 63 |
-
linear-gradient(90deg, rgba(193,18,31,0.05) 1px, transparent 1px);
|
| 64 |
-
background-size: 40px 40px;
|
| 65 |
-
animation: gridMove 20s linear infinite;
|
| 66 |
-
"></div>
|
| 67 |
-
|
| 68 |
-
<!-- Glow orbs -->
|
| 69 |
-
<div style="position:absolute;top:-50%;left:-10%;width:500px;height:500px;background:radial-gradient(circle,rgba(193,18,31,0.08) 0%,transparent 70%);pointer-events:none;"></div>
|
| 70 |
-
<div style="position:absolute;top:-50%;right:-10%;width:400px;height:400px;background:radial-gradient(circle,rgba(0,87,168,0.08) 0%,transparent 70%);pointer-events:none;"></div>
|
| 71 |
-
|
| 72 |
-
<style>
|
| 73 |
-
@keyframes gridMove { from { transform: translateY(0); } to { transform: translateY(40px); } }
|
| 74 |
-
@keyframes ecgDraw { from { stroke-dashoffset: 800; } to { stroke-dashoffset: 0; } }
|
| 75 |
-
@keyframes hb { 0%,100%{transform:scale(1)} 15%{transform:scale(1.18)} 30%{transform:scale(1)} 45%{transform:scale(1.12)} 60%{transform:scale(1)} }
|
| 76 |
-
@keyframes shimmer { 0%{opacity:0.4} 50%{opacity:1} 100%{opacity:0.4} }
|
| 77 |
-
</style>
|
| 78 |
-
|
| 79 |
-
<div style="
|
| 80 |
-
max-width: 1400px; margin: 0 auto;
|
| 81 |
-
padding: 18px 28px;
|
| 82 |
-
display: flex; align-items: center; justify-content: space-between;
|
| 83 |
-
position: relative; z-index: 1;
|
| 84 |
-
">
|
| 85 |
-
<!-- LEFT: SJSU Identity -->
|
| 86 |
-
<div style="display:flex;align-items:center;gap:16px;">
|
| 87 |
-
<div style="position:relative;">
|
| 88 |
-
<!-- Spartan SVG with glow -->
|
| 89 |
-
<div style="width:52px;height:52px;background:linear-gradient(135deg,rgba(0,87,168,0.3),rgba(0,87,168,0.1));border:1px solid rgba(0,87,168,0.4);border-radius:14px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 20px rgba(0,87,168,0.3);">
|
| 90 |
-
<svg width="32" height="32" viewBox="0 0 100 100">
|
| 91 |
-
<circle cx="50" cy="35" r="28" fill="#0057a8" opacity="0.9"/>
|
| 92 |
-
<ellipse cx="50" cy="14" rx="22" ry="10" fill="#0057a8"/>
|
| 93 |
-
<polygon points="30,14 33,4 36,14" fill="#e8a020"/>
|
| 94 |
-
<polygon points="36,12 39,2 42,12" fill="#e8a020"/>
|
| 95 |
-
<polygon points="42,11 45,1 48,11" fill="#e8a020"/>
|
| 96 |
-
<polygon points="48,11 51,1 54,11" fill="#e8a020"/>
|
| 97 |
-
<polygon points="54,12 57,2 60,12" fill="#e8a020"/>
|
| 98 |
-
<polygon points="60,14 63,4 66,14" fill="#e8a020"/>
|
| 99 |
-
<rect x="36" y="30" width="28" height="22" rx="4" fill="#0057a8"/>
|
| 100 |
-
<rect x="40" y="35" width="8" height="12" rx="2" fill="#e8a020"/>
|
| 101 |
-
<rect x="34" y="50" width="32" height="8" rx="4" fill="#0057a8"/>
|
| 102 |
-
</svg>
|
| 103 |
-
</div>
|
| 104 |
-
</div>
|
| 105 |
-
<div>
|
| 106 |
-
<div style="color:rgba(232,160,32,0.9);font-size:0.65em;font-weight:600;letter-spacing:3px;text-transform:uppercase;margin-bottom:2px;">San Jose State University</div>
|
| 107 |
-
<div style="color:white;font-size:0.92em;font-weight:700;letter-spacing:0.5px;">Biomedical Engineering</div>
|
| 108 |
-
<div style="color:rgba(255,255,255,0.35);font-size:0.65em;letter-spacing:1px;margin-top:1px;">Dr. Alessandro Bellofiore β CardioLab</div>
|
| 109 |
-
</div>
|
| 110 |
-
</div>
|
| 111 |
-
|
| 112 |
-
<!-- CENTER: CardioLab AI Brand -->
|
| 113 |
-
<div style="text-align:center;flex:1;padding:0 30px;">
|
| 114 |
-
<!-- ECG animation -->
|
| 115 |
-
<div style="display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:6px;">
|
| 116 |
-
<svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;">
|
| 117 |
-
<polyline
|
| 118 |
-
points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15"
|
| 119 |
-
fill="none" stroke="#c1121f" stroke-width="2"
|
| 120 |
-
stroke-linecap="round" stroke-linejoin="round"
|
| 121 |
-
stroke-dasharray="800"
|
| 122 |
-
style="animation: ecgDraw 2s ease forwards, shimmer 3s ease 2s infinite;"
|
| 123 |
-
/>
|
| 124 |
-
<circle cx="46" cy="1" r="2.5" fill="#c1121f" style="animation:shimmer 3s ease 2s infinite;"/>
|
| 125 |
-
</svg>
|
| 126 |
-
|
| 127 |
-
<div>
|
| 128 |
-
<div style="font-size:2.4em;font-weight:900;letter-spacing:1px;line-height:1;font-family:'Space Grotesk',sans-serif;">
|
| 129 |
-
<span style="color:white;">Cardio</span><span style="color:#c1121f;">Lab</span><span style="color:white;"> AI</span>
|
| 130 |
-
</div>
|
| 131 |
-
</div>
|
| 132 |
-
|
| 133 |
-
<svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;transform:scaleX(-1);">
|
| 134 |
-
<polyline
|
| 135 |
-
points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15"
|
| 136 |
-
fill="none" stroke="#c1121f" stroke-width="2"
|
| 137 |
-
stroke-linecap="round" stroke-linejoin="round"
|
| 138 |
-
stroke-dasharray="800"
|
| 139 |
-
style="animation: ecgDraw 2s ease 0.3s forwards, shimmer 3s ease 2.3s infinite;"
|
| 140 |
-
/>
|
| 141 |
-
</svg>
|
| 142 |
-
</div>
|
| 143 |
-
|
| 144 |
-
<!-- Animated badge pills -->
|
| 145 |
-
<div style="display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;">
|
| 146 |
-
<span style="background:rgba(193,18,31,0.2);border:1px solid rgba(193,18,31,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;letter-spacing:0.05em;">RAG 16 PAPERS</span>
|
| 147 |
-
<span style="background:rgba(0,87,168,0.2);border:1px solid rgba(0,87,168,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;letter-spacing:0.05em;">FINE-TUNED MODEL</span>
|
| 148 |
-
<span style="background:rgba(232,160,32,0.15);border:1px solid rgba(232,160,32,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;letter-spacing:0.05em;">5 AI MODELS</span>
|
| 149 |
-
<span style="background:rgba(46,204,113,0.15);border:1px solid rgba(46,204,113,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;letter-spacing:0.05em;">$0 COST</span>
|
| 150 |
-
</div>
|
| 151 |
-
</div>
|
| 152 |
-
|
| 153 |
-
<!-- RIGHT: Animated Heart + Stats -->
|
| 154 |
-
<div style="display:flex;align-items:center;gap:18px;">
|
| 155 |
-
<div style="text-align:right;">
|
| 156 |
-
<div style="color:rgba(255,255,255,0.35);font-size:0.62em;letter-spacing:2px;text-transform:uppercase;margin-bottom:6px;">Research Pillars</div>
|
| 157 |
-
<div style="display:flex;flex-direction:column;gap:4px;align-items:flex-end;">
|
| 158 |
-
<span style="background:rgba(193,18,31,0.15);border:1px solid rgba(193,18,31,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;font-weight:500;">MHV β MCL Β· PIV Β· TGT</span>
|
| 159 |
-
<span style="background:rgba(0,87,168,0.15);border:1px solid rgba(0,87,168,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;font-weight:500;">CKD β uPAD Β· Jaffe</span>
|
| 160 |
-
<span style="background:rgba(232,160,32,0.1);border:1px solid rgba(232,160,32,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;font-weight:500;">FSI β COMSOL</span>
|
| 161 |
-
</div>
|
| 162 |
-
</div>
|
| 163 |
-
|
| 164 |
-
<!-- Animated beating heart -->
|
| 165 |
-
<div style="animation: hb 1.5s ease infinite;">
|
| 166 |
-
<svg width="52" height="48" viewBox="0 0 100 90">
|
| 167 |
-
<defs>
|
| 168 |
-
<radialGradient id="hg" cx="50%" cy="40%">
|
| 169 |
-
<stop offset="0%" stop-color="#e63946"/>
|
| 170 |
-
<stop offset="100%" stop-color="#7d0a11"/>
|
| 171 |
-
</radialGradient>
|
| 172 |
-
<filter id="glow">
|
| 173 |
-
<feGaussianBlur stdDeviation="3" result="blur"/>
|
| 174 |
-
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
| 175 |
-
</filter>
|
| 176 |
-
</defs>
|
| 177 |
-
<path d="M50 85 C50 85 5 55 5 30 C5 15 18 5 30 5 C38 5 45 9 50 15 C55 9 62 5 70 5 C82 5 95 15 95 30 C95 55 50 85 50 85Z"
|
| 178 |
-
fill="url(#hg)" filter="url(#glow)" opacity="0.95"/>
|
| 179 |
-
<polyline points="20,48 30,48 36,35 40,60 44,28 48,52 54,48 80,48"
|
| 180 |
-
fill="none" stroke="white" stroke-width="3"
|
| 181 |
-
stroke-linecap="round" stroke-linejoin="round" opacity="0.9"/>
|
| 182 |
-
</svg>
|
| 183 |
-
</div>
|
| 184 |
-
</div>
|
| 185 |
-
</div>
|
| 186 |
-
|
| 187 |
-
<!-- Bottom gradient bar -->
|
| 188 |
-
<div style="height:2px;background:linear-gradient(90deg,transparent,#0057a8,#c1121f,#e8a020,#c1121f,#0057a8,transparent);"></div>
|
| 189 |
-
</div>"""
|
| 190 |
|
| 191 |
# ββ PAPER DATABASE βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 192 |
CHUNKS = []
|
|
@@ -991,303 +853,37 @@ with gr.Blocks(title="CardioLab AI v39 - SJSU") as demo:
|
|
| 991 |
</div>
|
| 992 |
<span style="color:#9ca3af;font-size:0.75em;">CardioLab AI v39 | SJSU Biomedical Engineering | RAG + Fine-tuned + Phase D | Inspired by <a href="https://github.com/snap-stanford/Biomni" style="color:#c1121f;">Biomni Stanford</a> | Apache 2.0 | $0 Cost</span></div>""")
|
| 993 |
|
| 994 |
-
demo.launch(css=CSS)CSS = '''
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
| 998 |
-
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
-
}
|
| 1004 |
-
|
| 1005 |
-
|
| 1006 |
-
|
| 1007 |
-
|
| 1008 |
-
|
| 1009 |
-
|
| 1010 |
-
|
| 1011 |
-
|
| 1012 |
-
|
| 1013 |
-
|
| 1014 |
-
|
| 1015 |
-
|
| 1016 |
-
|
| 1017 |
-
}
|
| 1018 |
-
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
-
}
|
| 1023 |
-
|
| 1024 |
-
|
| 1025 |
-
.gradio-container {
|
| 1026 |
-
background: transparent !important;
|
| 1027 |
-
max-width: 1600px !important;
|
| 1028 |
-
margin: 0 auto !important;
|
| 1029 |
-
position: relative;
|
| 1030 |
-
z-index: 1;
|
| 1031 |
-
}
|
| 1032 |
-
|
| 1033 |
-
/* ββ TABS β PILL STYLE βββββββββββββββββββββββββββββ */
|
| 1034 |
-
.tab-nav {
|
| 1035 |
-
background: rgba(255,255,255,0.03) !important;
|
| 1036 |
-
backdrop-filter: blur(20px) !important;
|
| 1037 |
-
border: 1px solid rgba(255,255,255,0.08) !important;
|
| 1038 |
-
border-radius: 16px !important;
|
| 1039 |
-
padding: 6px !important;
|
| 1040 |
-
margin: 10px 0 !important;
|
| 1041 |
-
display: flex !important;
|
| 1042 |
-
flex-wrap: wrap !important;
|
| 1043 |
-
gap: 4px !important;
|
| 1044 |
-
}
|
| 1045 |
-
|
| 1046 |
-
.tab-nav button {
|
| 1047 |
-
background: transparent !important;
|
| 1048 |
-
color: rgba(255,255,255,0.5) !important;
|
| 1049 |
-
border: none !important;
|
| 1050 |
-
border-radius: 10px !important;
|
| 1051 |
-
padding: 8px 14px !important;
|
| 1052 |
-
font-weight: 500 !important;
|
| 1053 |
-
font-size: 0.78em !important;
|
| 1054 |
-
white-space: nowrap !important;
|
| 1055 |
-
transition: all 0.25s cubic-bezier(0.4,0,0.2,1) !important;
|
| 1056 |
-
letter-spacing: 0.02em !important;
|
| 1057 |
-
}
|
| 1058 |
-
|
| 1059 |
-
.tab-nav button:hover {
|
| 1060 |
-
background: rgba(255,255,255,0.08) !important;
|
| 1061 |
-
color: rgba(255,255,255,0.9) !important;
|
| 1062 |
-
transform: translateY(-1px) !important;
|
| 1063 |
-
}
|
| 1064 |
-
|
| 1065 |
-
.tab-nav button.selected {
|
| 1066 |
-
background: linear-gradient(135deg, #c1121f, #e63946) !important;
|
| 1067 |
-
color: white !important;
|
| 1068 |
-
font-weight: 700 !important;
|
| 1069 |
-
box-shadow: 0 4px 20px rgba(193,18,31,0.4), 0 0 0 1px rgba(193,18,31,0.3) !important;
|
| 1070 |
-
transform: translateY(-1px) !important;
|
| 1071 |
-
}
|
| 1072 |
-
|
| 1073 |
-
/* ββ CHATBOT MESSAGES ββββββββββββββββββββββββββββββ */
|
| 1074 |
-
.message-wrap {
|
| 1075 |
-
padding: 6px 0 !important;
|
| 1076 |
-
}
|
| 1077 |
-
|
| 1078 |
-
.message.user {
|
| 1079 |
-
background: linear-gradient(135deg, rgba(193,18,31,0.2), rgba(230,57,70,0.15)) !important;
|
| 1080 |
-
border: 1px solid rgba(193,18,31,0.3) !important;
|
| 1081 |
-
color: rgba(255,255,255,0.95) !important;
|
| 1082 |
-
border-radius: 18px 18px 4px 18px !important;
|
| 1083 |
-
padding: 14px 18px !important;
|
| 1084 |
-
backdrop-filter: blur(10px) !important;
|
| 1085 |
-
animation: msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
|
| 1086 |
-
}
|
| 1087 |
-
|
| 1088 |
-
.message.bot {
|
| 1089 |
-
background: rgba(255,255,255,0.05) !important;
|
| 1090 |
-
border: 1px solid rgba(255,255,255,0.1) !important;
|
| 1091 |
-
color: rgba(255,255,255,0.9) !important;
|
| 1092 |
-
border-radius: 18px 18px 18px 4px !important;
|
| 1093 |
-
padding: 14px 18px !important;
|
| 1094 |
-
backdrop-filter: blur(10px) !important;
|
| 1095 |
-
border-left: 3px solid #c1121f !important;
|
| 1096 |
-
animation: msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
|
| 1097 |
-
}
|
| 1098 |
-
|
| 1099 |
-
@keyframes msgIn {
|
| 1100 |
-
from { opacity: 0; transform: translateY(10px) scale(0.97); }
|
| 1101 |
-
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 1102 |
-
}
|
| 1103 |
-
|
| 1104 |
-
/* ββ CHATBOT CONTAINER βββββββββββββββββββββββββββββ */
|
| 1105 |
-
.chatbot {
|
| 1106 |
-
background: rgba(255,255,255,0.02) !important;
|
| 1107 |
-
border: 1px solid rgba(255,255,255,0.08) !important;
|
| 1108 |
-
border-radius: 20px !important;
|
| 1109 |
-
backdrop-filter: blur(20px) !important;
|
| 1110 |
-
}
|
| 1111 |
-
|
| 1112 |
-
/* ββ INPUT FIELDS ββββββββββββββββββββββββββββββββββ */
|
| 1113 |
-
textarea, input[type=text], input[type=number] {
|
| 1114 |
-
background: rgba(255,255,255,0.06) !important;
|
| 1115 |
-
color: rgba(255,255,255,0.9) !important;
|
| 1116 |
-
border: 1px solid rgba(255,255,255,0.12) !important;
|
| 1117 |
-
border-radius: 14px !important;
|
| 1118 |
-
font-family: "Inter", sans-serif !important;
|
| 1119 |
-
font-size: 0.9em !important;
|
| 1120 |
-
transition: all 0.25s ease !important;
|
| 1121 |
-
backdrop-filter: blur(10px) !important;
|
| 1122 |
-
}
|
| 1123 |
-
|
| 1124 |
-
textarea:focus, input:focus {
|
| 1125 |
-
border-color: rgba(193,18,31,0.6) !important;
|
| 1126 |
-
box-shadow: 0 0 0 3px rgba(193,18,31,0.15), 0 0 30px rgba(193,18,31,0.1) !important;
|
| 1127 |
-
outline: none !important;
|
| 1128 |
-
background: rgba(255,255,255,0.08) !important;
|
| 1129 |
-
}
|
| 1130 |
-
|
| 1131 |
-
textarea::placeholder { color: rgba(255,255,255,0.3) !important; }
|
| 1132 |
-
|
| 1133 |
-
/* ββ BUTTONS βββββββββββββββββββββββββββββββββββββββ */
|
| 1134 |
-
button.primary {
|
| 1135 |
-
background: linear-gradient(135deg, #c1121f 0%, #e63946 100%) !important;
|
| 1136 |
-
color: white !important;
|
| 1137 |
-
border: none !important;
|
| 1138 |
-
border-radius: 12px !important;
|
| 1139 |
-
font-weight: 700 !important;
|
| 1140 |
-
font-size: 0.88em !important;
|
| 1141 |
-
letter-spacing: 0.03em !important;
|
| 1142 |
-
box-shadow: 0 4px 20px rgba(193,18,31,0.35) !important;
|
| 1143 |
-
transition: all 0.2s cubic-bezier(0.4,0,0.2,1) !important;
|
| 1144 |
-
position: relative !important;
|
| 1145 |
-
overflow: hidden !important;
|
| 1146 |
-
}
|
| 1147 |
-
|
| 1148 |
-
button.primary::after {
|
| 1149 |
-
content: "";
|
| 1150 |
-
position: absolute;
|
| 1151 |
-
top: 0; left: -100%;
|
| 1152 |
-
width: 100%; height: 100%;
|
| 1153 |
-
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
| 1154 |
-
transition: left 0.5s ease;
|
| 1155 |
-
}
|
| 1156 |
-
|
| 1157 |
-
button.primary:hover::after { left: 100%; }
|
| 1158 |
-
|
| 1159 |
-
button.primary:hover {
|
| 1160 |
-
transform: translateY(-2px) !important;
|
| 1161 |
-
box-shadow: 0 8px 30px rgba(193,18,31,0.5) !important;
|
| 1162 |
-
}
|
| 1163 |
-
|
| 1164 |
-
button.primary:active { transform: translateY(0) !important; }
|
| 1165 |
-
|
| 1166 |
-
button.secondary {
|
| 1167 |
-
background: rgba(255,255,255,0.07) !important;
|
| 1168 |
-
color: rgba(255,255,255,0.7) !important;
|
| 1169 |
-
border: 1px solid rgba(255,255,255,0.15) !important;
|
| 1170 |
-
border-radius: 12px !important;
|
| 1171 |
-
font-weight: 500 !important;
|
| 1172 |
-
transition: all 0.2s ease !important;
|
| 1173 |
-
backdrop-filter: blur(10px) !important;
|
| 1174 |
-
}
|
| 1175 |
-
|
| 1176 |
-
button.secondary:hover {
|
| 1177 |
-
background: rgba(255,255,255,0.12) !important;
|
| 1178 |
-
color: white !important;
|
| 1179 |
-
transform: translateY(-1px) !important;
|
| 1180 |
-
}
|
| 1181 |
-
|
| 1182 |
-
/* ββ LABELS ββββββββββββββββββββββββββββββββββββββββ */
|
| 1183 |
-
label span {
|
| 1184 |
-
color: rgba(255,255,255,0.55) !important;
|
| 1185 |
-
font-weight: 500 !important;
|
| 1186 |
-
font-size: 0.78em !important;
|
| 1187 |
-
letter-spacing: 0.06em !important;
|
| 1188 |
-
text-transform: uppercase !important;
|
| 1189 |
-
}
|
| 1190 |
-
|
| 1191 |
-
/* ββ DROPDOWNS βββββββββββββββββββββββββββββββββββββ */
|
| 1192 |
-
.wrap-inner, select, .multiselect {
|
| 1193 |
-
background: rgba(255,255,255,0.06) !important;
|
| 1194 |
-
border: 1px solid rgba(255,255,255,0.12) !important;
|
| 1195 |
-
border-radius: 12px !important;
|
| 1196 |
-
color: rgba(255,255,255,0.85) !important;
|
| 1197 |
-
}
|
| 1198 |
-
|
| 1199 |
-
/* ββ GLASSMORPHISM PANELS ββββββββββββββββββββββββββ */
|
| 1200 |
-
.block, .panel {
|
| 1201 |
-
background: rgba(255,255,255,0.03) !important;
|
| 1202 |
-
border: 1px solid rgba(255,255,255,0.07) !important;
|
| 1203 |
-
border-radius: 20px !important;
|
| 1204 |
-
backdrop-filter: blur(20px) !important;
|
| 1205 |
-
}
|
| 1206 |
-
|
| 1207 |
-
/* ββ MARKDOWN TEXT βββββββββββββββββββββββββββββββββ */
|
| 1208 |
-
.prose, .md {
|
| 1209 |
-
color: rgba(255,255,255,0.8) !important;
|
| 1210 |
-
}
|
| 1211 |
-
|
| 1212 |
-
/* ββ FILE UPLOAD βββββββββββββββββββββββββββββββββββ */
|
| 1213 |
-
.upload-container, .file-preview {
|
| 1214 |
-
background: rgba(255,255,255,0.04) !important;
|
| 1215 |
-
border: 2px dashed rgba(255,255,255,0.15) !important;
|
| 1216 |
-
border-radius: 16px !important;
|
| 1217 |
-
transition: all 0.25s ease !important;
|
| 1218 |
-
}
|
| 1219 |
-
|
| 1220 |
-
.upload-container:hover {
|
| 1221 |
-
border-color: rgba(193,18,31,0.5) !important;
|
| 1222 |
-
background: rgba(193,18,31,0.05) !important;
|
| 1223 |
-
}
|
| 1224 |
-
|
| 1225 |
-
/* ββ SIDEBAR βββββββββββββββββββββββββββββββββββββββ */
|
| 1226 |
-
.sidebar-card {
|
| 1227 |
-
background: rgba(255,255,255,0.04);
|
| 1228 |
-
border: 1px solid rgba(255,255,255,0.08);
|
| 1229 |
-
border-radius: 16px;
|
| 1230 |
-
padding: 16px;
|
| 1231 |
-
margin-bottom: 8px;
|
| 1232 |
-
backdrop-filter: blur(20px);
|
| 1233 |
-
}
|
| 1234 |
-
|
| 1235 |
-
/* ββ SCROLLBAR βββββββββββββββββββββββββββββββββββββ */
|
| 1236 |
-
::-webkit-scrollbar { width: 5px; height: 5px; }
|
| 1237 |
-
::-webkit-scrollbar-track { background: transparent; }
|
| 1238 |
-
::-webkit-scrollbar-thumb {
|
| 1239 |
-
background: rgba(255,255,255,0.15);
|
| 1240 |
-
border-radius: 10px;
|
| 1241 |
-
}
|
| 1242 |
-
::-webkit-scrollbar-thumb:hover { background: rgba(193,18,31,0.5); }
|
| 1243 |
-
|
| 1244 |
-
/* ββ IMAGES ββββββββββββββββββββββββββββββββββββββββ */
|
| 1245 |
-
img {
|
| 1246 |
-
border-radius: 14px !important;
|
| 1247 |
-
border: 1px solid rgba(255,255,255,0.08) !important;
|
| 1248 |
-
}
|
| 1249 |
-
|
| 1250 |
-
/* ββ NUMBER INPUTS βββββββββββββββββββββββββββββββββ */
|
| 1251 |
-
input[type=number] {
|
| 1252 |
-
background: rgba(255,255,255,0.06) !important;
|
| 1253 |
-
color: rgba(255,255,255,0.9) !important;
|
| 1254 |
-
border: 1px solid rgba(255,255,255,0.12) !important;
|
| 1255 |
-
border-radius: 12px !important;
|
| 1256 |
-
}
|
| 1257 |
-
|
| 1258 |
-
/* ββ RADIO BUTTONS βββββββββββββββββββββββββββββββββ */
|
| 1259 |
-
.wrap {
|
| 1260 |
-
color: rgba(255,255,255,0.8) !important;
|
| 1261 |
-
}
|
| 1262 |
-
|
| 1263 |
-
/* ββ ANIMATIONS ββββββββββββββββββββββββββββββββββββ */
|
| 1264 |
-
@keyframes pulse {
|
| 1265 |
-
0%, 100% { opacity: 1; }
|
| 1266 |
-
50% { opacity: 0.5; }
|
| 1267 |
-
}
|
| 1268 |
-
|
| 1269 |
-
@keyframes fadeSlideUp {
|
| 1270 |
-
from { opacity: 0; transform: translateY(20px); }
|
| 1271 |
-
to { opacity: 1; transform: translateY(0); }
|
| 1272 |
-
}
|
| 1273 |
-
|
| 1274 |
-
@keyframes ecgLine {
|
| 1275 |
-
0% { stroke-dashoffset: 1000; }
|
| 1276 |
-
100% { stroke-dashoffset: 0; }
|
| 1277 |
-
}
|
| 1278 |
-
|
| 1279 |
-
@keyframes heartbeat {
|
| 1280 |
-
0%, 100% { transform: scale(1); }
|
| 1281 |
-
14% { transform: scale(1.15); }
|
| 1282 |
-
28% { transform: scale(1); }
|
| 1283 |
-
42% { transform: scale(1.1); }
|
| 1284 |
-
56% { transform: scale(1); }
|
| 1285 |
-
}
|
| 1286 |
-
|
| 1287 |
-
.gradio-container > * {
|
| 1288 |
-
animation: fadeSlideUp 0.5s ease forwards;
|
| 1289 |
-
}
|
| 1290 |
-
'''port gradio as gr
|
| 1291 |
import os, requests, io, json
|
| 1292 |
import numpy as np
|
| 1293 |
import pandas as pd
|
|
@@ -1337,34 +933,7 @@ button.secondary { background: #f3f4f6 !important; color: #374151 !important; bo
|
|
| 1337 |
input[type=number] { background: #f9fafb !important; color: #1a202c !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; }
|
| 1338 |
"""
|
| 1339 |
|
| 1340 |
-
HEADER = """<div style="background:linear-gradient(135deg,#
|
| 1341 |
-
<svg style="position:absolute;opacity:0.07;width:100%;height:100%;" viewBox="0 0 1200 120" preserveAspectRatio="none">
|
| 1342 |
-
<polyline points="0,60 100,60 130,20 150,100 170,10 200,90 220,60 400,60 430,20 450,100 470,10 500,90 520,60 700,60 730,20 750,100 770,10 800,90 820,60 1000,60 1030,20 1050,100 1070,10 1100,90 1120,60 1200,60" fill="none" stroke="#c1121f" stroke-width="3"/>
|
| 1343 |
-
</svg>
|
| 1344 |
-
<div style="max-width:1200px;margin:0 auto;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1;">
|
| 1345 |
-
<div style="display:flex;align-items:center;gap:14px;">
|
| 1346 |
-
<svg width="55" height="55" viewBox="0 0 100 100"><circle cx="50" cy="35" r="28" fill="#0057a8" opacity="0.9"/><ellipse cx="50" cy="14" rx="22" ry="10" fill="#0057a8"/>
|
| 1347 |
-
<polygon points="30,14 33,4 36,14" fill="#e8a020"/><polygon points="36,12 39,2 42,12" fill="#e8a020"/>
|
| 1348 |
-
<polygon points="42,11 45,1 48,11" fill="#e8a020"/><polygon points="48,11 51,1 54,11" fill="#e8a020"/>
|
| 1349 |
-
<polygon points="54,12 57,2 60,12" fill="#e8a020"/><polygon points="60,14 63,4 66,14" fill="#e8a020"/>
|
| 1350 |
-
<rect x="36" y="30" width="28" height="22" rx="4" fill="#0057a8"/><rect x="40" y="35" width="8" height="12" rx="2" fill="#e8a020"/>
|
| 1351 |
-
<rect x="34" y="50" width="32" height="8" rx="4" fill="#0057a8"/></svg>
|
| 1352 |
-
<div><div style="color:#9ca3af;font-size:0.7em;letter-spacing:2px;text-transform:uppercase;">San Jose State University</div>
|
| 1353 |
-
<div style="color:#e8a020;font-size:0.82em;font-weight:700;">Biomedical Engineering</div></div></div>
|
| 1354 |
-
<div style="text-align:center;flex:1;padding:0 20px;">
|
| 1355 |
-
<div style="display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:3px;">
|
| 1356 |
-
<svg width="100" height="28" viewBox="0 0 120 32"><polyline points="0,16 20,16 26,4 30,28 34,2 38,26 44,16 120,16" fill="none" stroke="#c1121f" stroke-width="2.5" stroke-linecap="round"/></svg>
|
| 1357 |
-
<div style="font-size:2em;font-weight:900;letter-spacing:2px;"><span style="color:#ffffff;">Cardio</span><span style="color:#c1121f;">Lab</span><span style="color:#ffffff;"> AI</span></div>
|
| 1358 |
-
<svg width="100" height="28" viewBox="0 0 120 32" style="transform:scaleX(-1);"><polyline points="0,16 20,16 26,4 30,28 34,2 38,26 44,16 120,16" fill="none" stroke="#c1121f" stroke-width="2.5" stroke-linecap="round"/></svg></div>
|
| 1359 |
-
<div style="color:#9ca3af;font-size:0.68em;letter-spacing:2px;text-transform:uppercase;">RAG + Fine-tuned | Protocol Generator | Report Writer | BioGPT | 5 AI Models</div></div>
|
| 1360 |
-
<div style="display:flex;align-items:center;gap:14px;">
|
| 1361 |
-
<div style="text-align:right;"><div style="color:#9ca3af;font-size:0.68em;text-transform:uppercase;">Research Pillars</div>
|
| 1362 |
-
<div style="color:#ffffff;font-size:0.72em;margin-top:3px;">MHV CKD FSI</div>
|
| 1363 |
-
<div style="color:#9ca3af;font-size:0.62em;margin-top:2px;">MCL PIV TGT uPAD COMSOL</div></div>
|
| 1364 |
-
<svg width="48" height="48" viewBox="0 0 100 90">
|
| 1365 |
-
<path d="M50 85 C50 85 5 55 5 30 C5 15 18 5 30 5 C38 5 45 9 50 15 C55 9 62 5 70 5 C82 5 95 15 95 30 C95 55 50 85 50 85Z" fill="#c1121f" opacity="0.9"/>
|
| 1366 |
-
<polyline points="25,45 32,45 35,35 38,55 41,30 44,50 50,45 75,45" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" opacity="0.9"/></svg></div></div>
|
| 1367 |
-
<div style="height:3px;background:linear-gradient(90deg,#0057a8,#c1121f,#e8a020,#c1121f,#0057a8);"></div></div>"""
|
| 1368 |
|
| 1369 |
# ββ PAPER DATABASE βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1370 |
CHUNKS = []
|
|
|
|
| 48 |
input[type=number] { background: #f9fafb !important; color: #1a202c !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; }
|
| 49 |
"""
|
| 50 |
|
| 51 |
+
HEADER = """<div style="background:linear-gradient(135deg,#0a0f1e 0%,#0d0508 50%,#0a0f1e 100%);border-bottom:1px solid rgba(193,18,31,0.3);position:relative;overflow:hidden;padding:0;"><style>@keyframes hb{0%,100%{transform:scale(1)}15%{transform:scale(1.18)}30%{transform:scale(1)}45%{transform:scale(1.12)}60%{transform:scale(1)}}@keyframes ecgDraw{from{stroke-dashoffset:800}to{stroke-dashoffset:0}}@keyframes shimmer2{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}</style><div style="position:absolute;top:0;left:0;right:0;bottom:0;background-image:linear-gradient(rgba(193,18,31,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(193,18,31,0.04) 1px,transparent 1px);background-size:40px 40px;pointer-events:none;"></div><div style="position:absolute;top:-50%;left:-10%;width:400px;height:400px;background:radial-gradient(circle,rgba(193,18,31,0.08) 0%,transparent 70%);pointer-events:none;"></div><div style="max-width:1400px;margin:0 auto;padding:18px 28px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1;"><div style="display:flex;align-items:center;gap:16px;"><div style="width:52px;height:52px;background:linear-gradient(135deg,rgba(0,87,168,0.3),rgba(0,87,168,0.1));border:1px solid rgba(0,87,168,0.4);border-radius:14px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 20px rgba(0,87,168,0.25);"><svg width="32" height="32" viewBox="0 0 100 100"><circle cx="50" cy="35" r="28" fill="#0057a8" opacity="0.9"/><ellipse cx="50" cy="14" rx="22" ry="10" fill="#0057a8"/><polygon points="30,14 33,4 36,14" fill="#e8a020"/><polygon points="36,12 39,2 42,12" fill="#e8a020"/><polygon points="42,11 45,1 48,11" fill="#e8a020"/><polygon points="48,11 51,1 54,11" fill="#e8a020"/><polygon points="54,12 57,2 60,12" fill="#e8a020"/><polygon points="60,14 63,4 66,14" fill="#e8a020"/><rect x="36" y="30" width="28" height="22" rx="4" fill="#0057a8"/><rect x="40" y="35" width="8" height="12" rx="2" fill="#e8a020"/><rect x="34" y="50" width="32" height="8" rx="4" fill="#0057a8"/></svg></div><div><div style="color:rgba(232,160,32,0.9);font-size:0.65em;font-weight:600;letter-spacing:3px;text-transform:uppercase;margin-bottom:2px;">San Jose State University</div><div style="color:white;font-size:0.92em;font-weight:700;">Biomedical Engineering</div><div style="color:rgba(255,255,255,0.35);font-size:0.62em;letter-spacing:1px;margin-top:1px;">Dr. Alessandro Bellofiore - CardioLab</div></div></div><div style="text-align:center;flex:1;padding:0 30px;"><div style="display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:6px;"><svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;"><polyline points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15" fill="none" stroke="#c1121f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="800" style="animation:ecgDraw 2s ease forwards;"/></svg><div style="font-size:2.4em;font-weight:900;letter-spacing:1px;line-height:1;"><span style="color:white;">Cardio</span><span style="color:#c1121f;">Lab</span><span style="color:white;"> AI</span></div><svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;transform:scaleX(-1);"><polyline points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15" fill="none" stroke="#c1121f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="800" style="animation:ecgDraw 2.3s ease forwards;"/></svg></div><div style="display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;"><span style="background:rgba(193,18,31,0.2);border:1px solid rgba(193,18,31,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">RAG 16 PAPERS</span><span style="background:rgba(0,87,168,0.2);border:1px solid rgba(0,87,168,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">FINE-TUNED MODEL</span><span style="background:rgba(232,160,32,0.15);border:1px solid rgba(232,160,32,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">5 AI MODELS</span><span style="background:rgba(46,204,113,0.15);border:1px solid rgba(46,204,113,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">$0 COST</span></div></div><div style="display:flex;align-items:center;gap:18px;"><div style="text-align:right;"><div style="color:rgba(255,255,255,0.35);font-size:0.62em;letter-spacing:2px;text-transform:uppercase;margin-bottom:6px;">Research Pillars</div><div style="display:flex;flex-direction:column;gap:4px;align-items:flex-end;"><span style="background:rgba(193,18,31,0.15);border:1px solid rgba(193,18,31,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">MHV - MCL PIV TGT</span><span style="background:rgba(0,87,168,0.15);border:1px solid rgba(0,87,168,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">CKD - uPAD Jaffe</span><span style="background:rgba(232,160,32,0.1);border:1px solid rgba(232,160,32,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">FSI - COMSOL</span></div></div><div style="animation:hb 1.5s ease infinite;"><svg width="52" height="48" viewBox="0 0 100 90"><defs><radialGradient id="hg2" cx="50%" cy="40%"><stop offset="0%" stop-color="#e63946"/><stop offset="100%" stop-color="#7d0a11"/></radialGradient></defs><path d="M50 85 C50 85 5 55 5 30 C5 15 18 5 30 5 C38 5 45 9 50 15 C55 9 62 5 70 5 C82 5 95 15 95 30 C95 55 50 85 50 85Z" fill="url(#hg2)" opacity="0.95"/><polyline points="20,48 30,48 36,35 40,60 44,28 48,52 54,48 80,48" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" opacity="0.9"/></svg></div></div></div><div style="height:2px;background:linear-gradient(90deg,transparent,#0057a8,#c1121f,#e8a020,#c1121f,#0057a8,transparent);"></div></div>"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
# ββ PAPER DATABASE βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 54 |
CHUNKS = []
|
|
|
|
| 853 |
</div>
|
| 854 |
<span style="color:#9ca3af;font-size:0.75em;">CardioLab AI v39 | SJSU Biomedical Engineering | RAG + Fine-tuned + Phase D | Inspired by <a href="https://github.com/snap-stanford/Biomni" style="color:#c1121f;">Biomni Stanford</a> | Apache 2.0 | $0 Cost</span></div>""")
|
| 855 |
|
| 856 |
+
demo.launch(css=CSS)CSS = '''@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=Space+Grotesk:wght@400;500;700&display=swap');
|
| 857 |
+
|
| 858 |
+
body{background:#050a14 !important;font-family:Inter,sans-serif !important;}
|
| 859 |
+
body::before{content:'';position:fixed;top:0;left:0;width:100%;height:100%;background:radial-gradient(ellipse 80% 60% at 20% 10%,rgba(193,18,31,0.12) 0%,transparent 60%),radial-gradient(ellipse 60% 80% at 80% 90%,rgba(0,87,168,0.10) 0%,transparent 60%);pointer-events:none;z-index:0;animation:bgShift 12s ease-in-out infinite alternate;}
|
| 860 |
+
@keyframes bgShift{0%{opacity:1;transform:scale(1)}100%{opacity:0.7;transform:scale(1.05)}}
|
| 861 |
+
@keyframes msgIn{from{opacity:0;transform:translateY(10px) scale(0.97)}to{opacity:1;transform:translateY(0) scale(1)}}
|
| 862 |
+
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.5;transform:scale(1.3)}}
|
| 863 |
+
@keyframes shimmer{0%{left:-100%}100%{left:100%}}
|
| 864 |
+
.gradio-container{background:transparent !important;max-width:1600px !important;margin:0 auto !important;position:relative;z-index:1;}
|
| 865 |
+
.tab-nav{background:rgba(255,255,255,0.03) !important;backdrop-filter:blur(20px) !important;border:1px solid rgba(255,255,255,0.08) !important;border-radius:16px !important;padding:6px !important;margin:10px 0 !important;display:flex !important;flex-wrap:wrap !important;gap:4px !important;}
|
| 866 |
+
.tab-nav button{background:transparent !important;color:rgba(255,255,255,0.5) !important;border:none !important;border-radius:10px !important;padding:8px 14px !important;font-weight:500 !important;font-size:0.78em !important;white-space:nowrap !important;transition:all 0.25s cubic-bezier(0.4,0,0.2,1) !important;}
|
| 867 |
+
.tab-nav button:hover{background:rgba(255,255,255,0.08) !important;color:rgba(255,255,255,0.9) !important;transform:translateY(-1px) !important;}
|
| 868 |
+
.tab-nav button.selected{background:linear-gradient(135deg,#c1121f,#e63946) !important;color:white !important;font-weight:700 !important;box-shadow:0 4px 20px rgba(193,18,31,0.4) !important;transform:translateY(-1px) !important;}
|
| 869 |
+
.message.user{background:linear-gradient(135deg,rgba(193,18,31,0.2),rgba(230,57,70,0.15)) !important;border:1px solid rgba(193,18,31,0.3) !important;color:rgba(255,255,255,0.95) !important;border-radius:18px 18px 4px 18px !important;padding:14px 18px !important;backdrop-filter:blur(10px) !important;animation:msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;}
|
| 870 |
+
.message.bot{background:rgba(255,255,255,0.05) !important;border:1px solid rgba(255,255,255,0.1) !important;color:rgba(255,255,255,0.9) !important;border-radius:18px 18px 18px 4px !important;padding:14px 18px !important;backdrop-filter:blur(10px) !important;border-left:3px solid #c1121f !important;animation:msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;}
|
| 871 |
+
.chatbot{background:rgba(255,255,255,0.02) !important;border:1px solid rgba(255,255,255,0.08) !important;border-radius:20px !important;backdrop-filter:blur(20px) !important;}
|
| 872 |
+
textarea,input[type=text],input[type=number]{background:rgba(255,255,255,0.06) !important;color:rgba(255,255,255,0.9) !important;border:1px solid rgba(255,255,255,0.12) !important;border-radius:14px !important;transition:all 0.25s ease !important;backdrop-filter:blur(10px) !important;}
|
| 873 |
+
textarea:focus,input:focus{border-color:rgba(193,18,31,0.6) !important;box-shadow:0 0 0 3px rgba(193,18,31,0.15) !important;outline:none !important;background:rgba(255,255,255,0.08) !important;}
|
| 874 |
+
textarea::placeholder{color:rgba(255,255,255,0.3) !important;}
|
| 875 |
+
button.primary{background:linear-gradient(135deg,#c1121f 0%,#e63946 100%) !important;color:white !important;border:none !important;border-radius:12px !important;font-weight:700 !important;font-size:0.88em !important;box-shadow:0 4px 20px rgba(193,18,31,0.35) !important;transition:all 0.2s cubic-bezier(0.4,0,0.2,1) !important;overflow:hidden !important;}
|
| 876 |
+
button.primary:hover{transform:translateY(-2px) !important;box-shadow:0 8px 30px rgba(193,18,31,0.5) !important;}
|
| 877 |
+
button.secondary{background:rgba(255,255,255,0.07) !important;color:rgba(255,255,255,0.7) !important;border:1px solid rgba(255,255,255,0.15) !important;border-radius:12px !important;transition:all 0.2s ease !important;backdrop-filter:blur(10px) !important;}
|
| 878 |
+
button.secondary:hover{background:rgba(255,255,255,0.12) !important;color:white !important;transform:translateY(-1px) !important;}
|
| 879 |
+
label span{color:rgba(255,255,255,0.55) !important;font-weight:500 !important;font-size:0.78em !important;letter-spacing:0.06em !important;text-transform:uppercase !important;}
|
| 880 |
+
.block,.panel{background:rgba(255,255,255,0.03) !important;border:1px solid rgba(255,255,255,0.07) !important;border-radius:20px !important;backdrop-filter:blur(20px) !important;}
|
| 881 |
+
.prose,.md{color:rgba(255,255,255,0.8) !important;}
|
| 882 |
+
::-webkit-scrollbar{width:5px;height:5px;}
|
| 883 |
+
::-webkit-scrollbar-track{background:transparent;}
|
| 884 |
+
::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:10px;}
|
| 885 |
+
::-webkit-scrollbar-thumb:hover{background:rgba(193,18,31,0.5);}
|
| 886 |
+
img{border-radius:14px !important;border:1px solid rgba(255,255,255,0.08) !important;}'''port gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 887 |
import os, requests, io, json
|
| 888 |
import numpy as np
|
| 889 |
import pandas as pd
|
|
|
|
| 933 |
input[type=number] { background: #f9fafb !important; color: #1a202c !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; }
|
| 934 |
"""
|
| 935 |
|
| 936 |
+
HEADER = """<div style="background:linear-gradient(135deg,#0a0f1e 0%,#0d0508 50%,#0a0f1e 100%);border-bottom:1px solid rgba(193,18,31,0.3);position:relative;overflow:hidden;padding:0;"><style>@keyframes hb{0%,100%{transform:scale(1)}15%{transform:scale(1.18)}30%{transform:scale(1)}45%{transform:scale(1.12)}60%{transform:scale(1)}}@keyframes ecgDraw{from{stroke-dashoffset:800}to{stroke-dashoffset:0}}@keyframes shimmer2{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}</style><div style="position:absolute;top:0;left:0;right:0;bottom:0;background-image:linear-gradient(rgba(193,18,31,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(193,18,31,0.04) 1px,transparent 1px);background-size:40px 40px;pointer-events:none;"></div><div style="position:absolute;top:-50%;left:-10%;width:400px;height:400px;background:radial-gradient(circle,rgba(193,18,31,0.08) 0%,transparent 70%);pointer-events:none;"></div><div style="max-width:1400px;margin:0 auto;padding:18px 28px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1;"><div style="display:flex;align-items:center;gap:16px;"><div style="width:52px;height:52px;background:linear-gradient(135deg,rgba(0,87,168,0.3),rgba(0,87,168,0.1));border:1px solid rgba(0,87,168,0.4);border-radius:14px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 20px rgba(0,87,168,0.25);"><svg width="32" height="32" viewBox="0 0 100 100"><circle cx="50" cy="35" r="28" fill="#0057a8" opacity="0.9"/><ellipse cx="50" cy="14" rx="22" ry="10" fill="#0057a8"/><polygon points="30,14 33,4 36,14" fill="#e8a020"/><polygon points="36,12 39,2 42,12" fill="#e8a020"/><polygon points="42,11 45,1 48,11" fill="#e8a020"/><polygon points="48,11 51,1 54,11" fill="#e8a020"/><polygon points="54,12 57,2 60,12" fill="#e8a020"/><polygon points="60,14 63,4 66,14" fill="#e8a020"/><rect x="36" y="30" width="28" height="22" rx="4" fill="#0057a8"/><rect x="40" y="35" width="8" height="12" rx="2" fill="#e8a020"/><rect x="34" y="50" width="32" height="8" rx="4" fill="#0057a8"/></svg></div><div><div style="color:rgba(232,160,32,0.9);font-size:0.65em;font-weight:600;letter-spacing:3px;text-transform:uppercase;margin-bottom:2px;">San Jose State University</div><div style="color:white;font-size:0.92em;font-weight:700;">Biomedical Engineering</div><div style="color:rgba(255,255,255,0.35);font-size:0.62em;letter-spacing:1px;margin-top:1px;">Dr. Alessandro Bellofiore - CardioLab</div></div></div><div style="text-align:center;flex:1;padding:0 30px;"><div style="display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:6px;"><svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;"><polyline points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15" fill="none" stroke="#c1121f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="800" style="animation:ecgDraw 2s ease forwards;"/></svg><div style="font-size:2.4em;font-weight:900;letter-spacing:1px;line-height:1;"><span style="color:white;">Cardio</span><span style="color:#c1121f;">Lab</span><span style="color:white;"> AI</span></div><svg width="110" height="30" viewBox="0 0 140 30" style="opacity:0.8;transform:scaleX(-1);"><polyline points="0,15 25,15 32,15 38,3 42,27 46,1 50,25 56,15 140,15" fill="none" stroke="#c1121f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="800" style="animation:ecgDraw 2.3s ease forwards;"/></svg></div><div style="display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;"><span style="background:rgba(193,18,31,0.2);border:1px solid rgba(193,18,31,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">RAG 16 PAPERS</span><span style="background:rgba(0,87,168,0.2);border:1px solid rgba(0,87,168,0.4);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">FINE-TUNED MODEL</span><span style="background:rgba(232,160,32,0.15);border:1px solid rgba(232,160,32,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">5 AI MODELS</span><span style="background:rgba(46,204,113,0.15);border:1px solid rgba(46,204,113,0.3);color:rgba(255,255,255,0.8);padding:3px 10px;border-radius:20px;font-size:0.62em;font-weight:600;">$0 COST</span></div></div><div style="display:flex;align-items:center;gap:18px;"><div style="text-align:right;"><div style="color:rgba(255,255,255,0.35);font-size:0.62em;letter-spacing:2px;text-transform:uppercase;margin-bottom:6px;">Research Pillars</div><div style="display:flex;flex-direction:column;gap:4px;align-items:flex-end;"><span style="background:rgba(193,18,31,0.15);border:1px solid rgba(193,18,31,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">MHV - MCL PIV TGT</span><span style="background:rgba(0,87,168,0.15);border:1px solid rgba(0,87,168,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">CKD - uPAD Jaffe</span><span style="background:rgba(232,160,32,0.1);border:1px solid rgba(232,160,32,0.2);color:rgba(255,255,255,0.7);padding:2px 10px;border-radius:6px;font-size:0.65em;">FSI - COMSOL</span></div></div><div style="animation:hb 1.5s ease infinite;"><svg width="52" height="48" viewBox="0 0 100 90"><defs><radialGradient id="hg2" cx="50%" cy="40%"><stop offset="0%" stop-color="#e63946"/><stop offset="100%" stop-color="#7d0a11"/></radialGradient></defs><path d="M50 85 C50 85 5 55 5 30 C5 15 18 5 30 5 C38 5 45 9 50 15 C55 9 62 5 70 5 C82 5 95 15 95 30 C95 55 50 85 50 85Z" fill="url(#hg2)" opacity="0.95"/><polyline points="20,48 30,48 36,35 40,60 44,28 48,52 54,48 80,48" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" opacity="0.9"/></svg></div></div></div><div style="height:2px;background:linear-gradient(90deg,transparent,#0057a8,#c1121f,#e8a020,#c1121f,#0057a8,transparent);"></div></div>"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 937 |
|
| 938 |
# ββ PAPER DATABASE βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 939 |
CHUNKS = []
|