Spaces:
Running
Running
about tab/ minor fixes..
Browse files- frontend/vehicles.html +16 -8
frontend/vehicles.html
CHANGED
|
@@ -330,7 +330,7 @@
|
|
| 330 |
</a>
|
| 331 |
<a onclick="switchTab('overview')" id="nav-overview"
|
| 332 |
class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
|
| 333 |
-
<i class="fa-solid fa-desktop w-6"></i> <span class="font-medium">
|
| 334 |
</a>
|
| 335 |
<a onclick="switchTab('run-details')" id="nav-run-details"
|
| 336 |
class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
|
|
@@ -362,10 +362,10 @@
|
|
| 362 |
<main class="flex-1 flex flex-col h-full min-w-0 p-4 gap-4">
|
| 363 |
|
| 364 |
<!-- TAB: About -->
|
| 365 |
-
<div id="tab-about" class="hidden flex-1 min-h-0 overflow-y-auto
|
| 366 |
-
<div class="max-w-
|
| 367 |
-
<div class="
|
| 368 |
-
<p class="text-
|
| 369 |
style="color:#a89f97">
|
| 370 |
“Traffic data has always existed on Indian roads — in the movement of every vehicle,
|
| 371 |
every crossing, every congested junction.
|
|
@@ -374,7 +374,7 @@
|
|
| 374 |
</p>
|
| 375 |
</div>
|
| 376 |
|
| 377 |
-
<div class="space-y-6 leading-relaxed text-sm" style="color:#a89f97">
|
| 378 |
<p>
|
| 379 |
UrbanFlow is a computer vision system purpose-built for traffic analysis on Indian roads.
|
| 380 |
It processes video footage and returns structured outputs — vehicle counts by class,
|
|
@@ -386,7 +386,7 @@
|
|
| 386 |
and transport infrastructure assessment. Footage is submitted, inference runs in the cloud,
|
| 387 |
and results are returned as structured KPI outputs and downloadable reports.
|
| 388 |
</p>
|
| 389 |
-
<div class="grid grid-cols-3 gap-8 pt-8
|
| 390 |
<div class="space-y-4">
|
| 391 |
<h4 class="font-bold text-[13px] uppercase tracking-wider" style="color:#f0ece6">What It Does</h4>
|
| 392 |
<ul class="text-xs space-y-3 pl-1">
|
|
@@ -1462,7 +1462,8 @@
|
|
| 1462 |
return;
|
| 1463 |
}
|
| 1464 |
|
| 1465 |
-
|
|
|
|
| 1466 |
document.getElementById('proc-bar').style.width = pct + '%';
|
| 1467 |
document.getElementById('proc-frames').innerText = `${d.frame_index} / ${d.total_iters} Frames`;
|
| 1468 |
|
|
@@ -1523,6 +1524,7 @@
|
|
| 1523 |
const url = `/reports/${videoId}/${name}`;
|
| 1524 |
const isVideo = name.endsWith('.mp4');
|
| 1525 |
const isPDF = name.endsWith('.pdf');
|
|
|
|
| 1526 |
const card = document.createElement('div');
|
| 1527 |
card.className = 'bg-black rounded-xl border border-slate-800 shadow-sm flex flex-col overflow-hidden';
|
| 1528 |
|
|
@@ -1539,6 +1541,12 @@
|
|
| 1539 |
<i class="fa-solid fa-file-pdf text-6xl mb-4 text-white"></i>
|
| 1540 |
<span class="text-xs font-bold uppercase tracking-widest text-slate-500">PDF Document</span>
|
| 1541 |
</div>`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1542 |
} else {
|
| 1543 |
previewHTML = `<img src="${url}" alt="${info.title}" class="max-w-full max-h-[320px] object-contain rounded">`;
|
| 1544 |
}
|
|
|
|
| 330 |
</a>
|
| 331 |
<a onclick="switchTab('overview')" id="nav-overview"
|
| 332 |
class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
|
| 333 |
+
<i class="fa-solid fa-desktop w-6"></i> <span class="font-medium">Stats</span>
|
| 334 |
</a>
|
| 335 |
<a onclick="switchTab('run-details')" id="nav-run-details"
|
| 336 |
class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
|
|
|
|
| 362 |
<main class="flex-1 flex flex-col h-full min-w-0 p-4 gap-4">
|
| 363 |
|
| 364 |
<!-- TAB: About -->
|
| 365 |
+
<div id="tab-about" class="hidden flex-1 min-h-0 overflow-y-auto px-12 py-12">
|
| 366 |
+
<div class="max-w-4xl mx-auto bg-black border border-slate-800 rounded-[2.5rem] p-12 shadow-2xl space-y-12">
|
| 367 |
+
<div class="text-center pb-12 border-b border-slate-900">
|
| 368 |
+
<p class="text-[13px] font-montserrat font-medium italic leading-relaxed max-w-2xl mx-auto"
|
| 369 |
style="color:#a89f97">
|
| 370 |
“Traffic data has always existed on Indian roads — in the movement of every vehicle,
|
| 371 |
every crossing, every congested junction.
|
|
|
|
| 374 |
</p>
|
| 375 |
</div>
|
| 376 |
|
| 377 |
+
<div class="space-y-6 leading-relaxed text-sm text-center" style="color:#a89f97">
|
| 378 |
<p>
|
| 379 |
UrbanFlow is a computer vision system purpose-built for traffic analysis on Indian roads.
|
| 380 |
It processes video footage and returns structured outputs — vehicle counts by class,
|
|
|
|
| 386 |
and transport infrastructure assessment. Footage is submitted, inference runs in the cloud,
|
| 387 |
and results are returned as structured KPI outputs and downloadable reports.
|
| 388 |
</p>
|
| 389 |
+
<div class="grid grid-cols-3 gap-8 pt-8 text-left border-t border-slate-900">
|
| 390 |
<div class="space-y-4">
|
| 391 |
<h4 class="font-bold text-[13px] uppercase tracking-wider" style="color:#f0ece6">What It Does</h4>
|
| 392 |
<ul class="text-xs space-y-3 pl-1">
|
|
|
|
| 1462 |
return;
|
| 1463 |
}
|
| 1464 |
|
| 1465 |
+
let pct = ((d.frame_index / d.total_iters) * 100).toFixed(1);
|
| 1466 |
+
if (d.frame_index >= d.total_iters - 1) pct = '100.0';
|
| 1467 |
document.getElementById('proc-bar').style.width = pct + '%';
|
| 1468 |
document.getElementById('proc-frames').innerText = `${d.frame_index} / ${d.total_iters} Frames`;
|
| 1469 |
|
|
|
|
| 1524 |
const url = `/reports/${videoId}/${name}`;
|
| 1525 |
const isVideo = name.endsWith('.mp4');
|
| 1526 |
const isPDF = name.endsWith('.pdf');
|
| 1527 |
+
const isCSV = name.endsWith('.csv');
|
| 1528 |
const card = document.createElement('div');
|
| 1529 |
card.className = 'bg-black rounded-xl border border-slate-800 shadow-sm flex flex-col overflow-hidden';
|
| 1530 |
|
|
|
|
| 1541 |
<i class="fa-solid fa-file-pdf text-6xl mb-4 text-white"></i>
|
| 1542 |
<span class="text-xs font-bold uppercase tracking-widest text-slate-500">PDF Document</span>
|
| 1543 |
</div>`;
|
| 1544 |
+
} else if (isCSV) {
|
| 1545 |
+
previewHTML = `
|
| 1546 |
+
<div class="flex flex-col items-center justify-center py-12 text-slate-700">
|
| 1547 |
+
<i class="fa-solid fa-file-csv text-6xl mb-4 text-white"></i>
|
| 1548 |
+
<span class="text-xs font-bold uppercase tracking-widest text-slate-500">Raw Analytics Export</span>
|
| 1549 |
+
</div>`;
|
| 1550 |
} else {
|
| 1551 |
previewHTML = `<img src="${url}" alt="${info.title}" class="max-w-full max-h-[320px] object-contain rounded">`;
|
| 1552 |
}
|