Spaces:
Running on Zero
Running on Zero
msg encrypted ai Cursor commited on
Commit ·
9c1613a
1
Parent(s): a7832f0
Feat/sunday 3 (#16)
Browse files* ui polish plan
* ui polish
* Polish Studio chat view layout and export UX.
Widen centered Chat view, add slide demo tip styling, and simplify export to Download PPTX.
Co-authored-by: Cursor <cursoragent@cursor.com>
* ui polish
* ui polish
* ui polish
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
- .cursor/plans/last_sprint_demo_polish_2f148411.plan.md +146 -0
- apps/gradio-space/src/gradio_space/app.py +1 -1
- apps/gradio-space/src/gradio_space/server.py +12 -3
- apps/gradio-space/static/studio/index.html +11 -10
- apps/gradio-space/static/studio/studio.css +19 -3
- apps/gradio-space/static/studio/studio.js +6 -2
- results/lm_eval/ensemble-jepa__manual/summary.md +0 -15
.cursor/plans/last_sprint_demo_polish_2f148411.plan.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Last Sprint Demo Polish
|
| 3 |
+
overview: Rename remaining "Debug" user-facing labels to "Chat", then polish Studio UI/UX for hackathon submission day — loading states, trace visibility, deploy/cache fix — without new backend features like slides-from-chat or quiz.
|
| 4 |
+
todos:
|
| 5 |
+
- id: chat-labels
|
| 6 |
+
content: "Update user-facing strings: Chat panel header, Agent trace summaries, Classic tab label in index.html + app.py"
|
| 7 |
+
status: completed
|
| 8 |
+
- id: cache-bust-deploy
|
| 9 |
+
content: Add static asset version query param and redeploy HF Space so sidebar Chat is visible
|
| 10 |
+
status: completed
|
| 11 |
+
- id: ux-polish
|
| 12 |
+
content: Export button clarity, honest slide loading hints, clear debug chat on new session
|
| 13 |
+
status: completed
|
| 14 |
+
- id: chat-view-css
|
| 15 |
+
content: Polish full-page Chat view layout (centered/wider card)
|
| 16 |
+
status: completed
|
| 17 |
+
- id: submission
|
| 18 |
+
content: Run pytest, record demo video, upload trace via scripts/upload_trace.py, submit
|
| 19 |
+
status: completed
|
| 20 |
+
isProject: false
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Last sprint: Chat rename + demo polish
|
| 24 |
+
|
| 25 |
+
Submission is **today (June 15)**. You chose **demo & submission polish** over the larger slides-from-chat / quiz feature plan ([`.cursor/plans/slides_from_chat_+_quiz_f53701a3.plan.md`](.cursor/plans/slides_from_chat_+_quiz_f53701a3.plan.md)).
|
| 26 |
+
|
| 27 |
+
## Current state
|
| 28 |
+
|
| 29 |
+
Studio at `/` is feature-complete for the hackathon narrative: Research ingest + RAG Q&A, Slides generation with exports, Language lessons (voice + RAG), Settings, Classic UI fallback. Classic parity work is marked completed in [`.cursor/plans/studio_classic_parity_48cdd684.plan.md`](.cursor/plans/studio_classic_parity_48cdd684.plan.md).
|
| 30 |
+
|
| 31 |
+
Your screenshots still show sidebar **Debug** with a bug icon, but the working tree already has **Chat** + `chat` icon in [`apps/gradio-space/static/studio/index.html`](apps/gradio-space/static/studio/index.html) line 40. Likely causes: **HF Space not redeployed** or **browser cache** on `/static/studio/*` (no cache-bust query param on CSS/JS).
|
| 32 |
+
|
| 33 |
+
```mermaid
|
| 34 |
+
flowchart LR
|
| 35 |
+
subgraph done [Already in repo]
|
| 36 |
+
SidebarChat["Sidebar: Chat + chat icon"]
|
| 37 |
+
APIs["research_chat, generate_slides, language_lesson_turn, debug_chat"]
|
| 38 |
+
Traces["Trace JSON in collapsed details"]
|
| 39 |
+
end
|
| 40 |
+
subgraph polish [This sprint]
|
| 41 |
+
Labels["Panel labels: Chat not debug"]
|
| 42 |
+
UX["Loading + export UX"]
|
| 43 |
+
Deploy["Push Space + cache bust"]
|
| 44 |
+
Submit["Trace upload + demo video"]
|
| 45 |
+
end
|
| 46 |
+
done --> polish
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Part 1 — Debug → Chat (user-facing labels)
|
| 52 |
+
|
| 53 |
+
**Scope:** HTML/CSS string changes only. Keep internal `data-view="debug"`, `debug_chat` API, and JS function names — no risky refactor.
|
| 54 |
+
|
| 55 |
+
| Location | Current | Target |
|
| 56 |
+
|----------|---------|--------|
|
| 57 |
+
| Sidebar nav | Already `Chat` + chat icon | Verify after deploy |
|
| 58 |
+
| Chat panel header | `Chat (debug)` | `Chat` |
|
| 59 |
+
| Chat empty state | "test the active local model" | "Ask the local model — turn on RAG to ground answers in your library" |
|
| 60 |
+
| Trace collapsibles (all views) | `Debug trace` | `Agent trace` (better for **Sharing is Caring** jury story) |
|
| 61 |
+
| Classic tab | `Chat (debug)` in [`app.py`](apps/gradio-space/src/gradio_space/app.py) | `Chat` (optional `Developer` badge via existing CSS in Classic) |
|
| 62 |
+
|
| 63 |
+
Files: [`index.html`](apps/gradio-space/static/studio/index.html), optionally [`app.py`](apps/gradio-space/src/gradio_space/app.py).
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## Part 2 — UI/UX polish (no new APIs)
|
| 68 |
+
|
| 69 |
+
### 2a. Static asset cache bust
|
| 70 |
+
|
| 71 |
+
Add a build/version suffix to CSS/JS in `index.html` (e.g. `?v=20260615` or read from a single `STUDIO_ASSET_VERSION` constant in [`server.py`](apps/gradio-space/src/gradio_space/server.py) injected into the HTML route). Ensures judges see Chat label after one deploy.
|
| 72 |
+
|
| 73 |
+
### 2b. Export button clarity
|
| 74 |
+
|
| 75 |
+
[`studio.js`](apps/gradio-space/static/studio/studio.js) `btn-export` only opens PPTX. Options (pick one, ~15 min):
|
| 76 |
+
|
| 77 |
+
- Change label to **Download PPTX** when slides exist, or
|
| 78 |
+
- Small export menu: PPTX / DOCX / HTML (links already rendered in `#downloads`)
|
| 79 |
+
|
| 80 |
+
### 2c. Loading expectations (slides bottleneck)
|
| 81 |
+
|
| 82 |
+
Your screenshot shows **~451s** for outline on CPU. Code already caps tokens via [`outline_max_tokens`](libs/agent/src/agent/prompts.py) and shows overlay hint *"30–90 seconds"* — misleading on CPU.
|
| 83 |
+
|
| 84 |
+
- Update overlay hint to: *"First run may take several minutes on CPU; use GPU Space or fewer slides for a quick demo."*
|
| 85 |
+
- Add a one-line tip under **Generate slides**: *"Demo tip: 3 slides, GPU hardware."*
|
| 86 |
+
|
| 87 |
+
No model changes required for submission; avoids over-promising speed.
|
| 88 |
+
|
| 89 |
+
### 2d. Research chat parity with Language lessons
|
| 90 |
+
|
| 91 |
+
Language lessons render `rag_references` under assistant bubbles ([`studio.js`](apps/gradio-space/static/studio/studio.js) ~407). Research chat only renders `msg.content` — citations are inline in text today, which is acceptable for demo. **Optional quick win:** if `ask_question` history includes a references field, mirror the lessons pattern (check [`research_mind.py`](apps/gradio-space/src/gradio_space/tabs/research_mind.py) return shape first).
|
| 92 |
+
|
| 93 |
+
### 2e. Chat full-page view polish
|
| 94 |
+
|
| 95 |
+
[`studio.css`](apps/gradio-space/static/studio/studio.css) already hides other columns on `data-view="debug"`. Minor CSS: center the chat card, slightly wider max-width on desktop so the dedicated Chat view feels intentional (not a leftover debug panel).
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## Part 3 — Bug fixes (small, high-impact)
|
| 100 |
+
|
| 101 |
+
| Issue | Fix |
|
| 102 |
+
|-------|-----|
|
| 103 |
+
| Stale "Debug" in production | Deploy + cache bust (Part 2a) |
|
| 104 |
+
| Misleading slide timing hint | Part 2c |
|
| 105 |
+
| New session clears research history but not debug chat | In `btn-new-session` handler, also clear `state.debugChatHistory` + `renderDebugChat()` |
|
| 106 |
+
| Export disabled until slides generated | Expected; document in demo script |
|
| 107 |
+
|
| 108 |
+
Run existing test suite before push: `uv run pytest` (100 tests).
|
| 109 |
+
|
| 110 |
+
---
|
| 111 |
+
|
| 112 |
+
## Part 4 — Submission checklist (non-code, same day)
|
| 113 |
+
|
| 114 |
+
From [README hackathon checklist](README.md):
|
| 115 |
+
|
| 116 |
+
1. **Space live** — push branch, confirm `/` loads Studio with Chat sidebar
|
| 117 |
+
2. **Demo video** (2–3 min): Research ingest → Ask with citations → Slides (3 slides, GPU if possible) → Language lesson voice turn → expand **Agent trace** → download PPTX
|
| 118 |
+
3. **Sharing is Caring** — generate one slide run, then:
|
| 119 |
+
```bash
|
| 120 |
+
uv run python scripts/upload_trace.py --repo-id YOUR_USER/build-small-agent-traces
|
| 121 |
+
```
|
| 122 |
+
4. **Social post** + formal submission on hackathon page
|
| 123 |
+
|
| 124 |
+
Badge targets already mapped in README: Best Agent, Tiny Titan, OpenBMB, Off-the-Grid, Sharing is Caring.
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## Explicitly deferred (post-submission or next hackathon)
|
| 129 |
+
|
| 130 |
+
- Generate slides from chat + Quiz maker ([slides/quiz plan](.cursor/plans/slides_from_chat_+_quiz_f53701a3.plan.md))
|
| 131 |
+
- EchoCoach charts in Studio (Classic only today)
|
| 132 |
+
- Outline speed optimizations (separate outline-only smaller model, streaming tokens)
|
| 133 |
+
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## Estimated effort
|
| 137 |
+
|
| 138 |
+
| Block | Time |
|
| 139 |
+
|-------|------|
|
| 140 |
+
| Chat / trace labels | ~30 min |
|
| 141 |
+
| Cache bust + deploy | ~30 min |
|
| 142 |
+
| Export + loading hints + new-session bug | ~45 min |
|
| 143 |
+
| Chat view CSS + optional research refs | ~45 min |
|
| 144 |
+
| Demo video + trace upload | ~1–2 hr |
|
| 145 |
+
|
| 146 |
+
**Total:** ~3–4 hours to a polished submission.
|
apps/gradio-space/src/gradio_space/app.py
CHANGED
|
@@ -69,7 +69,7 @@ def build_demo() -> gr.Blocks:
|
|
| 69 |
build_echo_coach_tab()
|
| 70 |
with gr.Tab("TeacherVoice"):
|
| 71 |
build_teacher_voice_tab(workspace)
|
| 72 |
-
with gr.Tab("Chat
|
| 73 |
build_chat_tab(workspace)
|
| 74 |
|
| 75 |
return demo
|
|
|
|
| 69 |
build_echo_coach_tab()
|
| 70 |
with gr.Tab("TeacherVoice"):
|
| 71 |
build_teacher_voice_tab(workspace)
|
| 72 |
+
with gr.Tab("Chat"):
|
| 73 |
build_chat_tab(workspace)
|
| 74 |
|
| 75 |
return demo
|
apps/gradio-space/src/gradio_space/server.py
CHANGED
|
@@ -5,7 +5,7 @@ from pathlib import Path
|
|
| 5 |
|
| 6 |
import gradio as gr
|
| 7 |
from fastapi import Request
|
| 8 |
-
from fastapi.responses import FileResponse, RedirectResponse
|
| 9 |
from fastapi.staticfiles import StaticFiles
|
| 10 |
|
| 11 |
from gradio import mount_gradio_app
|
|
@@ -23,6 +23,15 @@ from gradio_space.ui.theme import get_theme, load_css
|
|
| 23 |
_PKG_ROOT = Path(__file__).resolve().parent
|
| 24 |
_APP_ROOT = _PKG_ROOT.parents[1]
|
| 25 |
_STATIC_DIR = _APP_ROOT / "static" / "studio"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def _all_allowed_paths() -> list[str]:
|
|
@@ -66,13 +75,13 @@ def create_server() -> gr.Server:
|
|
| 66 |
if _wants_classic_ui(request):
|
| 67 |
# Relative path keeps huggingface.co/spaces/.../classic on HTTPS (not http hf.space).
|
| 68 |
return RedirectResponse(url="classic", status_code=302)
|
| 69 |
-
return
|
| 70 |
|
| 71 |
@server.get("/studio")
|
| 72 |
async def studio_alias(request: Request):
|
| 73 |
if _wants_classic_ui(request):
|
| 74 |
return RedirectResponse(url="classic", status_code=302)
|
| 75 |
-
return
|
| 76 |
|
| 77 |
demo = build_demo()
|
| 78 |
mount_gradio_app(
|
|
|
|
| 5 |
|
| 6 |
import gradio as gr
|
| 7 |
from fastapi import Request
|
| 8 |
+
from fastapi.responses import FileResponse, HTMLResponse, RedirectResponse
|
| 9 |
from fastapi.staticfiles import StaticFiles
|
| 10 |
|
| 11 |
from gradio import mount_gradio_app
|
|
|
|
| 23 |
_PKG_ROOT = Path(__file__).resolve().parent
|
| 24 |
_APP_ROOT = _PKG_ROOT.parents[1]
|
| 25 |
_STATIC_DIR = _APP_ROOT / "static" / "studio"
|
| 26 |
+
_STUDIO_ASSET_VERSION = "20260615"
|
| 27 |
+
_STUDIO_INDEX_HTML = _STATIC_DIR / "index.html"
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def _studio_index_html() -> str:
|
| 31 |
+
return _STUDIO_INDEX_HTML.read_text().replace(
|
| 32 |
+
"{{STUDIO_ASSET_VERSION}}",
|
| 33 |
+
_STUDIO_ASSET_VERSION,
|
| 34 |
+
)
|
| 35 |
|
| 36 |
|
| 37 |
def _all_allowed_paths() -> list[str]:
|
|
|
|
| 75 |
if _wants_classic_ui(request):
|
| 76 |
# Relative path keeps huggingface.co/spaces/.../classic on HTTPS (not http hf.space).
|
| 77 |
return RedirectResponse(url="classic", status_code=302)
|
| 78 |
+
return HTMLResponse(_studio_index_html())
|
| 79 |
|
| 80 |
@server.get("/studio")
|
| 81 |
async def studio_alias(request: Request):
|
| 82 |
if _wants_classic_ui(request):
|
| 83 |
return RedirectResponse(url="classic", status_code=302)
|
| 84 |
+
return HTMLResponse(_studio_index_html())
|
| 85 |
|
| 86 |
demo = build_demo()
|
| 87 |
mount_gradio_app(
|
apps/gradio-space/static/studio/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
document.documentElement.dataset.theme = "dark";
|
| 16 |
})();
|
| 17 |
</script>
|
| 18 |
-
<link rel="stylesheet" href="/static/studio/studio.css" />
|
| 19 |
</head>
|
| 20 |
<body>
|
| 21 |
<div id="studio-error" class="studio-banner studio-banner-error hidden" role="alert"></div>
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
<button type="button" class="nav-item" data-view="research"><span class="material-symbols-outlined">search</span>Research</button>
|
| 38 |
<button type="button" class="nav-item active" data-view="slides"><span class="material-symbols-outlined">present_to_all</span>Slides</button>
|
| 39 |
<button type="button" class="nav-item" data-view="language-lessons"><span class="material-symbols-outlined">translate</span>Language lessons</button>
|
| 40 |
-
<button type="button" class="nav-item" data-view="debug"><span class="material-symbols-outlined">
|
| 41 |
<button type="button" id="btn-open-settings" class="nav-item"><span class="material-symbols-outlined">settings</span>Settings</button>
|
| 42 |
<a href="?classic" class="nav-item nav-link"><span class="material-symbols-outlined">open_in_new</span>Classic UI</a>
|
| 43 |
</nav>
|
|
@@ -184,7 +184,7 @@
|
|
| 184 |
</button>
|
| 185 |
<p id="research-chat-status" class="status-text"></p>
|
| 186 |
<details class="studio-debug-trace" id="research-trace-details">
|
| 187 |
-
<summary>
|
| 188 |
<div id="research-trace-panel"></div>
|
| 189 |
</details>
|
| 190 |
</div>
|
|
@@ -268,6 +268,7 @@
|
|
| 268 |
Generate Slides
|
| 269 |
</button>
|
| 270 |
</div>
|
|
|
|
| 271 |
<p id="generate-status" class="status-text">Ready to generate.</p>
|
| 272 |
<div id="progress-panel" class="progress-panel">
|
| 273 |
<div class="progress-panel-head">
|
|
@@ -281,7 +282,7 @@
|
|
| 281 |
<ol id="progress-steps" class="progress-steps"></ol>
|
| 282 |
<div id="progress-log" class="progress-log hidden" aria-live="polite"></div>
|
| 283 |
<details class="studio-debug-trace" id="slides-trace-details">
|
| 284 |
-
<summary>
|
| 285 |
<div id="slides-trace-panel"></div>
|
| 286 |
</details>
|
| 287 |
</div>
|
|
@@ -291,7 +292,7 @@
|
|
| 291 |
<div class="region-loading-inner">
|
| 292 |
<span class="studio-spinner" aria-hidden="true"></span>
|
| 293 |
<p id="canvas-overlay-text" class="region-loading-text">Generating slides…</p>
|
| 294 |
-
<p class="region-loading-hint canvas-overlay-hint">
|
| 295 |
</div>
|
| 296 |
</div>
|
| 297 |
<div id="slide-canvas-content" class="slide-canvas-content">
|
|
@@ -417,8 +418,8 @@
|
|
| 417 |
<section class="col col-debug">
|
| 418 |
<div class="card card-tall coach-debug-card">
|
| 419 |
<div class="coach-card-head">
|
| 420 |
-
<h2 class="section-label">Chat
|
| 421 |
-
<p class="status-text view-debug-only">
|
| 422 |
</div>
|
| 423 |
<label class="toggle-row">
|
| 424 |
<span>Use ResearchMind RAG</span>
|
|
@@ -445,7 +446,7 @@
|
|
| 445 |
</label>
|
| 446 |
</div>
|
| 447 |
<div id="debug-chat-messages" class="research-chat-messages debug-chat-messages">
|
| 448 |
-
<p class="research-chat-empty">
|
| 449 |
</div>
|
| 450 |
<div class="coach-debug-compose">
|
| 451 |
<label class="field">
|
|
@@ -455,7 +456,7 @@
|
|
| 455 |
<button type="button" id="btn-debug-send" class="btn btn-primary btn-block">Send</button>
|
| 456 |
</div>
|
| 457 |
<details class="studio-debug-trace" id="debug-trace-details">
|
| 458 |
-
<summary>
|
| 459 |
<div id="debug-trace-panel"></div>
|
| 460 |
</details>
|
| 461 |
</div>
|
|
@@ -494,6 +495,6 @@
|
|
| 494 |
</aside>
|
| 495 |
</div>
|
| 496 |
|
| 497 |
-
<script type="module" src="/static/studio/studio.js"></script>
|
| 498 |
</body>
|
| 499 |
</html>
|
|
|
|
| 15 |
document.documentElement.dataset.theme = "dark";
|
| 16 |
})();
|
| 17 |
</script>
|
| 18 |
+
<link rel="stylesheet" href="/static/studio/studio.css?v={{STUDIO_ASSET_VERSION}}" />
|
| 19 |
</head>
|
| 20 |
<body>
|
| 21 |
<div id="studio-error" class="studio-banner studio-banner-error hidden" role="alert"></div>
|
|
|
|
| 37 |
<button type="button" class="nav-item" data-view="research"><span class="material-symbols-outlined">search</span>Research</button>
|
| 38 |
<button type="button" class="nav-item active" data-view="slides"><span class="material-symbols-outlined">present_to_all</span>Slides</button>
|
| 39 |
<button type="button" class="nav-item" data-view="language-lessons"><span class="material-symbols-outlined">translate</span>Language lessons</button>
|
| 40 |
+
<button type="button" class="nav-item" data-view="debug"><span class="material-symbols-outlined">chat</span>Chat</button>
|
| 41 |
<button type="button" id="btn-open-settings" class="nav-item"><span class="material-symbols-outlined">settings</span>Settings</button>
|
| 42 |
<a href="?classic" class="nav-item nav-link"><span class="material-symbols-outlined">open_in_new</span>Classic UI</a>
|
| 43 |
</nav>
|
|
|
|
| 184 |
</button>
|
| 185 |
<p id="research-chat-status" class="status-text"></p>
|
| 186 |
<details class="studio-debug-trace" id="research-trace-details">
|
| 187 |
+
<summary>Agent trace</summary>
|
| 188 |
<div id="research-trace-panel"></div>
|
| 189 |
</details>
|
| 190 |
</div>
|
|
|
|
| 268 |
Generate Slides
|
| 269 |
</button>
|
| 270 |
</div>
|
| 271 |
+
<p class="status-text slide-demo-tip">Demo tip: 3 slides on GPU hardware for a quick run.</p>
|
| 272 |
<p id="generate-status" class="status-text">Ready to generate.</p>
|
| 273 |
<div id="progress-panel" class="progress-panel">
|
| 274 |
<div class="progress-panel-head">
|
|
|
|
| 282 |
<ol id="progress-steps" class="progress-steps"></ol>
|
| 283 |
<div id="progress-log" class="progress-log hidden" aria-live="polite"></div>
|
| 284 |
<details class="studio-debug-trace" id="slides-trace-details">
|
| 285 |
+
<summary>Agent trace</summary>
|
| 286 |
<div id="slides-trace-panel"></div>
|
| 287 |
</details>
|
| 288 |
</div>
|
|
|
|
| 292 |
<div class="region-loading-inner">
|
| 293 |
<span class="studio-spinner" aria-hidden="true"></span>
|
| 294 |
<p id="canvas-overlay-text" class="region-loading-text">Generating slides…</p>
|
| 295 |
+
<p class="region-loading-hint canvas-overlay-hint">First run may take several minutes on CPU; use GPU Space or fewer slides for a quick demo.</p>
|
| 296 |
</div>
|
| 297 |
</div>
|
| 298 |
<div id="slide-canvas-content" class="slide-canvas-content">
|
|
|
|
| 418 |
<section class="col col-debug">
|
| 419 |
<div class="card card-tall coach-debug-card">
|
| 420 |
<div class="coach-card-head">
|
| 421 |
+
<h2 class="section-label">Chat</h2>
|
| 422 |
+
<p class="status-text view-debug-only">Ask the local model — turn on RAG to ground answers in your library.</p>
|
| 423 |
</div>
|
| 424 |
<label class="toggle-row">
|
| 425 |
<span>Use ResearchMind RAG</span>
|
|
|
|
| 446 |
</label>
|
| 447 |
</div>
|
| 448 |
<div id="debug-chat-messages" class="research-chat-messages debug-chat-messages">
|
| 449 |
+
<p class="research-chat-empty">Ask the local model — turn on RAG to ground answers in your library.</p>
|
| 450 |
</div>
|
| 451 |
<div class="coach-debug-compose">
|
| 452 |
<label class="field">
|
|
|
|
| 456 |
<button type="button" id="btn-debug-send" class="btn btn-primary btn-block">Send</button>
|
| 457 |
</div>
|
| 458 |
<details class="studio-debug-trace" id="debug-trace-details">
|
| 459 |
+
<summary>Agent trace</summary>
|
| 460 |
<div id="debug-trace-panel"></div>
|
| 461 |
</details>
|
| 462 |
</div>
|
|
|
|
| 495 |
</aside>
|
| 496 |
</div>
|
| 497 |
|
| 498 |
+
<script type="module" src="/static/studio/studio.js?v={{STUDIO_ASSET_VERSION}}"></script>
|
| 499 |
</body>
|
| 500 |
</html>
|
apps/gradio-space/static/studio/studio.css
CHANGED
|
@@ -436,6 +436,12 @@ body.sidebar-open {
|
|
| 436 |
|
| 437 |
.controls-actions { display: flex; justify-content: flex-end; margin-top: 0.75rem; }
|
| 438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
.region-loading-host,
|
| 440 |
.card-ingest,
|
| 441 |
.card-chat,
|
|
@@ -1779,14 +1785,24 @@ body.sidebar-open {
|
|
| 1779 |
|
| 1780 |
.workspace[data-view="debug"] {
|
| 1781 |
grid-template-columns: 1fr;
|
| 1782 |
-
max-width:
|
| 1783 |
margin-left: auto;
|
| 1784 |
margin-right: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1785 |
}
|
| 1786 |
|
| 1787 |
.debug-chat-messages {
|
| 1788 |
-
min-height:
|
| 1789 |
-
max-height:
|
| 1790 |
}
|
| 1791 |
|
| 1792 |
.lessons-rail-card .field + .field {
|
|
|
|
| 436 |
|
| 437 |
.controls-actions { display: flex; justify-content: flex-end; margin-top: 0.75rem; }
|
| 438 |
|
| 439 |
+
.slide-demo-tip {
|
| 440 |
+
margin-top: 0.5rem;
|
| 441 |
+
font-size: 0.8125rem;
|
| 442 |
+
color: var(--on-surface-variant);
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
.region-loading-host,
|
| 446 |
.card-ingest,
|
| 447 |
.card-chat,
|
|
|
|
| 1785 |
|
| 1786 |
.workspace[data-view="debug"] {
|
| 1787 |
grid-template-columns: 1fr;
|
| 1788 |
+
max-width: 48rem;
|
| 1789 |
margin-left: auto;
|
| 1790 |
margin-right: auto;
|
| 1791 |
+
padding-left: 1rem;
|
| 1792 |
+
padding-right: 1rem;
|
| 1793 |
+
}
|
| 1794 |
+
|
| 1795 |
+
.workspace[data-view="debug"] .col-debug {
|
| 1796 |
+
width: 100%;
|
| 1797 |
+
}
|
| 1798 |
+
|
| 1799 |
+
.workspace[data-view="debug"] .coach-debug-card {
|
| 1800 |
+
min-height: calc(100vh - var(--topbar-h) - var(--context-bar-h) - 2rem);
|
| 1801 |
}
|
| 1802 |
|
| 1803 |
.debug-chat-messages {
|
| 1804 |
+
min-height: 280px;
|
| 1805 |
+
max-height: min(480px, 50vh);
|
| 1806 |
}
|
| 1807 |
|
| 1808 |
.lessons-rail-card .field + .field {
|
apps/gradio-space/static/studio/studio.js
CHANGED
|
@@ -603,7 +603,7 @@ function renderDebugChat() {
|
|
| 603 |
const container = $("#debug-chat-messages");
|
| 604 |
if (!state.debugChatHistory.length) {
|
| 605 |
container.innerHTML =
|
| 606 |
-
'<p class="research-chat-empty">
|
| 607 |
return;
|
| 608 |
}
|
| 609 |
container.innerHTML = state.debugChatHistory
|
|
@@ -1283,6 +1283,8 @@ async function generateSlides() {
|
|
| 1283 |
<a href="${fileUrl(data.downloads.docx)}" download>DOCX</a>
|
| 1284 |
<a href="${fileUrl(data.downloads.html)}" download>HTML</a>`;
|
| 1285 |
$("#btn-export").disabled = false;
|
|
|
|
|
|
|
| 1286 |
syncLayoutOffsets();
|
| 1287 |
}
|
| 1288 |
|
|
@@ -1298,7 +1300,7 @@ async function generateSlides() {
|
|
| 1298 |
},
|
| 1299 |
{
|
| 1300 |
overlayEl: $("#canvas-overlay"),
|
| 1301 |
-
hint: "
|
| 1302 |
}
|
| 1303 |
);
|
| 1304 |
}
|
|
@@ -1656,9 +1658,11 @@ function bindUi() {
|
|
| 1656 |
$("#btn-new-session").addEventListener("click", () => {
|
| 1657 |
state.workspaceSessionId = "";
|
| 1658 |
state.researchChatHistory = [];
|
|
|
|
| 1659 |
state.discoveredUrls = [];
|
| 1660 |
state.selectedUrls = [];
|
| 1661 |
renderResearchChat();
|
|
|
|
| 1662 |
renderResearchUrlChoices([], []);
|
| 1663 |
$("#workspace-session").value = "";
|
| 1664 |
$("#ingest-status").textContent =
|
|
|
|
| 603 |
const container = $("#debug-chat-messages");
|
| 604 |
if (!state.debugChatHistory.length) {
|
| 605 |
container.innerHTML =
|
| 606 |
+
'<p class="research-chat-empty">Ask the local model — turn on RAG to ground answers in your library.</p>';
|
| 607 |
return;
|
| 608 |
}
|
| 609 |
container.innerHTML = state.debugChatHistory
|
|
|
|
| 1283 |
<a href="${fileUrl(data.downloads.docx)}" download>DOCX</a>
|
| 1284 |
<a href="${fileUrl(data.downloads.html)}" download>HTML</a>`;
|
| 1285 |
$("#btn-export").disabled = false;
|
| 1286 |
+
const exportBtn = $("#btn-export");
|
| 1287 |
+
if (exportBtn) exportBtn.textContent = "Download PPTX";
|
| 1288 |
syncLayoutOffsets();
|
| 1289 |
}
|
| 1290 |
|
|
|
|
| 1300 |
},
|
| 1301 |
{
|
| 1302 |
overlayEl: $("#canvas-overlay"),
|
| 1303 |
+
hint: "First run may take several minutes on CPU; use GPU Space or fewer slides for a quick demo.",
|
| 1304 |
}
|
| 1305 |
);
|
| 1306 |
}
|
|
|
|
| 1658 |
$("#btn-new-session").addEventListener("click", () => {
|
| 1659 |
state.workspaceSessionId = "";
|
| 1660 |
state.researchChatHistory = [];
|
| 1661 |
+
state.debugChatHistory = [];
|
| 1662 |
state.discoveredUrls = [];
|
| 1663 |
state.selectedUrls = [];
|
| 1664 |
renderResearchChat();
|
| 1665 |
+
renderDebugChat();
|
| 1666 |
renderResearchUrlChoices([], []);
|
| 1667 |
$("#workspace-session").value = "";
|
| 1668 |
$("#ingest-status").textContent =
|
results/lm_eval/ensemble-jepa__manual/summary.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
# lm-eval summary
|
| 2 |
-
|
| 3 |
-
- experiment: `ensemble-jepa__manual`
|
| 4 |
-
- model backend: `ensemble-lm`
|
| 5 |
-
- base model: `/home/msg-encrypted/Documents/dev/hackathon/small-model-hackathon/models/ensemble/custom-jepa-pretrain`
|
| 6 |
-
- ensemble checkpoint: `/home/msg-encrypted/Documents/dev/hackathon/small-model-hackathon/models/ensemble/custom-jepa-pretrain`
|
| 7 |
-
- tasks: arc_easy, hellaswag
|
| 8 |
-
- num_fewshot: 0
|
| 9 |
-
- limit: 25
|
| 10 |
-
- seed: 42
|
| 11 |
-
|
| 12 |
-
| task | metric | score |
|
| 13 |
-
| --- | --- | ---: |
|
| 14 |
-
| arc_easy | acc,none | 0.5200 |
|
| 15 |
-
| hellaswag | acc,none | 0.2800 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|