Spaces:
Running on Zero
Running on Zero
Clarify the case walkthrough and live inference controls
Browse filesFiles changed (2)
33 unmodified lines3435363738394033 unmodified lines<section class="decision panel" aria-labelledby="trace-title"><div class="sectionbar"><h2 id="trace-title" data-t="trace">Decision trace</h2><span class="micro">T₁ / T₂ → CAPTION</span></div><div class="toolbar"><div class="transport"><button type="button" id="replay" data-t="play">▷ Replay trace</button><button type="button" id="live" data-t="live">Run on GPU ↗</button></div><span id="source" class="chip"></span></div><p class="run-status" id="status" role="status"></p>33 unmodified lines3435363738394033 unmodified lines<section class="decision panel" aria-labelledby="trace-title"><div class="sectionbar"><h2 id="trace-title" data-t="trace">Decision trace</h2><span class="micro">T₁ / T₂ → CAPTION</span></div><div class="toolbar"><div class="transport"><button type="button" id="replay" data-t="play">▷ Step through</button><button type="button" id="live" data-t="live">Run on GPU ↗</button></div><span id="source" class="chip"></span></div><p class="run-status" id="status" role="status"></p>
6 unmodified lines7891011121386 unmodified lines100101102103104105106107108109110111112101 unmodified lines2142152162172182192206 unmodified lineschoose: ['Choose a test pair','选择测试案例'], observations: ['Bi-temporal observations','双时相观测'], trace: ['Decision trace','决策过程'],encode: ['Encode the pair','编码双图'], generate: ['Generate captions','生成候选'], lock: ['Lock the state','锁定状态'],rerank: ['Same-state reranking','同状态精排'], output: ['Final caption','最终描述'],play: ['▷ Replay trace','▷ 播放论文记录'], pause: ['Ⅱ Pause replay','Ⅱ 暂停回放'], live: ['Run on GPU ↗','GPU 实跑 ↗'],};let lang = new URLSearchParams(location.search).get('lang') === 'zh' ? 'zh' : 'en';const text = (en, zh) => lang === 'zh' ? zh : en;86 unmodified linesconst focused = document.activeElement?.dataset.step;byId('pipeline').innerHTML = titles.map((title, index) => `<button type="button" data-step="${index}" ${index > reached ? 'disabled' : ''} ${phase === index ? 'aria-current="step"' : ''} class="${index === 3 && trace?.changed === false ? 'bypass' : ''}"><small>0${index + 1} / ${short[index]}</small><strong>${title}</strong></button>`).join('');if (focused !== undefined) byId('pipeline').querySelector(`[data-step="${focused}"]`)?.focus({preventScroll: true});byId('source').textContent = mode === 'archive' ? text('Paper replay · no GPU','论文记录 · 无需 GPU') : text('ZeroGPU · live run','ZeroGPU · 实时运行');byId('source').dataset.source = mode;byId('replay').textContent = label(timer ? 'pause' : 'play');byId('replay').disabled = busy;byId('live').disabled = busy || !catalog.live;const status = failure || (mode === 'archive'? (catalog.live ? text('Choose any step to inspect the recorded decision.', '可点击任意步骤查看论文记录。') : text('Paper replay is ready. GPU weights are unavailable.', '可查看论文回放。GPU 权重暂不可用。')): ({encode: text('Encoding T₁ and T₂ on GPU…','GPU 正在编码双时相影像…'),beam: text('Decoding the 15 caption beams…','正在解码 15 条候选…'),101 unmodified linessource.addEventListener('error', () => reject(new Error('Live stream failed')));});} catch {failure = text('Live run interrupted. Try again when GPU quota is available, or switch to paper replay.','实时推理中断。可在 GPU 配额可用时重试,或切换到论文记录。');} finally {source?.close();busy = false;6 unmodified lines7891011121386 unmodified lines100101102103104105106107108109110111112101 unmodified lines2142152162172182192206 unmodified lineschoose: ['Choose a test pair','选择测试案例'], observations: ['Bi-temporal observations','双时相观测'], trace: ['Decision trace','决策过程'],encode: ['Encode the pair','编码双图'], generate: ['Generate captions','生成候选'], lock: ['Lock the state','锁定状态'],rerank: ['Same-state reranking','同状态精排'], output: ['Final caption','最终描述'],play: ['▷ Step through','▷ 逐步演示'], pause: ['Ⅱ Pause','Ⅱ 暂停演示'], live: ['Run on GPU ↗','实时推理 ↗'],};let lang = new URLSearchParams(location.search).get('lang') === 'zh' ? 'zh' : 'en';const text = (en, zh) => lang === 'zh' ? zh : en;86 unmodified linesconst focused = document.activeElement?.dataset.step;byId('pipeline').innerHTML = titles.map((title, index) => `<button type="button" data-step="${index}" ${index > reached ? 'disabled' : ''} ${phase === index ? 'aria-current="step"' : ''} class="${index === 3 && trace?.changed === false ? 'bypass' : ''}"><small>0${index + 1} / ${short[index]}</small><strong>${title}</strong></button>`).join('');if (focused !== undefined) byId('pipeline').querySelector(`[data-step="${focused}"]`)?.focus({preventScroll: true});byId('source').textContent = mode === 'archive' ? text('Case walkthrough','案例演示') : text('ZeroGPU · live run','ZeroGPU · 实时推理');byId('source').dataset.source = mode;byId('replay').textContent = label(timer ? 'pause' : 'play');byId('replay').disabled = busy;byId('live').disabled = busy || !catalog.live;const status = failure || (mode === 'archive'? (catalog.live ? text('Select a step to see how the model made its decision.', '点击任意步骤,查看模型如何做出决策。') : text('Explore the case below. Live inference is temporarily unavailable.', '可以继续查看案例,实时推理暂不可用。')): ({encode: text('Encoding T₁ and T₂ on GPU…','GPU 正在编码双时相影像…'),beam: text('Decoding the 15 caption beams…','正在解码 15 条候选…'),101 unmodified linessource.addEventListener('error', () => reject(new Error('Live stream failed')));});} catch {failure = text('Live inference was interrupted. Try again or step through the case.', '实时推理中断,可重试或先查看案例演示。');} finally {source?.close();busy = false;
workbench/index.html+1-1
workbench/lab.js+4-4