Spaces:
Running
Running
Update public/index.html
Browse files- public/index.html +63 -34
public/index.html
CHANGED
|
@@ -45,26 +45,39 @@
|
|
| 45 |
.nav-link { color: #e2e8f0; font-size: 15px; font-weight: 500; }
|
| 46 |
.nav-link:hover { color: var(--text-yellow); }
|
| 47 |
.btn-submit { background: var(--grad-blue); color: white !important; padding: 10px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
|
| 48 |
-
|
| 49 |
-
|
| 50 |
/* --- HERO --- */
|
| 51 |
-
|
| 52 |
-
.hero
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
.conf-badge { background: white; color: black; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 8px; margin-bottom: 30px; font-weight: 700; font-size: 14px; }
|
| 54 |
.conf-badge i { color: #cc0000; font-size: 18px; }
|
|
|
|
| 55 |
.hero h1 { font-family: 'Rubik', sans-serif; font-size: 64px; font-weight: 800; margin: 0; line-height: 1.1; }
|
| 56 |
.hero h2 { font-family: 'Rubik', sans-serif; font-size: 32px; color: var(--text-yellow); margin: 15px 0 30px; font-weight: 700; }
|
| 57 |
-
.hero p { color: #cbd5e1; font-size: 18px; line-height: 1.6; max-width:
|
| 58 |
-
|
|
|
|
| 59 |
.action-btn { display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 30px; color: white; font-weight: 600; font-size: 15px; transition: transform 0.2s; }
|
| 60 |
.action-btn:hover { transform: translateY(-3px); color: white; }
|
|
|
|
| 61 |
.bg-red { background: var(--grad-red); } .bg-purple { background: var(--grad-purple); } .bg-orange { background: var(--grad-orange); } .bg-blue { background: var(--grad-blue); } .bg-green { background: var(--grad-green); }
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
.
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
| 68 |
|
| 69 |
/* --- WIDTH CONTROLLER --- */
|
| 70 |
.content-container { width: 80%; max-width: 1600px; margin: 0 auto; }
|
|
@@ -139,12 +152,6 @@
|
|
| 139 |
<a href="https://africa.dlnlp.ai/simba/#models" target="_blank" class="action-btn bg-blue"><i class="fa-solid fa-bolt"></i> Simba Models</a>
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
-
<div class="hero-visual">
|
| 143 |
-
<div class="audio-wave">
|
| 144 |
-
<div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div>
|
| 145 |
-
</div>
|
| 146 |
-
|
| 147 |
-
</div>
|
| 148 |
</div>
|
| 149 |
|
| 150 |
<div class="content-container">
|
|
@@ -305,15 +312,22 @@
|
|
| 305 |
modelStats.sort((a,b) => (a.wer - b.wer) || (a.cer - b.cer)); // Sorting by WER then CER
|
| 306 |
|
| 307 |
html = `<table><thead><tr><th>Model</th><th>Simba ASR Score (WER/CER) <i class="fa-solid fa-arrow-down arrow-down"></i></th></tr></thead><tbody>`;
|
|
|
|
|
|
|
|
|
|
| 308 |
modelStats.forEach((m, i) => {
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
|
| 315 |
let icon = '';
|
| 316 |
-
if(rank === 1) icon = 'π₯ '; else if(rank === 2) icon = 'π₯ '; else if(rank === 3) icon = 'π₯ ';
|
| 317 |
|
| 318 |
html += `<tr><td style="font-weight:600; color:var(--simba-navy)">${icon}${m.name}</td><td><b>${fmt(m.wer)} / ${fmt(m.cer)}</b></td></tr>`;
|
| 319 |
});
|
|
@@ -334,10 +348,15 @@
|
|
| 334 |
d.languages.forEach(l => html += `<th>${getIso(l.name, l.iso)}</th>`);
|
| 335 |
html += `</tr></thead><tbody>`;
|
| 336 |
|
|
|
|
| 337 |
d.data.forEach((r, idx) => {
|
| 338 |
-
if(idx
|
| 339 |
-
|
| 340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
|
| 342 |
let icon = '';
|
| 343 |
if(r.rank === 1) icon = 'π₯ '; else if(r.rank === 2) icon = 'π₯ '; else if(r.rank === 3) icon = 'π₯ ';
|
|
@@ -422,10 +441,15 @@
|
|
| 422 |
let h1 = `<table><thead><tr><th>Model</th><th>WER <i class="fa-solid fa-arrow-down arrow-down"></i></th><th>CER <i class="fa-solid fa-arrow-down arrow-down"></i></th></tr></thead><tbody>`;
|
| 423 |
if(asrRows.length === 0) h1 += `<tr><td colspan="3">No ASR data for this language.</td></tr>`;
|
| 424 |
else {
|
|
|
|
| 425 |
asrRows.forEach((r, i) => {
|
| 426 |
-
if(i
|
| 427 |
-
|
| 428 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 429 |
|
| 430 |
let icon = '';
|
| 431 |
if(r.rank === 1) icon = 'π₯ '; else if(r.rank === 2) icon = 'π₯ '; else if(r.rank === 3) icon = 'π₯ ';
|
|
@@ -460,7 +484,7 @@
|
|
| 460 |
document.getElementById('lang-tts-table').innerHTML = h2;
|
| 461 |
|
| 462 |
// 3. SLID
|
| 463 |
-
let h3 = `<table><thead><tr><th>Model</th><th>F1-Score
|
| 464 |
const slidRow = DATA.slid.find(r => r.Language === lang) ||
|
| 465 |
DATA.slid.find(r => r.Language.startsWith(lang + " (")) ||
|
| 466 |
DATA.slid.find(r => r.Language.includes(lang));
|
|
@@ -469,10 +493,15 @@
|
|
| 469 |
const models = Object.keys(slidRow).filter(k => k !== 'Language' && k !== 'ISO');
|
| 470 |
const scores = models.map(m => ({n: m, v: slidRow[m]})).sort((a,b) => b.v - a.v);
|
| 471 |
|
|
|
|
| 472 |
scores.forEach((sc, i) => {
|
| 473 |
-
if(i
|
| 474 |
-
|
| 475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
|
| 477 |
let icon = '';
|
| 478 |
if(sc.rank === 1) icon = 'π₯ '; else if(sc.rank === 2) icon = 'π₯ '; else if(sc.rank === 3) icon = 'π₯ ';
|
|
|
|
| 45 |
.nav-link { color: #e2e8f0; font-size: 15px; font-weight: 500; }
|
| 46 |
.nav-link:hover { color: var(--text-yellow); }
|
| 47 |
.btn-submit { background: var(--grad-blue); color: white !important; padding: 10px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
|
| 48 |
+
|
|
|
|
| 49 |
/* --- HERO --- */
|
| 50 |
+
/* Updated to center content since visual was removed */
|
| 51 |
+
.hero {
|
| 52 |
+
display: flex;
|
| 53 |
+
justify-content: center;
|
| 54 |
+
text-align: center;
|
| 55 |
+
max-width: 1000px;
|
| 56 |
+
margin: 60px auto 100px;
|
| 57 |
+
padding: 0 40px;
|
| 58 |
+
position: relative;
|
| 59 |
+
}
|
| 60 |
+
.hero-content { z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; }
|
| 61 |
+
|
| 62 |
.conf-badge { background: white; color: black; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 8px; margin-bottom: 30px; font-weight: 700; font-size: 14px; }
|
| 63 |
.conf-badge i { color: #cc0000; font-size: 18px; }
|
| 64 |
+
|
| 65 |
.hero h1 { font-family: 'Rubik', sans-serif; font-size: 64px; font-weight: 800; margin: 0; line-height: 1.1; }
|
| 66 |
.hero h2 { font-family: 'Rubik', sans-serif; font-size: 32px; color: var(--text-yellow); margin: 15px 0 30px; font-weight: 700; }
|
| 67 |
+
.hero p { color: #cbd5e1; font-size: 18px; line-height: 1.6; max-width: 700px; margin-bottom: 50px; }
|
| 68 |
+
|
| 69 |
+
.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
|
| 70 |
.action-btn { display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 30px; color: white; font-weight: 600; font-size: 15px; transition: transform 0.2s; }
|
| 71 |
.action-btn:hover { transform: translateY(-3px); color: white; }
|
| 72 |
+
|
| 73 |
.bg-red { background: var(--grad-red); } .bg-purple { background: var(--grad-purple); } .bg-orange { background: var(--grad-orange); } .bg-blue { background: var(--grad-blue); } .bg-green { background: var(--grad-green); }
|
| 74 |
+
|
| 75 |
+
/* Wave Animation */
|
| 76 |
+
.wave-bg {
|
| 77 |
+
position: absolute; top: -50px; left: -50%; width: 200%; height: 100%;
|
| 78 |
+
background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 70%);
|
| 79 |
+
z-index: 0; pointer-events: none;
|
| 80 |
+
}
|
| 81 |
|
| 82 |
/* --- WIDTH CONTROLLER --- */
|
| 83 |
.content-container { width: 80%; max-width: 1600px; margin: 0 auto; }
|
|
|
|
| 152 |
<a href="https://africa.dlnlp.ai/simba/#models" target="_blank" class="action-btn bg-blue"><i class="fa-solid fa-bolt"></i> Simba Models</a>
|
| 153 |
</div>
|
| 154 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
</div>
|
| 156 |
|
| 157 |
<div class="content-container">
|
|
|
|
| 312 |
modelStats.sort((a,b) => (a.wer - b.wer) || (a.cer - b.cer)); // Sorting by WER then CER
|
| 313 |
|
| 314 |
html = `<table><thead><tr><th>Model</th><th>Simba ASR Score (WER/CER) <i class="fa-solid fa-arrow-down arrow-down"></i></th></tr></thead><tbody>`;
|
| 315 |
+
|
| 316 |
+
// Tie-Aware Ranking Logic
|
| 317 |
+
let currentRank = 1;
|
| 318 |
modelStats.forEach((m, i) => {
|
| 319 |
+
if (i > 0) {
|
| 320 |
+
const prev = modelStats[i-1];
|
| 321 |
+
if (Math.abs(m.wer - prev.wer) > 0.001) {
|
| 322 |
+
currentRank = i + 1;
|
| 323 |
+
}
|
| 324 |
+
} else {
|
| 325 |
+
currentRank = 1;
|
| 326 |
+
}
|
| 327 |
+
m.rank = currentRank;
|
| 328 |
|
| 329 |
let icon = '';
|
| 330 |
+
if(m.rank === 1) icon = 'π₯ '; else if(m.rank === 2) icon = 'π₯ '; else if(m.rank === 3) icon = 'π₯ ';
|
| 331 |
|
| 332 |
html += `<tr><td style="font-weight:600; color:var(--simba-navy)">${icon}${m.name}</td><td><b>${fmt(m.wer)} / ${fmt(m.cer)}</b></td></tr>`;
|
| 333 |
});
|
|
|
|
| 348 |
d.languages.forEach(l => html += `<th>${getIso(l.name, l.iso)}</th>`);
|
| 349 |
html += `</tr></thead><tbody>`;
|
| 350 |
|
| 351 |
+
let currentRank = 1;
|
| 352 |
d.data.forEach((r, idx) => {
|
| 353 |
+
if(idx > 0) {
|
| 354 |
+
const prev = d.data[idx-1];
|
| 355 |
+
if (Math.abs(r.Avg_WER - prev.Avg_WER) > 0.001) currentRank = idx + 1;
|
| 356 |
+
} else {
|
| 357 |
+
currentRank = 1;
|
| 358 |
+
}
|
| 359 |
+
r.rank = currentRank;
|
| 360 |
|
| 361 |
let icon = '';
|
| 362 |
if(r.rank === 1) icon = 'π₯ '; else if(r.rank === 2) icon = 'π₯ '; else if(r.rank === 3) icon = 'π₯ ';
|
|
|
|
| 441 |
let h1 = `<table><thead><tr><th>Model</th><th>WER <i class="fa-solid fa-arrow-down arrow-down"></i></th><th>CER <i class="fa-solid fa-arrow-down arrow-down"></i></th></tr></thead><tbody>`;
|
| 442 |
if(asrRows.length === 0) h1 += `<tr><td colspan="3">No ASR data for this language.</td></tr>`;
|
| 443 |
else {
|
| 444 |
+
let currentRank = 1;
|
| 445 |
asrRows.forEach((r, i) => {
|
| 446 |
+
if (i > 0) {
|
| 447 |
+
const prev = asrRows[i-1];
|
| 448 |
+
if (Math.abs(r.wer - prev.wer) > 0.001) currentRank = i + 1;
|
| 449 |
+
} else {
|
| 450 |
+
currentRank = 1;
|
| 451 |
+
}
|
| 452 |
+
r.rank = currentRank;
|
| 453 |
|
| 454 |
let icon = '';
|
| 455 |
if(r.rank === 1) icon = 'π₯ '; else if(r.rank === 2) icon = 'π₯ '; else if(r.rank === 3) icon = 'π₯ ';
|
|
|
|
| 484 |
document.getElementById('lang-tts-table').innerHTML = h2;
|
| 485 |
|
| 486 |
// 3. SLID
|
| 487 |
+
let h3 = `<table><thead><tr><th>Model</th><th>F1-Score <i class="fa-solid fa-arrow-up arrow-up"></i></th></tr></thead><tbody>`;
|
| 488 |
const slidRow = DATA.slid.find(r => r.Language === lang) ||
|
| 489 |
DATA.slid.find(r => r.Language.startsWith(lang + " (")) ||
|
| 490 |
DATA.slid.find(r => r.Language.includes(lang));
|
|
|
|
| 493 |
const models = Object.keys(slidRow).filter(k => k !== 'Language' && k !== 'ISO');
|
| 494 |
const scores = models.map(m => ({n: m, v: slidRow[m]})).sort((a,b) => b.v - a.v);
|
| 495 |
|
| 496 |
+
let currentRank = 1;
|
| 497 |
scores.forEach((sc, i) => {
|
| 498 |
+
if(i > 0) {
|
| 499 |
+
const prev = scores[i-1];
|
| 500 |
+
if (Math.abs(sc.v - prev.v) > 0.001) currentRank = i + 1;
|
| 501 |
+
} else {
|
| 502 |
+
currentRank = 1;
|
| 503 |
+
}
|
| 504 |
+
sc.rank = currentRank;
|
| 505 |
|
| 506 |
let icon = '';
|
| 507 |
if(sc.rank === 1) icon = 'π₯ '; else if(sc.rank === 2) icon = 'π₯ '; else if(sc.rank === 3) icon = 'π₯ ';
|