Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- index.html +5 -18
index.html
CHANGED
|
@@ -279,17 +279,10 @@ const EXAMPLES = [
|
|
| 279 |
];
|
| 280 |
document.getElementById("prompt").value = EXAMPLES[0];
|
| 281 |
|
| 282 |
-
//
|
| 283 |
-
//
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
{t:4, m:"🤖 Nemotron is choosing the right tools…"},
|
| 287 |
-
{t:14, m:"✈️ Scanning airlines for the cheapest route…"},
|
| 288 |
-
{t:30, m:"🏨 Finding hotels closest to BC Place…"},
|
| 289 |
-
{t:48, m:"🌤️ Checking the match-day forecast…"},
|
| 290 |
-
{t:68, m:"🗺️ Scoring 3 packages & ranking them…"},
|
| 291 |
-
{t:95, m:"✍️ Nemotron is writing your comparison…"},
|
| 292 |
-
];
|
| 293 |
|
| 294 |
let running = false;
|
| 295 |
let resultHandled = false; // the result event repeats on `complete` — render once
|
|
@@ -366,13 +359,7 @@ function startTimer(bubble){
|
|
| 366 |
elapsedTimer = setInterval(()=>{
|
| 367 |
const secs = Math.floor((performance.now()-t0)/1000);
|
| 368 |
setElapsed(bubble, secs);
|
| 369 |
-
//
|
| 370 |
-
if (performance.now() - lastRealAt > 6000){
|
| 371 |
-
let ph = PHASES[0].m;
|
| 372 |
-
for (const p of PHASES){ if (secs >= p.t) ph = p.m; }
|
| 373 |
-
setStatus(bubble, ph);
|
| 374 |
-
}
|
| 375 |
-
// cold-start honesty after ~20s
|
| 376 |
const hint = document.querySelector(".cold-hint");
|
| 377 |
if (hint && secs >= 20 && hint.dataset.shown !== "1"){
|
| 378 |
hint.dataset.shown = "1";
|
|
|
|
| 279 |
];
|
| 280 |
document.getElementById("prompt").value = EXAMPLES[0];
|
| 281 |
|
| 282 |
+
// NOTE: status text is driven ONLY by real stream events (the backend's _pulse
|
| 283 |
+
// sends an accurate commentary heartbeat every ~9s during any long phase). The
|
| 284 |
+
// timer below drives the elapsed counter + cold-start hint only — it does NOT
|
| 285 |
+
// invent phase messages, which would be inaccurate when round 1 runs long.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
|
| 287 |
let running = false;
|
| 288 |
let resultHandled = false; // the result event repeats on `complete` — render once
|
|
|
|
| 359 |
elapsedTimer = setInterval(()=>{
|
| 360 |
const secs = Math.floor((performance.now()-t0)/1000);
|
| 361 |
setElapsed(bubble, secs);
|
| 362 |
+
// cold-start honesty after ~20s (status text itself comes from real events)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
const hint = document.querySelector(".cold-hint");
|
| 364 |
if (hint && secs >= 20 && hint.dataset.shown !== "1"){
|
| 365 |
hint.dataset.shown = "1";
|