Spaces:
Running on Zero
Running on Zero
redesign
Browse files- index.html +462 -328
index.html
CHANGED
|
@@ -3,14 +3,14 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
|
| 8 |
<!-- Premium Google Fonts -->
|
| 9 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@
|
| 12 |
|
| 13 |
-
<!-- Tailwind CSS
|
| 14 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 15 |
|
| 16 |
<script>
|
|
@@ -23,20 +23,18 @@
|
|
| 23 |
mono: ['Fira Code', 'monospace'],
|
| 24 |
},
|
| 25 |
colors: {
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
700: '#047857',
|
| 32 |
-
900: '#064e3b',
|
| 33 |
},
|
| 34 |
dark: {
|
| 35 |
-
50: '#
|
| 36 |
-
100: '#
|
| 37 |
-
200: '#
|
| 38 |
-
300: '#
|
| 39 |
-
400: '#
|
| 40 |
}
|
| 41 |
}
|
| 42 |
}
|
|
@@ -45,414 +43,528 @@
|
|
| 45 |
</script>
|
| 46 |
|
| 47 |
<style>
|
| 48 |
-
/* Custom Premium Glassmorphism and Micro-animations */
|
| 49 |
body {
|
| 50 |
-
background-color: #
|
| 51 |
background-image:
|
| 52 |
-
radial-gradient(at
|
| 53 |
-
radial-gradient(at
|
| 54 |
background-attachment: fixed;
|
| 55 |
}
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
.glass-panel {
|
| 58 |
-
background: rgba(
|
| 59 |
-
backdrop-filter: blur(
|
| 60 |
-
-webkit-backdrop-filter: blur(
|
| 61 |
-
border: 1px solid rgba(255, 255, 255, 0.
|
| 62 |
-
box-shadow: 0
|
| 63 |
}
|
| 64 |
|
| 65 |
.glass-panel-interactive {
|
| 66 |
-
transition: all 0.
|
| 67 |
}
|
| 68 |
.glass-panel-interactive:hover {
|
| 69 |
-
border-color: rgba(
|
| 70 |
-
box-shadow: 0
|
| 71 |
transform: translateY(-2px);
|
| 72 |
}
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
position: relative;
|
|
|
|
|
|
|
|
|
|
| 76 |
overflow: hidden;
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
transform: translateY(-1px);
|
| 82 |
}
|
| 83 |
-
.
|
| 84 |
transform: translateY(1px);
|
| 85 |
}
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
/* Custom Scrollbar */
|
| 88 |
::-webkit-scrollbar {
|
| 89 |
-
width:
|
| 90 |
-
height:
|
| 91 |
}
|
| 92 |
::-webkit-scrollbar-track {
|
| 93 |
-
background: #
|
| 94 |
}
|
| 95 |
::-webkit-scrollbar-thumb {
|
| 96 |
-
background: #
|
| 97 |
-
border-radius:
|
| 98 |
}
|
| 99 |
::-webkit-scrollbar-thumb:hover {
|
| 100 |
-
background: #
|
| 101 |
}
|
| 102 |
|
| 103 |
-
/*
|
| 104 |
.dot-pulse {
|
| 105 |
-
animation: pulse 1.
|
| 106 |
}
|
| 107 |
@keyframes pulse {
|
| 108 |
0%, 100% { opacity: 0.3; transform: scale(0.9); }
|
| 109 |
50% { opacity: 1; transform: scale(1.1); }
|
| 110 |
}
|
| 111 |
|
| 112 |
-
/* Dotted borders */
|
| 113 |
.drop-zone-active {
|
| 114 |
-
border-color: #
|
| 115 |
-
background: rgba(
|
| 116 |
}
|
| 117 |
</style>
|
| 118 |
</head>
|
| 119 |
-
<body class="text-slate-100 font-sans min-h-screen pb-
|
| 120 |
-
|
| 121 |
-
<!--
|
| 122 |
-
<
|
| 123 |
-
<div class="max-w-7xl mx-auto flex
|
| 124 |
-
<div class="flex items-center gap-
|
| 125 |
-
<
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
<
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
</div>
|
| 134 |
</div>
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
<span class="px-3 py-1 text-xs font-semibold rounded-full bg-white/5 text-slate-400 border border-white/10">
|
| 141 |
-
gradio.Server Mode
|
| 142 |
</span>
|
|
|
|
|
|
|
|
|
|
| 143 |
</div>
|
| 144 |
</div>
|
| 145 |
-
</
|
| 146 |
|
| 147 |
-
<
|
|
|
|
| 148 |
|
| 149 |
-
<!--
|
| 150 |
-
<
|
| 151 |
-
<h2 class="text-lg font-semibold font-outfit text-emerald-400 mb-2">🚀 Smart Natural Language Visual Grounding</h2>
|
| 152 |
-
<p class="text-sm text-slate-300 leading-relaxed max-w-4xl">
|
| 153 |
-
Identify, segment, and locate objects in images or video clips in real-time. Use natural language commands to describe what you're looking for, select the appropriate model options, and visualize precise bounding boxes instantly.
|
| 154 |
-
</p>
|
| 155 |
-
</div>
|
| 156 |
-
|
| 157 |
-
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start">
|
| 158 |
|
| 159 |
-
<!--
|
| 160 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
-
<
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
</svg>
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
<
|
| 174 |
-
<div class="grid grid-cols-2 gap-2 bg-dark-200 p-1 rounded-xl border border-white/5">
|
| 175 |
-
<button id="media-type-image" class="py-2.5 px-4 rounded-lg font-semibold text-sm transition-all bg-brand-500 text-white shadow shadow-brand-500/10">
|
| 176 |
-
Single Image
|
| 177 |
-
</button>
|
| 178 |
-
<button id="media-type-video" class="py-2.5 px-4 rounded-lg font-semibold text-sm text-slate-400 hover:text-slate-200 transition-all">
|
| 179 |
-
Video Clip
|
| 180 |
-
</button>
|
| 181 |
-
</div>
|
| 182 |
</div>
|
|
|
|
| 183 |
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
<
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
</div>
|
| 202 |
-
<input type="text" id="categories" value="car, bus, person, potted plant" placeholder="e.g. car, person, dog" class="w-full bg-dark-200 border border-white/10 rounded-xl px-4 py-3 text-sm focus:border-brand-500 focus:outline-none transition-all text-white placeholder-slate-600">
|
| 203 |
-
</div>
|
| 204 |
-
|
| 205 |
-
<!-- 4. Inference Mode -->
|
| 206 |
-
<div class="space-y-2">
|
| 207 |
-
<label for="inference-mode" class="text-xs font-semibold text-slate-400 tracking-wider uppercase">4. Inference Mode</label>
|
| 208 |
-
<select id="inference-mode" class="w-full bg-dark-200 border border-white/10 rounded-xl px-4 py-3 text-sm focus:border-brand-500 focus:outline-none transition-all">
|
| 209 |
-
<option value="hybrid">Hybrid - Intelligent Quality-Speed Balance (Recommended)</option>
|
| 210 |
-
<option value="fast">Fast - MTP Parallel Decoding</option>
|
| 211 |
-
<option value="slow">Slow - Standard AR Sequential Decoding</option>
|
| 212 |
-
</select>
|
| 213 |
-
</div>
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
<summary class="list-none flex justify-between items-center cursor-pointer select-none text-xs font-semibold text-slate-400 tracking-wider uppercase hover:text-slate-200 transition-colors">
|
| 218 |
-
<span>5. Advanced Parameters</span>
|
| 219 |
-
<svg class="h-4 w-4 transform group-open:rotate-180 transition-transform text-slate-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 220 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
|
| 221 |
-
</svg>
|
| 222 |
-
</summary>
|
| 223 |
-
<div class="space-y-5 pt-5">
|
| 224 |
|
| 225 |
-
<!--
|
| 226 |
-
<div class="
|
| 227 |
-
<div
|
| 228 |
-
<
|
| 229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
</div>
|
| 231 |
-
<input type="range" id="temp" min="0.1" max="2.0" step="0.1" value="0.7" class="w-full h-1.5 bg-dark-200 rounded-lg appearance-none cursor-pointer accent-brand-500">
|
| 232 |
-
</div>
|
| 233 |
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
<
|
| 237 |
-
<span class="text-slate-400">Top P (Nucleus Sampling)</span>
|
| 238 |
-
<span id="topp-val" class="font-mono text-emerald-400">0.9</span>
|
| 239 |
-
</div>
|
| 240 |
-
<input type="range" id="topp" min="0.05" max="1.0" step="0.05" value="0.9" class="w-full h-1.5 bg-dark-200 rounded-lg appearance-none cursor-pointer accent-brand-500">
|
| 241 |
-
</div>
|
| 242 |
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
<div class="flex justify-between text-xs">
|
| 246 |
-
<span class="text-slate-400">Top K</span>
|
| 247 |
-
<span id="topk-val" class="font-mono text-emerald-400">20</span>
|
| 248 |
-
</div>
|
| 249 |
-
<input type="range" id="topk" min="1" max="100" step="1" value="20" class="w-full h-1.5 bg-dark-200 rounded-lg appearance-none cursor-pointer accent-brand-500">
|
| 250 |
</div>
|
| 251 |
|
| 252 |
-
<!--
|
| 253 |
-
<div class="
|
| 254 |
-
<
|
| 255 |
-
<
|
| 256 |
</div>
|
| 257 |
|
| 258 |
-
<!--
|
| 259 |
-
<div id="
|
| 260 |
-
<div class="flex
|
| 261 |
-
<span class="
|
| 262 |
-
<span
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
</div>
|
| 264 |
-
<input type="range" id="max-frames" min="1" max="10" step="1" value="4" class="w-full h-1.5 bg-dark-200 rounded-lg appearance-none cursor-pointer accent-brand-500">
|
| 265 |
-
<span class="text-[10px] text-slate-500 block leading-tight">Lower caps prevent system timeouts. Ideal is 4-6 frames.</span>
|
| 266 |
</div>
|
| 267 |
|
| 268 |
</div>
|
| 269 |
-
</details>
|
| 270 |
|
| 271 |
-
<
|
| 272 |
-
<button id="run-btn" class="glow-btn w-full py-4 px-6 rounded-xl bg-gradient-to-r from-emerald-500 to-teal-600 hover:from-emerald-400 hover:to-teal-500 text-white font-bold tracking-wide text-sm flex items-center justify-center gap-2 shadow-lg shadow-emerald-500/10">
|
| 273 |
-
<span id="btn-icon">🧠</span>
|
| 274 |
-
<span id="btn-text">Run Inference</span>
|
| 275 |
-
</button>
|
| 276 |
</div>
|
| 277 |
|
| 278 |
-
|
| 279 |
-
<div class="glass-panel rounded-2xl p-5 space-y-3">
|
| 280 |
-
<span class="text-xs font-semibold text-slate-400 tracking-wider uppercase block">💬 Generated Raw Prompt</span>
|
| 281 |
-
<p id="raw-prompt-preview" class="text-xs bg-dark-400 border border-white/5 rounded-xl p-3 text-slate-400 font-mono break-all leading-normal"></p>
|
| 282 |
-
</div>
|
| 283 |
|
| 284 |
-
|
| 285 |
|
| 286 |
-
|
| 287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
|
| 289 |
-
<!-- Media
|
| 290 |
-
<div class="
|
| 291 |
-
<
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
</
|
| 299 |
-
<span id="workspace-status" class="text-xs text-slate-400 font-mono">No Media Loaded</span>
|
| 300 |
</div>
|
|
|
|
| 301 |
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
<
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 314 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
|
| 315 |
-
</svg>
|
| 316 |
-
</div>
|
| 317 |
-
<div>
|
| 318 |
-
<p class="text-sm font-semibold text-slate-300">Drag & drop your file here</p>
|
| 319 |
-
<p class="text-xs text-slate-500 mt-1">or click to browse local files</p>
|
| 320 |
-
</div>
|
| 321 |
-
<p class="text-[10px] text-slate-600">Supports PNG, JPG, JPEG, and MP4 formats</p>
|
| 322 |
-
</div>
|
| 323 |
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
|
|
|
| 332 |
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
<!-- Empty Awaiting State -->
|
| 340 |
-
<div id="output-empty" class="space-y-3 text-slate-500">
|
| 341 |
-
<div class="inline-flex h-12 w-12 rounded-full bg-white/5 items-center justify-center">
|
| 342 |
-
🧠
|
| 343 |
-
</div>
|
| 344 |
-
<p class="text-sm font-semibold">Awaiting Execution</p>
|
| 345 |
-
<p class="text-xs text-slate-600 max-w-[200px] mx-auto">Configure settings and click Run Inference to compute results.</p>
|
| 346 |
-
</div>
|
| 347 |
|
| 348 |
-
|
| 349 |
-
<img id="output-image" src="" alt="Detection Output" class="hidden max-h-[320px] max-w-full rounded-xl object-contain shadow-lg border border-white/10">
|
| 350 |
-
<video id="output-video" src="" controls class="hidden max-h-[320px] max-w-full rounded-xl shadow-lg border border-white/10"></video>
|
| 351 |
-
|
| 352 |
-
<!-- Processing Overlay state -->
|
| 353 |
-
<div id="processing-overlay" class="absolute inset-0 bg-dark-400/80 backdrop-filter blur-sm hidden flex-col items-center justify-center gap-4">
|
| 354 |
-
<div class="flex gap-2">
|
| 355 |
-
<span class="dot-pulse inline-block h-3.5 w-3.5 rounded-full bg-emerald-500" style="animation-delay: 0s;"></span>
|
| 356 |
-
<span class="dot-pulse inline-block h-3.5 w-3.5 rounded-full bg-emerald-400" style="animation-delay: 0.2s;"></span>
|
| 357 |
-
<span class="dot-pulse inline-block h-3.5 w-3.5 rounded-full bg-emerald-300" style="animation-delay: 0.4s;"></span>
|
| 358 |
-
</div>
|
| 359 |
-
<div class="text-center">
|
| 360 |
-
<p id="processing-status" class="text-sm font-semibold tracking-wide text-slate-200">Executing Model...</p>
|
| 361 |
-
<p class="text-[10px] text-slate-500 mt-1">Gradio Queuing / Concurrency Engine active</p>
|
| 362 |
-
</div>
|
| 363 |
-
</div>
|
| 364 |
-
</div>
|
| 365 |
-
</div>
|
| 366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
</div>
|
| 368 |
-
</div>
|
| 369 |
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
<!-- Example Card 1 -->
|
| 376 |
-
<div class="example-card glass-panel glass-panel-interactive rounded-xl p-3 cursor-pointer space-y-2 group" data-type="Image" data-name="Book" data-category="book" data-task="Detection" data-mode="hybrid" data-asset="/assets/book.jpg">
|
| 377 |
-
<div class="h-24 w-full rounded-lg bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-300" style="background-image: url('/assets/book.jpg');"></div>
|
| 378 |
-
<div class="flex justify-between items-center px-1">
|
| 379 |
-
<span class="text-xs font-semibold text-slate-200">Book</span>
|
| 380 |
-
<span class="text-[9px] px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-500 font-semibold border border-brand-500/10">Image</span>
|
| 381 |
-
</div>
|
| 382 |
</div>
|
|
|
|
|
|
|
| 383 |
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
<
|
| 388 |
-
|
| 389 |
-
<span class="text-[9px] px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-500 font-semibold border border-brand-500/10">Image</span>
|
| 390 |
-
</div>
|
| 391 |
</div>
|
|
|
|
|
|
|
| 392 |
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
<
|
| 397 |
-
|
| 398 |
-
<span class="text-[9px] px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-500 font-semibold border border-brand-500/10">Image</span>
|
| 399 |
-
</div>
|
| 400 |
</div>
|
|
|
|
|
|
|
| 401 |
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
<div class="h-24 w-full rounded-lg bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-300" style="background-image: url('/assets/ocr.jpg');"></div>
|
| 405 |
-
<div class="flex justify-between items-center px-1">
|
| 406 |
-
<span class="text-xs font-semibold text-slate-200">OCR Text</span>
|
| 407 |
-
<span class="text-[9px] px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-500 font-semibold border border-brand-500/10">OCR</span>
|
| 408 |
-
</div>
|
| 409 |
-
</div>
|
| 410 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
</div>
|
| 412 |
</div>
|
| 413 |
|
| 414 |
-
<!--
|
| 415 |
-
<div class="glass-panel rounded-
|
| 416 |
-
<
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
</
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 424 |
-
|
| 425 |
-
<!-- Left Console Section: Metadata Stats -->
|
| 426 |
-
<div class="bg-dark-400 rounded-2xl p-5 border border-white/5 font-mono text-xs text-slate-400 space-y-3 leading-relaxed">
|
| 427 |
-
<div class="text-emerald-400 font-bold border-b border-white/5 pb-2 mb-2 uppercase tracking-widest text-[10px]">📊 Metrics Log</div>
|
| 428 |
-
<div class="flex justify-between"><span class="text-slate-500">Inference Status:</span> <span id="meta-status" class="text-emerald-500 font-semibold">Idle</span></div>
|
| 429 |
-
<div class="flex justify-between"><span class="text-slate-500">Decoded Token Count:</span> <span id="meta-tokens">-</span></div>
|
| 430 |
-
<div class="flex justify-between"><span class="text-slate-500">Bounding Box Detections:</span> <span id="meta-boxes">-</span></div>
|
| 431 |
-
<div class="flex justify-between"><span class="text-slate-500">Speed (Tokens/s):</span> <span id="meta-tps">-</span></div>
|
| 432 |
-
<div class="flex justify-between"><span class="text-slate-500">Speed (Boxes/s):</span> <span id="meta-bps">-</span></div>
|
| 433 |
-
<div class="flex justify-between"><span class="text-slate-500">Processing Time:</span> <span id="meta-time">-</span></div>
|
| 434 |
-
</div>
|
| 435 |
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
</div>
|
| 445 |
-
</div>
|
| 446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
</div>
|
|
|
|
| 448 |
|
| 449 |
-
|
| 450 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 451 |
</div>
|
| 452 |
|
| 453 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
|
| 455 |
-
</div>
|
| 456 |
</main>
|
| 457 |
|
| 458 |
<!-- Gradio client connection & app runtime logic -->
|
|
@@ -470,6 +582,7 @@
|
|
| 470 |
const videoFramesWrapper = document.getElementById("video-frames-wrapper");
|
| 471 |
const taskTypeSelect = document.getElementById("task-type");
|
| 472 |
const categoriesInput = document.getElementById("categories");
|
|
|
|
| 473 |
const inferenceModeSelect = document.getElementById("inference-mode");
|
| 474 |
const rawPromptPreview = document.getElementById("raw-prompt-preview");
|
| 475 |
|
|
@@ -535,6 +648,13 @@
|
|
| 535 |
topkSlider.addEventListener("input", (e) => topkVal.textContent = e.target.value);
|
| 536 |
maxFramesSlider.addEventListener("input", (e) => maxFramesVal.textContent = e.target.value);
|
| 537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 538 |
// Trigger prompt generation updates
|
| 539 |
const triggerPromptUpdate = () => {
|
| 540 |
const task = taskTypeSelect.value;
|
|
@@ -566,19 +686,25 @@
|
|
| 566 |
}
|
| 567 |
}
|
| 568 |
|
| 569 |
-
// Switch workspace input styles
|
| 570 |
function setMediaType(type) {
|
| 571 |
selectedMediaType = type;
|
| 572 |
if (type === "Image") {
|
| 573 |
-
mediaTypeImageBtn.className = "py-2
|
| 574 |
-
mediaTypeVideoBtn.className = "py-2
|
| 575 |
videoFramesWrapper.classList.add("hidden");
|
|
|
|
|
|
|
|
|
|
| 576 |
fileInput.accept = "image/*";
|
| 577 |
workspaceStatus.textContent = activeFile ? "Image Loaded" : "No Media Loaded";
|
| 578 |
} else {
|
| 579 |
-
mediaTypeVideoBtn.className = "py-2
|
| 580 |
-
mediaTypeImageBtn.className = "py-2
|
| 581 |
videoFramesWrapper.classList.remove("hidden");
|
|
|
|
|
|
|
|
|
|
| 582 |
fileInput.accept = "video/*";
|
| 583 |
workspaceStatus.textContent = activeFile ? "Video Loaded" : "No Media Loaded";
|
| 584 |
}
|
|
@@ -813,7 +939,7 @@
|
|
| 813 |
detectionTagsWrapper.innerHTML = "";
|
| 814 |
detections.forEach(det => {
|
| 815 |
const tag = document.createElement("span");
|
| 816 |
-
tag.className = "px-2 py-1 rounded bg-
|
| 817 |
tag.textContent = det.frame ? `[Frame ${det.frame}] ${det.label}` : det.label;
|
| 818 |
detectionTagsWrapper.appendChild(tag);
|
| 819 |
});
|
|
@@ -857,6 +983,14 @@
|
|
| 857 |
});
|
| 858 |
runBtn.addEventListener("click", executeInference);
|
| 859 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 860 |
setupLiveUpdaters();
|
| 861 |
setupDragDrop();
|
| 862 |
setupExamples();
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NVIDIA LocateAnything - Fast Vision-Language Grounding with Parallel Box Decoding</title>
|
| 7 |
|
| 8 |
<!-- Premium Google Fonts -->
|
| 9 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800;900&family=Fira+Code:wght@400;500&display=swap" rel="stylesheet">
|
| 12 |
|
| 13 |
+
<!-- Tailwind CSS CDN -->
|
| 14 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 15 |
|
| 16 |
<script>
|
|
|
|
| 23 |
mono: ['Fira Code', 'monospace'],
|
| 24 |
},
|
| 25 |
colors: {
|
| 26 |
+
nvidia: {
|
| 27 |
+
light: '#76b900',
|
| 28 |
+
brand: '#76b900',
|
| 29 |
+
dark: '#5c9000',
|
| 30 |
+
hover: '#87d300',
|
|
|
|
|
|
|
| 31 |
},
|
| 32 |
dark: {
|
| 33 |
+
50: '#222222',
|
| 34 |
+
100: '#1a1a1a',
|
| 35 |
+
200: '#121212',
|
| 36 |
+
300: '#0a0a0a',
|
| 37 |
+
400: '#050505',
|
| 38 |
}
|
| 39 |
}
|
| 40 |
}
|
|
|
|
| 43 |
</script>
|
| 44 |
|
| 45 |
<style>
|
|
|
|
| 46 |
body {
|
| 47 |
+
background-color: #050505;
|
| 48 |
background-image:
|
| 49 |
+
radial-gradient(circle at 10% 20%, rgba(118, 185, 0, 0.08) 0%, transparent 45%),
|
| 50 |
+
radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 45%);
|
| 51 |
background-attachment: fixed;
|
| 52 |
}
|
| 53 |
|
| 54 |
+
/* NVIDIA-style Carbon Triangle Grid Pattern */
|
| 55 |
+
.carbon-grid {
|
| 56 |
+
background-image:
|
| 57 |
+
linear-gradient(30deg, #0f0f0f 12%, transparent 12.5%, transparent 87%, #0f0f0f 87.5%, #0f0f0f),
|
| 58 |
+
linear-gradient(150deg, #0f0f0f 12%, transparent 12.5%, transparent 87%, #0f0f0f 87.5%, #0f0f0f),
|
| 59 |
+
linear-gradient(30deg, #0f0f0f 12%, transparent 12.5%, transparent 87%, #0f0f0f 87.5%, #0f0f0f),
|
| 60 |
+
linear-gradient(150deg, #0f0f0f 12%, transparent 12.5%, transparent 87%, #0f0f0f 87.5%, #0f0f0f),
|
| 61 |
+
linear-gradient(60deg, #171717 25%, transparent 25.5%, transparent 75%, #171717 75.5%, #171717),
|
| 62 |
+
linear-gradient(60deg, #171717 25%, transparent 25.5%, transparent 75%, #171717 75.5%, #171717);
|
| 63 |
+
background-size: 80px 140px;
|
| 64 |
+
background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* Glassmorphism Styles */
|
| 68 |
.glass-panel {
|
| 69 |
+
background: rgba(18, 18, 18, 0.65);
|
| 70 |
+
backdrop-filter: blur(20px);
|
| 71 |
+
-webkit-backdrop-filter: blur(20px);
|
| 72 |
+
border: 1px solid rgba(255, 255, 255, 0.04);
|
| 73 |
+
box-shadow: 0 24px 64px 0 rgba(0, 0, 0, 0.7);
|
| 74 |
}
|
| 75 |
|
| 76 |
.glass-panel-interactive {
|
| 77 |
+
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
| 78 |
}
|
| 79 |
.glass-panel-interactive:hover {
|
| 80 |
+
border-color: rgba(118, 185, 0, 0.25);
|
| 81 |
+
box-shadow: 0 30px 80px 0 rgba(118, 185, 0, 0.08);
|
| 82 |
transform: translateY(-2px);
|
| 83 |
}
|
| 84 |
|
| 85 |
+
/* SAM 3 Style Glassmorphic Float Input */
|
| 86 |
+
.sam-input-bar {
|
| 87 |
+
background: rgba(255, 255, 255, 0.06);
|
| 88 |
+
backdrop-filter: blur(25px);
|
| 89 |
+
-webkit-backdrop-filter: blur(25px);
|
| 90 |
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 91 |
+
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
|
| 92 |
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
| 93 |
+
}
|
| 94 |
+
.sam-input-bar:focus-within {
|
| 95 |
+
background: rgba(255, 255, 255, 0.09);
|
| 96 |
+
border-color: rgba(118, 185, 0, 0.6);
|
| 97 |
+
box-shadow: 0 20px 48px rgba(118, 185, 0, 0.15);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
/* Hexagonal Glowing Border for Media Workspace (NVIDIA GTC Keynote Style) */
|
| 101 |
+
.gtc-polygon-wrapper {
|
| 102 |
position: relative;
|
| 103 |
+
background: #0f1218;
|
| 104 |
+
border: 1px solid rgba(118, 185, 0, 0.15);
|
| 105 |
+
box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
|
| 106 |
overflow: hidden;
|
| 107 |
+
clip-path: polygon(8% 0%, 100% 0%, 100% 92%, 92% 100%, 0% 100%, 0% 8%);
|
| 108 |
+
}
|
| 109 |
+
.gtc-polygon-wrapper::before {
|
| 110 |
+
content: '';
|
| 111 |
+
position: absolute;
|
| 112 |
+
top: 0;
|
| 113 |
+
left: 0;
|
| 114 |
+
width: 100%;
|
| 115 |
+
height: 100%;
|
| 116 |
+
border: 2px solid #76b900;
|
| 117 |
+
pointer-events: none;
|
| 118 |
+
clip-path: polygon(8% 0%, 100% 0%, 100% 92%, 92% 100%, 0% 100%, 0% 8%);
|
| 119 |
+
opacity: 0.8;
|
| 120 |
+
box-shadow: inset 0 0 20px rgba(118, 185, 0, 0.3);
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.gtc-neon-border {
|
| 124 |
+
position: absolute;
|
| 125 |
+
top: -2px;
|
| 126 |
+
left: -2px;
|
| 127 |
+
right: -2px;
|
| 128 |
+
bottom: -2px;
|
| 129 |
+
background: linear-gradient(135deg, #76b900, #3f6200, #76b900);
|
| 130 |
+
z-index: 0;
|
| 131 |
+
pointer-events: none;
|
| 132 |
+
opacity: 0.95;
|
| 133 |
+
clip-path: polygon(8% 0%, 100% 0%, 100% 92%, 92% 100%, 0% 100%, 0% 8%);
|
| 134 |
}
|
| 135 |
+
|
| 136 |
+
.gtc-inner-box {
|
| 137 |
+
position: relative;
|
| 138 |
+
background: #080a0e;
|
| 139 |
+
z-index: 10;
|
| 140 |
+
height: 100%;
|
| 141 |
+
clip-path: polygon(8.1% 0.1%, 99.9% 0.1%, 99.9% 91.9%, 91.9% 99.9%, 0.1% 99.9%, 0.1% 8.1%);
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
/* Pill Buttons styling */
|
| 145 |
+
.pill-btn-green {
|
| 146 |
+
background-color: #76b900;
|
| 147 |
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
| 148 |
+
}
|
| 149 |
+
.pill-btn-green:hover {
|
| 150 |
+
background-color: #87d300;
|
| 151 |
+
box-shadow: 0 0 24px rgba(118, 185, 0, 0.45);
|
| 152 |
transform: translateY(-1px);
|
| 153 |
}
|
| 154 |
+
.pill-btn-green:active {
|
| 155 |
transform: translateY(1px);
|
| 156 |
}
|
| 157 |
|
| 158 |
+
.pill-btn-outline {
|
| 159 |
+
background-color: transparent;
|
| 160 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 161 |
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
| 162 |
+
}
|
| 163 |
+
.pill-btn-outline:hover {
|
| 164 |
+
background-color: rgba(255, 255, 255, 0.08);
|
| 165 |
+
border-color: rgba(255, 255, 255, 0.4);
|
| 166 |
+
transform: translateY(-1px);
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
/* Custom Scrollbar */
|
| 170 |
::-webkit-scrollbar {
|
| 171 |
+
width: 6px;
|
| 172 |
+
height: 6px;
|
| 173 |
}
|
| 174 |
::-webkit-scrollbar-track {
|
| 175 |
+
background: #0a0a0a;
|
| 176 |
}
|
| 177 |
::-webkit-scrollbar-thumb {
|
| 178 |
+
background: #222;
|
| 179 |
+
border-radius: 3px;
|
| 180 |
}
|
| 181 |
::-webkit-scrollbar-thumb:hover {
|
| 182 |
+
background: #333;
|
| 183 |
}
|
| 184 |
|
| 185 |
+
/* Pulse loaders */
|
| 186 |
.dot-pulse {
|
| 187 |
+
animation: pulse 1.4s infinite ease-in-out;
|
| 188 |
}
|
| 189 |
@keyframes pulse {
|
| 190 |
0%, 100% { opacity: 0.3; transform: scale(0.9); }
|
| 191 |
50% { opacity: 1; transform: scale(1.1); }
|
| 192 |
}
|
| 193 |
|
|
|
|
| 194 |
.drop-zone-active {
|
| 195 |
+
border-color: #76b900 !important;
|
| 196 |
+
background: rgba(118, 185, 0, 0.04) !important;
|
| 197 |
}
|
| 198 |
</style>
|
| 199 |
</head>
|
| 200 |
+
<body class="text-slate-100 font-sans min-h-screen pb-16 carbon-grid">
|
| 201 |
+
|
| 202 |
+
<!-- NVIDIA Brand Navigation Header -->
|
| 203 |
+
<nav class="bg-white/95 backdrop-blur-md sticky top-0 z-50 px-6 py-3.5 border-b border-slate-200/90 shadow-sm flex items-center justify-between">
|
| 204 |
+
<div class="max-w-7xl w-full mx-auto flex items-center justify-between">
|
| 205 |
+
<div class="flex items-center gap-8">
|
| 206 |
+
<!-- Official Styled NVIDIA Brand Text Logo -->
|
| 207 |
+
<a href="#" class="flex items-center gap-1.5 select-none group">
|
| 208 |
+
<svg class="h-6 w-6 text-nvidia-brand transition-transform duration-500 group-hover:rotate-180" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
| 209 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
| 210 |
+
</svg>
|
| 211 |
+
<span class="font-outfit text-[22px] font-black tracking-tighter text-slate-900">
|
| 212 |
+
NVIDIA <span class="font-light tracking-wide text-slate-500">LocateAnything</span>
|
| 213 |
+
</span>
|
| 214 |
+
</a>
|
| 215 |
+
|
| 216 |
+
<!-- Main Header Links -->
|
| 217 |
+
<div class="hidden lg:flex items-center gap-6 text-sm font-semibold text-slate-600">
|
| 218 |
+
<a href="https://huggingface.co/nvidia/LocateAnything-3B" target="_blank" class="hover:text-nvidia-brand transition-colors">Model Card</a>
|
| 219 |
+
<a href="https://arxiv.org/abs/2605.27365" target="_blank" class="hover:text-nvidia-brand transition-colors">arXiv Paper</a>
|
| 220 |
+
<a href="https://github.com/NVlabs/Eagle/tree/main/Embodied" target="_blank" class="hover:text-nvidia-brand transition-colors">GitHub Repository</a>
|
| 221 |
</div>
|
| 222 |
</div>
|
| 223 |
+
|
| 224 |
+
<div class="flex items-center gap-4">
|
| 225 |
+
<span class="hidden md:inline-flex px-3 py-1 text-xs font-semibold rounded bg-emerald-500/10 text-nvidia-brand border border-nvidia-brand/20 items-center gap-1.5">
|
| 226 |
+
<span class="h-1.5 w-1.5 rounded-full bg-nvidia-brand animate-pulse"></span>
|
| 227 |
+
Parallel Box Decoding Active
|
|
|
|
|
|
|
| 228 |
</span>
|
| 229 |
+
<a href="https://huggingface.co/spaces/akhaliq/LocateAnything" class="px-4 py-1.5 rounded bg-slate-900 hover:bg-slate-800 text-white font-semibold text-xs tracking-wider uppercase transition-all">
|
| 230 |
+
HF Space
|
| 231 |
+
</a>
|
| 232 |
</div>
|
| 233 |
</div>
|
| 234 |
+
</nav>
|
| 235 |
|
| 236 |
+
<!-- MAIN GRID CONTAINER -->
|
| 237 |
+
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 lg:pt-14 space-y-12">
|
| 238 |
|
| 239 |
+
<!-- HERO / KEYNOTE INTERACTIVE HEADER SECTION (GTC Taipei + SAM 3 overlay) -->
|
| 240 |
+
<section class="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-center">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
|
| 242 |
+
<!-- Left Info Panel (Col Span: 6) -->
|
| 243 |
+
<div class="lg:col-span-6 space-y-6 lg:space-y-8">
|
| 244 |
+
<div class="space-y-2">
|
| 245 |
+
<span class="text-sm font-black font-outfit text-nvidia-brand tracking-widest uppercase block">NVIDIA RESEARCH AT GTC</span>
|
| 246 |
+
<h2 class="text-4xl sm:text-5xl lg:text-[54px] font-black font-outfit text-white leading-[1.08] tracking-tight">
|
| 247 |
+
Locate Anything in Images & Videos in Parallel
|
| 248 |
+
</h2>
|
| 249 |
+
</div>
|
| 250 |
|
| 251 |
+
<p class="text-slate-300 text-sm sm:text-base leading-relaxed font-light">
|
| 252 |
+
LocateAnything is a state-of-the-art 3B vision-language model designed for rapid visual grounding. Powered by Qwen2.5 and NVIDIA's Parallel Box Decoding (PBD), it predicts bounding boxes and coordinates in a single parallel step, delivering up to <strong class="text-nvidia-brand font-semibold">2.5× higher throughput</strong> than conventional autoregressive models.
|
| 253 |
+
</p>
|
| 254 |
+
|
| 255 |
+
<!-- Floating Glassmorphic Search Bar (SAM 3 Input Style) -->
|
| 256 |
+
<div class="space-y-2">
|
| 257 |
+
<label class="text-[10px] font-bold text-slate-400 uppercase tracking-widest block">Describe target objects to locate:</label>
|
| 258 |
+
<div class="sam-input-bar rounded-full px-5 py-4 flex items-center gap-3">
|
| 259 |
+
<svg class="h-5 w-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
| 260 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
| 261 |
</svg>
|
| 262 |
+
<input type="text" id="categories" value="car, bus, person, potted plant" placeholder="Describe objects to locate (e.g. car, person, dog)..." class="bg-transparent border-none outline-none focus:outline-none w-full text-slate-100 placeholder-slate-500 font-medium text-sm sm:text-base">
|
| 263 |
+
<button id="clear-search-btn" class="text-slate-400 hover:text-white transition-colors p-1 rounded-full hover:bg-white/5">
|
| 264 |
+
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
| 265 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
| 266 |
+
</svg>
|
| 267 |
+
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
</div>
|
| 269 |
+
</div>
|
| 270 |
|
| 271 |
+
<!-- Call to Action Buttons -->
|
| 272 |
+
<div class="flex flex-wrap gap-4 pt-2">
|
| 273 |
+
<button id="run-btn" class="pill-btn-green py-3 px-8 rounded-full text-black font-extrabold text-sm flex items-center justify-center gap-2 select-none">
|
| 274 |
+
<span id="btn-icon">🧠</span>
|
| 275 |
+
<span id="btn-text">Run Inference</span>
|
| 276 |
+
</button>
|
| 277 |
+
<a href="https://research.nvidia.com/labs/lpr/locate-anything/LocateAnything.pdf" target="_blank" class="pill-btn-outline py-3 px-8 rounded-full text-white font-bold text-sm flex items-center justify-center select-none">
|
| 278 |
+
Read Tech Report ↗
|
| 279 |
+
</a>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
|
| 283 |
+
<!-- Right Visual Workspace inside GTC Glowing Polygon Frame (Col Span: 6) -->
|
| 284 |
+
<div class="lg:col-span-6 flex flex-col justify-center">
|
| 285 |
+
|
| 286 |
+
<div class="gtc-polygon-wrapper w-full aspect-video min-h-[340px] sm:min-h-[400px]">
|
| 287 |
+
<div class="gtc-neon-border"></div>
|
| 288 |
+
<div class="gtc-inner-box p-4 flex flex-col">
|
| 289 |
+
|
| 290 |
+
<!-- Header row of Workspace inside Hexagon -->
|
| 291 |
+
<div class="flex justify-between items-center border-b border-white/5 pb-3.5 mb-4 z-20">
|
| 292 |
+
<span class="text-xs font-bold font-mono text-nvidia-brand uppercase tracking-widest flex items-center gap-2">
|
| 293 |
+
<span class="h-2 w-2 rounded-full bg-nvidia-brand animate-ping"></span>
|
| 294 |
+
Media Workspace
|
| 295 |
+
</span>
|
| 296 |
+
<span id="workspace-status" class="text-[10px] text-slate-500 font-mono">No Media Loaded</span>
|
| 297 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
+
<!-- Dynamic Canvas Box Inside Polygon Frame -->
|
| 300 |
+
<div class="flex-1 relative flex items-center justify-center overflow-hidden min-h-0 z-20">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
|
| 302 |
+
<!-- Input Media Upload Zone (Initially shown if no media loaded) -->
|
| 303 |
+
<div id="drop-zone" class="absolute inset-0 border border-dashed border-white/10 hover:border-nvidia-brand/40 rounded-xl bg-black/60 flex flex-col items-center justify-center p-4 text-center cursor-pointer transition-all">
|
| 304 |
+
<div id="upload-prompt" class="space-y-3">
|
| 305 |
+
<div class="inline-flex h-11 w-11 rounded-full bg-white/5 items-center justify-center text-slate-400">
|
| 306 |
+
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.2">
|
| 307 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
|
| 308 |
+
</svg>
|
| 309 |
+
</div>
|
| 310 |
+
<div>
|
| 311 |
+
<p class="text-xs font-bold text-slate-200">Drag & drop your file here</p>
|
| 312 |
+
<p class="text-[10px] text-slate-500 mt-1">or click to browse local folders</p>
|
| 313 |
+
</div>
|
| 314 |
+
<p class="text-[9px] text-slate-600">Supports PNG, JPG, JPEG, and MP4 formats</p>
|
| 315 |
</div>
|
|
|
|
|
|
|
| 316 |
|
| 317 |
+
<!-- Dynamic Preview Media Rendering inside Hexagon Frame -->
|
| 318 |
+
<img id="preview-image" src="" alt="Input Preview" class="hidden max-h-full max-w-full rounded-lg object-contain shadow-lg">
|
| 319 |
+
<video id="preview-video" src="" controls class="hidden max-h-full max-w-full rounded-lg shadow-lg"></video>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
|
| 321 |
+
<!-- File Upload Trigger -->
|
| 322 |
+
<input type="file" id="media-file-input" accept="image/*,video/*" class="absolute inset-0 opacity-0 cursor-pointer">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
</div>
|
| 324 |
|
| 325 |
+
<!-- Inference Output Zone (Takes over when result loaded) -->
|
| 326 |
+
<div class="absolute inset-0 pointer-events-none flex items-center justify-center">
|
| 327 |
+
<img id="output-image" src="" alt="Inference Output" class="hidden max-h-full max-w-full rounded-lg object-contain shadow-lg pointer-events-auto">
|
| 328 |
+
<video id="output-video" src="" controls class="hidden max-h-full max-w-full rounded-lg shadow-lg pointer-events-auto"></video>
|
| 329 |
</div>
|
| 330 |
|
| 331 |
+
<!-- Processing Overlays -->
|
| 332 |
+
<div id="processing-overlay" class="absolute inset-0 bg-black/85 backdrop-blur-sm hidden flex-col items-center justify-center gap-4 z-50">
|
| 333 |
+
<div class="flex gap-1.5">
|
| 334 |
+
<span class="dot-pulse inline-block h-3 w-3 rounded-full bg-nvidia-brand" style="animation-delay: 0s;"></span>
|
| 335 |
+
<span class="dot-pulse inline-block h-3 w-3 rounded-full bg-emerald-400" style="animation-delay: 0.2s;"></span>
|
| 336 |
+
<span class="dot-pulse inline-block h-3 w-3 rounded-full bg-emerald-300" style="animation-delay: 0.4s;"></span>
|
| 337 |
+
</div>
|
| 338 |
+
<div class="text-center space-y-1">
|
| 339 |
+
<p id="processing-status" class="text-xs font-bold tracking-widest text-slate-200 uppercase">Executing Model...</p>
|
| 340 |
+
<p class="text-[9px] text-slate-500 uppercase tracking-wider font-mono">FastAPI Queuing Engine Active</p>
|
| 341 |
</div>
|
|
|
|
|
|
|
| 342 |
</div>
|
| 343 |
|
| 344 |
</div>
|
|
|
|
| 345 |
|
| 346 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
</div>
|
| 348 |
|
| 349 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
|
| 351 |
+
</section>
|
| 352 |
|
| 353 |
+
<!-- CONFIGURATION & CONTROLS ACCORDION -->
|
| 354 |
+
<section class="glass-panel rounded-2xl p-6 sm:p-8 space-y-6">
|
| 355 |
+
|
| 356 |
+
<div class="flex justify-between items-center border-b border-white/5 pb-4">
|
| 357 |
+
<h3 class="text-base font-black font-outfit text-white uppercase tracking-wider flex items-center gap-2">
|
| 358 |
+
<svg class="h-4 w-4 text-nvidia-brand" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 359 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
| 360 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
| 361 |
+
</svg>
|
| 362 |
+
Model Parameters Setup
|
| 363 |
+
</h3>
|
| 364 |
+
<span class="text-[10px] text-slate-500 uppercase tracking-widest font-mono">Fine-Tune Inference Config</span>
|
| 365 |
+
</div>
|
| 366 |
+
|
| 367 |
+
<!-- Parameters Grid -->
|
| 368 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
| 369 |
|
| 370 |
+
<!-- Media Type toggle selection -->
|
| 371 |
+
<div class="space-y-2">
|
| 372 |
+
<label class="text-[10px] font-bold text-slate-400 uppercase tracking-widest">1. Media Mode</label>
|
| 373 |
+
<div class="grid grid-cols-2 gap-1.5 bg-black/40 p-1 rounded-xl border border-white/5 text-center">
|
| 374 |
+
<button id="media-type-image" class="py-2 rounded-lg font-semibold text-xs transition-all bg-nvidia-brand text-black font-extrabold shadow shadow-nvidia-brand/10">
|
| 375 |
+
Image
|
| 376 |
+
</button>
|
| 377 |
+
<button id="media-type-video" class="py-2 rounded-lg font-semibold text-xs text-slate-400 hover:text-slate-200 transition-all">
|
| 378 |
+
Video
|
| 379 |
+
</button>
|
|
|
|
| 380 |
</div>
|
| 381 |
+
</div>
|
| 382 |
|
| 383 |
+
<!-- Task Selector -->
|
| 384 |
+
<div class="space-y-2">
|
| 385 |
+
<label for="task-type" class="text-[10px] font-bold text-slate-400 uppercase tracking-widest">2. Task Type</label>
|
| 386 |
+
<select id="task-type" class="w-full bg-black/40 border border-white/5 rounded-xl px-3 py-2 text-xs focus:border-nvidia-brand focus:outline-none transition-all text-slate-200">
|
| 387 |
+
<option value="Detection">Detection - Locate all matched objects</option>
|
| 388 |
+
<option value="Grounding">Grounding - Match specific expression</option>
|
| 389 |
+
<option value="OCR">OCR - Extract all text coordinate boxes</option>
|
| 390 |
+
<option value="GUI">GUI - Ground user interface targets</option>
|
| 391 |
+
<option value="Pointing">Pointing - Extract point coordinates</option>
|
| 392 |
+
</select>
|
| 393 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
|
| 395 |
+
<!-- Inference Mode Selection -->
|
| 396 |
+
<div class="space-y-2">
|
| 397 |
+
<label for="inference-mode" class="text-[10px] font-bold text-slate-400 uppercase tracking-widest">3. Inference Mode</label>
|
| 398 |
+
<select id="inference-mode" class="w-full bg-black/40 border border-white/5 rounded-xl px-3 py-2 text-xs focus:border-nvidia-brand focus:outline-none transition-all text-slate-200">
|
| 399 |
+
<option value="hybrid">Hybrid - Balance Speed & Quality (PBD+AR)</option>
|
| 400 |
+
<option value="fast">Fast - Maximize Speed (PBD Parallel only)</option>
|
| 401 |
+
<option value="slow">Slow - Maximize Accuracy (AR Sequential only)</option>
|
| 402 |
+
</select>
|
| 403 |
+
</div>
|
| 404 |
|
| 405 |
+
<!-- Short side resize cap -->
|
| 406 |
+
<div class="space-y-2">
|
| 407 |
+
<label for="short-size" class="text-[10px] font-bold text-slate-400 uppercase tracking-widest">4. Resize Cap (px)</label>
|
| 408 |
+
<input type="number" id="short-size" placeholder="Auto-Cap (1024)" class="w-full bg-black/40 border border-white/5 rounded-xl px-3 py-2 text-xs focus:border-nvidia-brand focus:outline-none transition-all text-slate-200 font-mono">
|
| 409 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 410 |
|
| 411 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
|
| 413 |
+
<!-- Advanced parameter sliders (Collapsible details) -->
|
| 414 |
+
<details class="group border-t border-white/5 pt-4">
|
| 415 |
+
<summary class="list-none flex justify-between items-center cursor-pointer select-none text-[11px] font-bold text-slate-400 tracking-wider uppercase hover:text-slate-200 transition-colors">
|
| 416 |
+
<span class="flex items-center gap-1.5">
|
| 417 |
+
⚙️ Advanced Generation Sliders
|
| 418 |
+
</span>
|
| 419 |
+
<svg class="h-4 w-4 transform group-open:rotate-180 transition-transform text-slate-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 420 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
|
| 421 |
+
</svg>
|
| 422 |
+
</summary>
|
| 423 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 pt-5">
|
| 424 |
+
|
| 425 |
+
<!-- Temp -->
|
| 426 |
+
<div class="space-y-2">
|
| 427 |
+
<div class="flex justify-between text-[10px] uppercase font-bold text-slate-400 tracking-wider">
|
| 428 |
+
<span>Temperature</span>
|
| 429 |
+
<span id="temp-val" class="font-mono text-nvidia-brand">0.7</span>
|
| 430 |
+
</div>
|
| 431 |
+
<input type="range" id="temp" min="0.1" max="2.0" step="0.1" value="0.7" class="w-full h-1 bg-black rounded-lg appearance-none cursor-pointer accent-nvidia-brand">
|
| 432 |
</div>
|
|
|
|
| 433 |
|
| 434 |
+
<!-- Top P -->
|
| 435 |
+
<div class="space-y-2">
|
| 436 |
+
<div class="flex justify-between text-[10px] uppercase font-bold text-slate-400 tracking-wider">
|
| 437 |
+
<span>Top P</span>
|
| 438 |
+
<span id="topp-val" class="font-mono text-nvidia-brand">0.9</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
</div>
|
| 440 |
+
<input type="range" id="topp" min="0.05" max="1.0" step="0.05" value="0.9" class="w-full h-1 bg-black rounded-lg appearance-none cursor-pointer accent-nvidia-brand">
|
| 441 |
+
</div>
|
| 442 |
|
| 443 |
+
<!-- Top K -->
|
| 444 |
+
<div class="space-y-2">
|
| 445 |
+
<div class="flex justify-between text-[10px] uppercase font-bold text-slate-400 tracking-wider">
|
| 446 |
+
<span>Top K</span>
|
| 447 |
+
<span id="topk-val" class="font-mono text-nvidia-brand">20</span>
|
|
|
|
|
|
|
| 448 |
</div>
|
| 449 |
+
<input type="range" id="topk" min="1" max="100" step="1" value="20" class="w-full h-1 bg-black rounded-lg appearance-none cursor-pointer accent-nvidia-brand">
|
| 450 |
+
</div>
|
| 451 |
|
| 452 |
+
<!-- Video Frames (Only displayed for Video mode) -->
|
| 453 |
+
<div id="video-frames-wrapper" class="space-y-2 opacity-50 pointer-events-none transition-opacity duration-300">
|
| 454 |
+
<div class="flex justify-between text-[10px] uppercase font-bold text-slate-400 tracking-wider">
|
| 455 |
+
<span>Max Video Frames</span>
|
| 456 |
+
<span id="frames-val" class="font-mono text-nvidia-brand">4</span>
|
|
|
|
|
|
|
| 457 |
</div>
|
| 458 |
+
<input type="range" id="max-frames" min="1" max="10" step="1" value="4" class="w-full h-1 bg-black rounded-lg appearance-none cursor-pointer accent-nvidia-brand" disabled>
|
| 459 |
+
</div>
|
| 460 |
|
| 461 |
+
</div>
|
| 462 |
+
</details>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
|
| 464 |
+
<!-- Text Prompt logs -->
|
| 465 |
+
<div class="bg-black/50 border border-white/5 rounded-xl p-3.5 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3">
|
| 466 |
+
<div class="space-y-1">
|
| 467 |
+
<span class="text-[9px] font-bold text-slate-500 uppercase tracking-widest block">System Formulated Text Prompt:</span>
|
| 468 |
+
<p id="raw-prompt-preview" class="text-xs text-slate-300 font-mono break-all leading-normal"></p>
|
| 469 |
+
</div>
|
| 470 |
+
<div class="text-[10px] text-slate-500 font-mono shrink-0 select-none">Auto-compiled from model settings</div>
|
| 471 |
+
</div>
|
| 472 |
+
|
| 473 |
+
</section>
|
| 474 |
+
|
| 475 |
+
<!-- PRELOADED EXAMPLES LIBRARY (Meta SAM 3 Grid Style) -->
|
| 476 |
+
<section class="space-y-6">
|
| 477 |
+
<div class="flex justify-between items-center border-b border-white/5 pb-3">
|
| 478 |
+
<h3 class="text-base font-black font-outfit text-white uppercase tracking-wider flex items-center gap-2">
|
| 479 |
+
<svg class="h-4.5 w-4.5 text-nvidia-brand" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 480 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 00-2 2z" />
|
| 481 |
+
</svg>
|
| 482 |
+
Interactive Examples Sandbox
|
| 483 |
+
</h3>
|
| 484 |
+
<span class="text-[10px] text-slate-500 uppercase tracking-widest font-mono select-none">Quick Test Gallery</span>
|
| 485 |
+
</div>
|
| 486 |
+
|
| 487 |
+
<div class="grid grid-cols-2 sm:grid-cols-4 gap-4 sm:gap-6">
|
| 488 |
+
|
| 489 |
+
<!-- Card 1 -->
|
| 490 |
+
<div class="example-card glass-panel glass-panel-interactive rounded-2xl p-3 cursor-pointer group space-y-3" data-type="Image" data-name="Book" data-category="book" data-task="Detection" data-mode="hybrid" data-asset="/assets/book.jpg">
|
| 491 |
+
<div class="h-28 w-full rounded-xl bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-500" style="background-image: url('/assets/book.jpg');"></div>
|
| 492 |
+
<div class="flex justify-between items-center px-1">
|
| 493 |
+
<span class="text-xs font-bold text-slate-200">Library Book</span>
|
| 494 |
+
<span class="text-[9px] px-2 py-0.5 rounded bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/10 font-bold tracking-wider uppercase">Detection</span>
|
| 495 |
</div>
|
| 496 |
</div>
|
| 497 |
|
| 498 |
+
<!-- Card 2 -->
|
| 499 |
+
<div class="example-card glass-panel glass-panel-interactive rounded-2xl p-3 cursor-pointer group space-y-3" data-type="Image" data-name="Sweet" data-category="sweet" data-task="Detection" data-mode="hybrid" data-asset="/assets/sweet.jpg">
|
| 500 |
+
<div class="h-28 w-full rounded-xl bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-500" style="background-image: url('/assets/sweet.jpg');"></div>
|
| 501 |
+
<div class="flex justify-between items-center px-1">
|
| 502 |
+
<span class="text-xs font-bold text-slate-200">Sushi Sweet</span>
|
| 503 |
+
<span class="text-[9px] px-2 py-0.5 rounded bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/10 font-bold tracking-wider uppercase">Detection</span>
|
| 504 |
+
</div>
|
| 505 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
|
| 507 |
+
<!-- Card 3 -->
|
| 508 |
+
<div class="example-card glass-panel glass-panel-interactive rounded-2xl p-3 cursor-pointer group space-y-3" data-type="Image" data-name="Person" data-category="person" data-task="Detection" data-mode="hybrid" data-asset="/assets/person.jpg">
|
| 509 |
+
<div class="h-28 w-full rounded-xl bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-500" style="background-image: url('/assets/person.jpg');"></div>
|
| 510 |
+
<div class="flex justify-between items-center px-1">
|
| 511 |
+
<span class="text-xs font-bold text-slate-200">Audience Group</span>
|
| 512 |
+
<span class="text-[9px] px-2 py-0.5 rounded bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/10 font-bold tracking-wider uppercase">Detection</span>
|
| 513 |
+
</div>
|
| 514 |
+
</div>
|
|
|
|
|
|
|
| 515 |
|
| 516 |
+
<!-- Card 4 -->
|
| 517 |
+
<div class="example-card glass-panel glass-panel-interactive rounded-2xl p-3 cursor-pointer group space-y-3" data-type="Image" data-name="OCR" data-category="text" data-task="OCR" data-mode="fast" data-asset="/assets/ocr.jpg">
|
| 518 |
+
<div class="h-28 w-full rounded-xl bg-cover bg-center overflow-hidden border border-white/5 bg-slate-900 group-hover:scale-[1.02] transition-transform duration-500" style="background-image: url('/assets/ocr.jpg');"></div>
|
| 519 |
+
<div class="flex justify-between items-center px-1">
|
| 520 |
+
<span class="text-xs font-bold text-slate-200">Street Sign</span>
|
| 521 |
+
<span class="text-[9px] px-2 py-0.5 rounded bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/10 font-bold tracking-wider uppercase">OCR</span>
|
| 522 |
</div>
|
| 523 |
+
</div>
|
| 524 |
|
| 525 |
+
</div>
|
| 526 |
+
</section>
|
| 527 |
+
|
| 528 |
+
<!-- PERFORMANCE ANALYTICS & LOG CONSOLE -->
|
| 529 |
+
<section class="glass-panel rounded-2xl p-6 sm:p-8 space-y-6">
|
| 530 |
+
<h3 class="text-sm font-black font-mono text-nvidia-brand uppercase tracking-widest flex items-center gap-2">
|
| 531 |
+
<svg class="h-4.5 w-4.5 text-nvidia-brand" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 532 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
| 533 |
+
</svg>
|
| 534 |
+
Inference Console Logs Trace
|
| 535 |
+
</h3>
|
| 536 |
+
|
| 537 |
+
<div class="grid grid-cols-1 md:grid-cols-12 gap-6 items-stretch">
|
| 538 |
+
|
| 539 |
+
<!-- Performance Statistics Metrics Console (Grid: 5) -->
|
| 540 |
+
<div class="md:col-span-5 bg-black/60 rounded-xl p-5 border border-white/5 font-mono text-xs text-slate-300 space-y-3.5 leading-relaxed">
|
| 541 |
+
<div class="text-nvidia-brand font-bold border-b border-white/5 pb-2 mb-2 uppercase tracking-widest text-[10px]">📊 Metrics Log</div>
|
| 542 |
+
<div class="flex justify-between"><span class="text-slate-500">Inference Status:</span> <span id="meta-status" class="text-emerald-500 font-semibold">Idle</span></div>
|
| 543 |
+
<div class="flex justify-between"><span class="text-slate-500">Processed Tokens/Frames:</span> <span id="meta-tokens">-</span></div>
|
| 544 |
+
<div class="flex justify-between"><span class="text-slate-500">Bounding Box Detections:</span> <span id="meta-boxes">-</span></div>
|
| 545 |
+
<div class="flex justify-between"><span class="text-slate-500">TPS (Tokens/s):</span> <span id="meta-tps">-</span></div>
|
| 546 |
+
<div class="flex justify-between"><span class="text-slate-500">BPS (Boxes/s):</span> <span id="meta-bps">-</span></div>
|
| 547 |
+
<div class="flex justify-between"><span class="text-slate-500">Processing Time:</span> <span id="meta-time">-</span></div>
|
| 548 |
</div>
|
| 549 |
|
| 550 |
+
<!-- Tag drawer box list (Grid: 7) -->
|
| 551 |
+
<div class="md:col-span-7 bg-black/60 rounded-xl p-5 border border-white/5 flex flex-col">
|
| 552 |
+
<div class="text-nvidia-brand font-mono font-bold border-b border-white/5 pb-2 mb-2.5 uppercase tracking-widest text-[10px] flex justify-between shrink-0">
|
| 553 |
+
<span>🎯 Detected Target Coordinates</span>
|
| 554 |
+
<span id="detection-count-badge" class="text-[9px] bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/20 px-2 py-0.5 rounded-full font-bold">0</span>
|
| 555 |
+
</div>
|
| 556 |
+
<div id="detection-tags-wrapper" class="flex-1 flex flex-wrap gap-2 max-h-[140px] overflow-y-auto pt-1 align-content-start text-xs text-slate-500">
|
| 557 |
+
No objects detected. Stage parameters and click Run Inference to trigger the model pipeline.
|
| 558 |
+
</div>
|
| 559 |
+
</div>
|
| 560 |
+
|
| 561 |
+
</div>
|
| 562 |
+
|
| 563 |
+
<!-- Optional dynamic trace wrapper -->
|
| 564 |
+
<div id="rich-trace-log" class="hidden border-t border-white/5 pt-4"></div>
|
| 565 |
+
|
| 566 |
+
</section>
|
| 567 |
|
|
|
|
| 568 |
</main>
|
| 569 |
|
| 570 |
<!-- Gradio client connection & app runtime logic -->
|
|
|
|
| 582 |
const videoFramesWrapper = document.getElementById("video-frames-wrapper");
|
| 583 |
const taskTypeSelect = document.getElementById("task-type");
|
| 584 |
const categoriesInput = document.getElementById("categories");
|
| 585 |
+
const clearSearchBtn = document.getElementById("clear-search-btn");
|
| 586 |
const inferenceModeSelect = document.getElementById("inference-mode");
|
| 587 |
const rawPromptPreview = document.getElementById("raw-prompt-preview");
|
| 588 |
|
|
|
|
| 648 |
topkSlider.addEventListener("input", (e) => topkVal.textContent = e.target.value);
|
| 649 |
maxFramesSlider.addEventListener("input", (e) => maxFramesVal.textContent = e.target.value);
|
| 650 |
|
| 651 |
+
// Clear search categories button
|
| 652 |
+
clearSearchBtn.addEventListener("click", () => {
|
| 653 |
+
categoriesInput.value = "";
|
| 654 |
+
categoriesInput.focus();
|
| 655 |
+
triggerPromptUpdate();
|
| 656 |
+
});
|
| 657 |
+
|
| 658 |
// Trigger prompt generation updates
|
| 659 |
const triggerPromptUpdate = () => {
|
| 660 |
const task = taskTypeSelect.value;
|
|
|
|
| 686 |
}
|
| 687 |
}
|
| 688 |
|
| 689 |
+
// Switch workspace input styles without clearing
|
| 690 |
function setMediaType(type) {
|
| 691 |
selectedMediaType = type;
|
| 692 |
if (type === "Image") {
|
| 693 |
+
mediaTypeImageBtn.className = "py-2 rounded-lg font-semibold text-xs transition-all bg-nvidia-brand text-black font-outfit font-black shadow shadow-nvidia-brand/10";
|
| 694 |
+
mediaTypeVideoBtn.className = "py-2 rounded-lg font-semibold text-xs text-slate-400 hover:text-slate-200 transition-all";
|
| 695 |
videoFramesWrapper.classList.add("hidden");
|
| 696 |
+
videoFramesWrapper.classList.add("opacity-50");
|
| 697 |
+
videoFramesWrapper.classList.add("pointer-events-none");
|
| 698 |
+
maxFramesSlider.disabled = true;
|
| 699 |
fileInput.accept = "image/*";
|
| 700 |
workspaceStatus.textContent = activeFile ? "Image Loaded" : "No Media Loaded";
|
| 701 |
} else {
|
| 702 |
+
mediaTypeVideoBtn.className = "py-2 rounded-lg font-semibold text-xs transition-all bg-nvidia-brand text-black font-outfit font-black shadow shadow-nvidia-brand/10";
|
| 703 |
+
mediaTypeImageBtn.className = "py-2 rounded-lg font-semibold text-xs text-slate-400 hover:text-slate-200 transition-all";
|
| 704 |
videoFramesWrapper.classList.remove("hidden");
|
| 705 |
+
videoFramesWrapper.classList.remove("opacity-50");
|
| 706 |
+
videoFramesWrapper.classList.remove("pointer-events-none");
|
| 707 |
+
maxFramesSlider.disabled = false;
|
| 708 |
fileInput.accept = "video/*";
|
| 709 |
workspaceStatus.textContent = activeFile ? "Video Loaded" : "No Media Loaded";
|
| 710 |
}
|
|
|
|
| 939 |
detectionTagsWrapper.innerHTML = "";
|
| 940 |
detections.forEach(det => {
|
| 941 |
const tag = document.createElement("span");
|
| 942 |
+
tag.className = "px-2.5 py-1 rounded bg-nvidia-brand/10 text-nvidia-brand border border-nvidia-brand/20 font-bold uppercase tracking-wider text-[10px] animate-fade-in";
|
| 943 |
tag.textContent = det.frame ? `[Frame ${det.frame}] ${det.label}` : det.label;
|
| 944 |
detectionTagsWrapper.appendChild(tag);
|
| 945 |
});
|
|
|
|
| 983 |
});
|
| 984 |
runBtn.addEventListener("click", executeInference);
|
| 985 |
|
| 986 |
+
// Bind enter key press in Categories float bar input
|
| 987 |
+
categoriesInput.addEventListener("keydown", (e) => {
|
| 988 |
+
if (e.key === "Enter") {
|
| 989 |
+
e.preventDefault();
|
| 990 |
+
executeInference();
|
| 991 |
+
}
|
| 992 |
+
});
|
| 993 |
+
|
| 994 |
setupLiveUpdaters();
|
| 995 |
setupDragDrop();
|
| 996 |
setupExamples();
|