Upload folder using huggingface_hub
Browse files- frontend/index.html +67 -24
- frontend/style.css +65 -24
frontend/index.html
CHANGED
|
@@ -390,13 +390,22 @@
|
|
| 390 |
<section class="how-section">
|
| 391 |
<div class="how-inner">
|
| 392 |
<div class="how-step">
|
| 393 |
-
<div class="how-icon">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
<div class="how-title">Upload</div>
|
| 395 |
<div class="how-desc">Drag & drop any image — real photo or AI-generated</div>
|
| 396 |
</div>
|
| 397 |
<div class="how-arrow">→</div>
|
| 398 |
<div class="how-step">
|
| 399 |
-
<div class="how-icon">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
<div class="how-title">5-Branch Analysis</div>
|
| 401 |
<div class="how-desc">Spectral · Edge · CNN · ViT · Diffusion run in parallel</div>
|
| 402 |
</div>
|
|
@@ -413,7 +422,11 @@
|
|
| 413 |
</div>
|
| 414 |
<div class="how-arrow">→</div>
|
| 415 |
<div class="how-step">
|
| 416 |
-
<div class="how-icon">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 417 |
<div class="how-title">Results</div>
|
| 418 |
<div class="how-desc">Prediction, confidence & explainability maps</div>
|
| 419 |
</div>
|
|
@@ -444,39 +457,69 @@
|
|
| 444 |
<div class="footer-col">
|
| 445 |
<div class="footer-col-title">Tech Stack</div>
|
| 446 |
<ul class="footer-list">
|
| 447 |
-
<li>
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
<li>
|
| 451 |
-
|
| 452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 453 |
</ul>
|
| 454 |
</div>
|
| 455 |
|
| 456 |
-
<div class="footer-col">
|
| 457 |
<div class="footer-col-title">Detection Branches</div>
|
| 458 |
-
<ul class="footer-list">
|
| 459 |
-
<li>
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
<li>
|
| 464 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 465 |
</ul>
|
| 466 |
</div>
|
| 467 |
|
| 468 |
-
<div class="footer-col">
|
| 469 |
<div class="footer-col-title">Research References</div>
|
| 470 |
-
<ul class="footer-list">
|
| 471 |
-
<li>Wang et al. (2020) — CNN
|
| 472 |
-
<li>Frank et al. (2020) — FFT
|
| 473 |
<li>Corvi et al. (2023) — Diffusion</li>
|
| 474 |
<li>Ojha et al. (2023) — Universal Det.</li>
|
| 475 |
<li>Selvaraju et al. (2017) — Grad-CAM</li>
|
| 476 |
</ul>
|
| 477 |
-
<div class="footer-col-title" style="margin-top:
|
| 478 |
-
<ul class="footer-list">
|
| 479 |
-
<li>CIFAKE — 120K images
|
| 480 |
<li>Stable Diffusion v1.4 generated</li>
|
| 481 |
</ul>
|
| 482 |
</div>
|
|
|
|
| 390 |
<section class="how-section">
|
| 391 |
<div class="how-inner">
|
| 392 |
<div class="how-step">
|
| 393 |
+
<div class="how-icon">
|
| 394 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 395 |
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" />
|
| 396 |
+
</svg>
|
| 397 |
+
</div>
|
| 398 |
<div class="how-title">Upload</div>
|
| 399 |
<div class="how-desc">Drag & drop any image — real photo or AI-generated</div>
|
| 400 |
</div>
|
| 401 |
<div class="how-arrow">→</div>
|
| 402 |
<div class="how-step">
|
| 403 |
+
<div class="how-icon">
|
| 404 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 405 |
+
<circle cx="12" cy="12" r="10" />
|
| 406 |
+
<path d="M12 16v-4M12 8h.01" />
|
| 407 |
+
</svg>
|
| 408 |
+
</div>
|
| 409 |
<div class="how-title">5-Branch Analysis</div>
|
| 410 |
<div class="how-desc">Spectral · Edge · CNN · ViT · Diffusion run in parallel</div>
|
| 411 |
</div>
|
|
|
|
| 422 |
</div>
|
| 423 |
<div class="how-arrow">→</div>
|
| 424 |
<div class="how-step">
|
| 425 |
+
<div class="how-icon">
|
| 426 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 427 |
+
<path d="M18 20V10M12 20V4M6 20v-6" />
|
| 428 |
+
</svg>
|
| 429 |
+
</div>
|
| 430 |
<div class="how-title">Results</div>
|
| 431 |
<div class="how-desc">Prediction, confidence & explainability maps</div>
|
| 432 |
</div>
|
|
|
|
| 457 |
<div class="footer-col">
|
| 458 |
<div class="footer-col-title">Tech Stack</div>
|
| 459 |
<ul class="footer-list">
|
| 460 |
+
<li><svg class="footer-icon">
|
| 461 |
+
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
|
| 462 |
+
</svg> TensorFlow 2 · EfficientNet-B0</li>
|
| 463 |
+
<li><svg class="footer-icon">
|
| 464 |
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
|
| 465 |
+
</svg> PyTorch 2 · ViT-B/16 · timm</li>
|
| 466 |
+
<li><svg class="footer-icon">
|
| 467 |
+
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" />
|
| 468 |
+
</svg> FastAPI · Uvicorn</li>
|
| 469 |
+
<li><svg class="footer-icon">
|
| 470 |
+
<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2zM12 8v8M8 12h8" />
|
| 471 |
+
</svg> OpenCV · NumPy · SciPy</li>
|
| 472 |
+
<li><svg class="footer-icon">
|
| 473 |
+
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />
|
| 474 |
+
<rect x="8" y="2" width="8" height="4" rx="1" ry="1" />
|
| 475 |
+
</svg> scikit-learn · Matplotlib</li>
|
| 476 |
+
<li><svg class="footer-icon">
|
| 477 |
+
<path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z" />
|
| 478 |
+
<path d="M12 6v12M6 12h12" />
|
| 479 |
+
</svg> HTML5 · CSS3 · Vanilla JS</li>
|
| 480 |
</ul>
|
| 481 |
</div>
|
| 482 |
|
| 483 |
+
<div class="footer-col divider">
|
| 484 |
<div class="footer-col-title">Detection Branches</div>
|
| 485 |
+
<ul class="footer-list highlight">
|
| 486 |
+
<li><svg class="footer-icon spectral">
|
| 487 |
+
<path d="M2 10s3-3 3-3 2 1 2 1 3-3 3-3 2 1 2 1 3-3 3-3" />
|
| 488 |
+
<path d="M22 14s-3 3-3 3-2-1-2-1-3 3-3 3-2-1-2-1-3 3-3 3" />
|
| 489 |
+
</svg> Spectral — FFT/DCT</li>
|
| 490 |
+
<li><svg class="footer-icon edge">
|
| 491 |
+
<path d="M12 3v18M3 12h18M18 9l-3 3 3 3M6 9l3 3-3 3" />
|
| 492 |
+
</svg> Edge — Sobel/Laplacian</li>
|
| 493 |
+
<li><svg class="footer-icon cnn">
|
| 494 |
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
|
| 495 |
+
<path d="M12 8v4M12 16h.01" />
|
| 496 |
+
</svg> CNN — Texture & Patches</li>
|
| 497 |
+
<li><svg class="footer-icon vit">
|
| 498 |
+
<circle cx="12" cy="12" r="3" />
|
| 499 |
+
<path d="M12 5V3M12 21v-2M5 12H3m18 0h-2M7 7L5.6 5.6m12.8 12.8L17 17M7 17l-1.4 1.4M18.4 5.6L17 7" />
|
| 500 |
+
</svg> ViT — Global Semantics <span class="footer-accuracy">99.30%</span></li>
|
| 501 |
+
<li><svg class="footer-icon diffusion">
|
| 502 |
+
<path d="M4.5 16.5c-1.5 1.26-2 3.1--1 4.5s3.1 1.67 4.5.3 2.1-3.21 1.1-4.7-3.1-1.36-4.6-.1z" />
|
| 503 |
+
<path d="M15 7c-1.5 1.26-2 3.1--1 4.5s3.1 1.67 4.5.3 2.1-3.21 1.1-4.7-3.1-1.36-4.6-.1z" />
|
| 504 |
+
</svg> Diffusion — Noise Residuals</li>
|
| 505 |
+
<li><svg class="footer-icon fusion">
|
| 506 |
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
|
| 507 |
+
</svg> Fusion — Certainty-Weighted</li>
|
| 508 |
</ul>
|
| 509 |
</div>
|
| 510 |
|
| 511 |
+
<div class="footer-col divider">
|
| 512 |
<div class="footer-col-title">Research References</div>
|
| 513 |
+
<ul class="footer-list mini">
|
| 514 |
+
<li>Wang et al. (2020) — CNN</li>
|
| 515 |
+
<li>Frank et al. (2020) — FFT</li>
|
| 516 |
<li>Corvi et al. (2023) — Diffusion</li>
|
| 517 |
<li>Ojha et al. (2023) — Universal Det.</li>
|
| 518 |
<li>Selvaraju et al. (2017) — Grad-CAM</li>
|
| 519 |
</ul>
|
| 520 |
+
<div class="footer-col-title" style="margin-top:1.5rem">Dataset</div>
|
| 521 |
+
<ul class="footer-list mini">
|
| 522 |
+
<li>CIFAKE — 120K images</li>
|
| 523 |
<li>Stable Diffusion v1.4 generated</li>
|
| 524 |
</ul>
|
| 525 |
</div>
|
frontend/style.css
CHANGED
|
@@ -1103,6 +1103,39 @@ body {
|
|
| 1103 |
margin-bottom: 0.9rem;
|
| 1104 |
}
|
| 1105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1106 |
.footer-list {
|
| 1107 |
list-style: none;
|
| 1108 |
display: flex;
|
|
@@ -1114,6 +1147,8 @@ body {
|
|
| 1114 |
font-size: 0.76rem;
|
| 1115 |
color: var(--text3);
|
| 1116 |
line-height: 1.4;
|
|
|
|
|
|
|
| 1117 |
}
|
| 1118 |
|
| 1119 |
.footer-accuracy {
|
|
@@ -1126,16 +1161,16 @@ body {
|
|
| 1126 |
margin-left: 0.3rem;
|
| 1127 |
}
|
| 1128 |
|
| 1129 |
-
/* Bottom bar */
|
| 1130 |
.footer-bar {
|
| 1131 |
max-width: 1100px;
|
| 1132 |
-
margin:
|
| 1133 |
display: flex;
|
| 1134 |
align-items: center;
|
| 1135 |
justify-content: space-between;
|
| 1136 |
padding: 1.2rem 0;
|
| 1137 |
gap: 1rem;
|
| 1138 |
flex-wrap: wrap;
|
|
|
|
| 1139 |
}
|
| 1140 |
|
| 1141 |
.footer-bar>div {
|
|
@@ -1204,31 +1239,37 @@ body {
|
|
| 1204 |
.main {
|
| 1205 |
padding: 2rem 1rem 4rem;
|
| 1206 |
}
|
| 1207 |
-
}
|
| 1208 |
|
| 1209 |
-
.verdict-card {
|
| 1210 |
-
|
| 1211 |
-
|
| 1212 |
-
|
| 1213 |
-
|
| 1214 |
-
}
|
| 1215 |
|
| 1216 |
-
.verdict-text {
|
| 1217 |
-
|
| 1218 |
-
}
|
| 1219 |
|
| 1220 |
-
.viz-grid {
|
| 1221 |
-
|
| 1222 |
-
}
|
| 1223 |
|
| 1224 |
-
.footer-grid {
|
| 1225 |
-
|
| 1226 |
-
|
| 1227 |
-
}
|
| 1228 |
|
| 1229 |
-
.footer-bar {
|
| 1230 |
-
|
| 1231 |
-
|
| 1232 |
-
|
| 1233 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1234 |
}
|
|
|
|
| 1103 |
margin-bottom: 0.9rem;
|
| 1104 |
}
|
| 1105 |
|
| 1106 |
+
.footer-col.divider {
|
| 1107 |
+
border-left: 1px solid var(--border);
|
| 1108 |
+
padding-left: 2.5rem;
|
| 1109 |
+
}
|
| 1110 |
+
|
| 1111 |
+
.footer-icon {
|
| 1112 |
+
width: 14px;
|
| 1113 |
+
height: 14px;
|
| 1114 |
+
display: inline-block;
|
| 1115 |
+
vertical-align: middle;
|
| 1116 |
+
margin-right: 0.6rem;
|
| 1117 |
+
color: var(--text3);
|
| 1118 |
+
opacity: 0.8;
|
| 1119 |
+
transition: transform 0.2s, color 0.2s;
|
| 1120 |
+
}
|
| 1121 |
+
|
| 1122 |
+
.footer-list li:hover .footer-icon {
|
| 1123 |
+
color: var(--accent);
|
| 1124 |
+
transform: translateX(2px);
|
| 1125 |
+
opacity: 1;
|
| 1126 |
+
}
|
| 1127 |
+
|
| 1128 |
+
.footer-list.highlight .footer-icon {
|
| 1129 |
+
color: var(--accent);
|
| 1130 |
+
opacity: 1;
|
| 1131 |
+
}
|
| 1132 |
+
|
| 1133 |
+
.footer-list.mini li {
|
| 1134 |
+
font-size: 0.7rem;
|
| 1135 |
+
color: var(--text3);
|
| 1136 |
+
margin-bottom: 0.3rem;
|
| 1137 |
+
}
|
| 1138 |
+
|
| 1139 |
.footer-list {
|
| 1140 |
list-style: none;
|
| 1141 |
display: flex;
|
|
|
|
| 1147 |
font-size: 0.76rem;
|
| 1148 |
color: var(--text3);
|
| 1149 |
line-height: 1.4;
|
| 1150 |
+
display: flex;
|
| 1151 |
+
align-items: center;
|
| 1152 |
}
|
| 1153 |
|
| 1154 |
.footer-accuracy {
|
|
|
|
| 1161 |
margin-left: 0.3rem;
|
| 1162 |
}
|
| 1163 |
|
|
|
|
| 1164 |
.footer-bar {
|
| 1165 |
max-width: 1100px;
|
| 1166 |
+
margin: 1.5rem auto 0;
|
| 1167 |
display: flex;
|
| 1168 |
align-items: center;
|
| 1169 |
justify-content: space-between;
|
| 1170 |
padding: 1.2rem 0;
|
| 1171 |
gap: 1rem;
|
| 1172 |
flex-wrap: wrap;
|
| 1173 |
+
border-top: 1px solid var(--border);
|
| 1174 |
}
|
| 1175 |
|
| 1176 |
.footer-bar>div {
|
|
|
|
| 1239 |
.main {
|
| 1240 |
padding: 2rem 1rem 4rem;
|
| 1241 |
}
|
|
|
|
| 1242 |
|
| 1243 |
+
.verdict-card {
|
| 1244 |
+
flex-direction: column;
|
| 1245 |
+
text-align: center;
|
| 1246 |
+
padding: 1.5rem;
|
| 1247 |
+
gap: 1.5rem;
|
| 1248 |
+
}
|
| 1249 |
|
| 1250 |
+
.verdict-text {
|
| 1251 |
+
font-size: clamp(1.4rem, 5vw, 1.8rem);
|
| 1252 |
+
}
|
| 1253 |
|
| 1254 |
+
.viz-grid {
|
| 1255 |
+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
| 1256 |
+
}
|
| 1257 |
|
| 1258 |
+
.footer-grid {
|
| 1259 |
+
grid-template-columns: 1fr;
|
| 1260 |
+
gap: 1.5rem;
|
| 1261 |
+
}
|
| 1262 |
|
| 1263 |
+
.footer-bar {
|
| 1264 |
+
flex-direction: column;
|
| 1265 |
+
text-align: center;
|
| 1266 |
+
gap: 0.4rem;
|
| 1267 |
+
}
|
| 1268 |
+
|
| 1269 |
+
.footer-col.divider {
|
| 1270 |
+
border-left: none;
|
| 1271 |
+
padding-left: 0;
|
| 1272 |
+
border-top: 1px solid var(--border);
|
| 1273 |
+
padding-top: 1.5rem;
|
| 1274 |
+
}
|
| 1275 |
}
|