Spaces:
Runtime error
Runtime error
Commit History
-
Reconcile README with code: MiniCPM-V 4.6 (multimodal/OCR), fix launch + /gradio claims, correct dep pins, add submission tags + team
Verified signature6c0c4cb -
Upload server.py with huggingface_hub
Verified signaturec1871d1 -
Upload server.py with huggingface_hub
Verified signaturee92c089 -
Upload server.py with huggingface_hub
Verified signatureb7ffc8d -
Sync from GitHub via hub-sync
Verified signature40c272a
-
Fix: server.py with HF Space guard
Verified signatureda26903 -
Fix: README with app_file=app.py
Verified signatureb323dac -
Fix: re-upload correct server.py and README.md
Verified signaturebc6b658 -
Fix: switch app_file to app.py for HF Spaces, guard uvicorn.run on Spaces
Verified signature0f9a87b -
[NAH-24] Create empty HF Space (Gradio SDK) + repo under build-small-hackathon
Arturo González Peñalozac606a4e -
[NAH-36] Custom Recall frontend (gr.Server) + JSON API over the backend (#17)
nz-nz +1: Claude Opus 4.8Unverified signature* [NAH-36] custom Recall frontend (gr.Server) + JSON API over the backend Implements the polished Recall.dc.html design from Claude Design as a custom vanilla HTML/CSS/JS frontend served by FastAPI, with a thin JSON API wrapping the existing content_pipeline + learning_engine. The learning/content logic and the schema.py data contract are treated as an API and are NOT changed. - server.py: stateless API (session stored server-side by id, so reference answers never reach the client) — /api/generate, /grade, /regenerate, /next, /recap, /restart; serves frontend/index.html; legacy Gradio UI optionally mounted at /gradio. - frontend/index.html: Upload / Study / Recap screens, reacting mascot, streak flame, per-topic mastery bars, deck rail, difficulty dial, and the signature adaptive follow-up moment (banner slide-in + injected cards popping into the deck) driven by generate_followups/add_followups. - Verified end-to-end in stub mode (API + browser): generate → grade-wrong → …1b69513 -
[NAH-35] make the recap reachable: Finish & Keep studying buttons (#16)
nz-nz +1: Claude Opus 4.8Unverified signatureThe SM-2 queue never empties, so the recap (wired only to next_card->None) was unreachable. Add a "🏁 Finish & see recap" button to the study view that renders recap on demand, and a "↩️ Keep studying" button on the recap so it isn't a dead end. No engine change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>e3a2738 -
[NAH-34] fix Gradio 6 theme placement + pin gradio version (#15)
nz-nz +1: Claude Opus 4.8Unverified signature- Move theme=gr.themes.Soft() from gr.Blocks() to demo.launch() (Gradio 6 moved the param; it was emitting a UserWarning and being ignored). - Pin gradio==6.18.0 (the version verified locally on Python 3.13) in requirements.txt, with a note to align the HF Space sdk_version and to repin + revert the theme move if the Space only supports Gradio <=5.x. - Verified app.py imports and serves (HTTP 200) in stub mode with no warnings; all other components checked against the installed Gradio skill. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>dad571c -
[NAH-32] difficulty toggle UI: make-it-harder / make-it-easier (#14)
nz-nz +1: Claude Opus 4.8Unverified signatureAdd two buttons to the study screen that rewrite the current card via cp.regenerate and re-show it. New le.replace_card swaps the card in place (deck + queue + CardState) so the queue's pop-the-front contract holds. Stretch item; depends on NAH-22 (regenerate) and NAH-31 (study screen). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>dd6592b -
[NAH-31] visual polish: card X of N progress, clearer cues (#13)
nz-nz +1: Claude Opus 4.8Unverified signatureProgress line now reads "Card X of N · ✅ answered · 🔥 Streak · left in queue" so the user always sees where they are in the deck (N grows as adaptive follow-ups are added). Correct/incorrect cues (✅/❌) and the Soft theme remain. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>14f3b0b -
[NAH-30] loading spinners on every model call + button locking (#12)
nz-nz +1: Claude Opus 4.8Unverified signatureWrap deck-generation, grading, and next/recap in show_progress="full" so a slow model call always shows a spinner — never a dead screen. Each button is disabled and relabelled (Generating…/Grading…) while its handler runs, then restored, preventing double-submits. Empty/error states from NAH-23 already surface friendly messages on the upload screen. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>9ee02d3 -
[NAH-23] handle bad inputs: empty / image-only / corrupt PDF -> clear error (#11)
nz-nz +1: Claude Opus 4.8Unverified signatureextract_text now raises ExtractionError with a user-facing message instead of crashing: no file, missing path, corrupt/password-protected PDF, image-only/scanned PDF (no selectable text), or an empty file. app.py's upload handler catches it and shows the message on the upload screen. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>28141d8 -
[NAH-22] regenerate(card, harder/easier) helper for the difficulty dial (#10)
nz-nz +1: Claude Opus 4.8Unverified signatureImplements the stretch difficulty helper backing the UI toggle (NAH-32): rewrites a card to a higher/lower difficulty on the same concept, grounded in the same source_chunk, via chat_json (validator + repair retry). Always returns a valid Card, falling back to the original on any failure so the study loop never breaks. Stub mode returns a tagged variant for demoing. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>8405d2b -
[NAH-21] tighten generation prompt: ground questions in the passage (#9)
nz-nz +1: Claude Opus 4.8Unverified signatureAdd explicit grounding rules to the deck-generation system prompt: every question and reference answer must be answerable from the passage alone, no invented facts/names/numbers, fewer questions over hallucinated ones, and answers should reuse the passage's wording. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>35d4f0c -
[NAH-20] de-dupe near-identical questions + drop low-quality cards (#8)
nz-nz +1: Claude Opus 4.8Unverified signature_dedupe now normalizes questions (lowercase, strip punctuation, collapse whitespace) so near-identical questions collapse to one, and drops cards whose question/answer is too short to be useful. Quality over quantity. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>f428148 -
[NAH-18] generate_deck: add repair-retry to per-chunk JSON parsing (#7)
nz-nz +1: Claude Opus 4.8Unverified signatureRoute card generation through llm.chat_json (validator + one repair pass) instead of a single chat()+extract_json. A malformed reply is fed back to the model demanding clean JSON before the chunk is skipped, so bad model output never crashes the deck. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>194d241 -
Merge pull request #6 from francisco-magana/hygienepile-0k/nah-15-write-the-model-section-of-the-readme
nz-nzUnverified signature[NAH-15] README: add the model sectionba1c355 -
Merge pull request #5 from francisco-magana/hygienepile-0k/nah-9-1b-fallback-ready-as-a-config-flip-bring-to-day-1-400-sync
nz-nzUnverified signature[NAH-9] Smaller-model fallback as a one-env-var config flip4dcd40b -
Merge pull request #4 from francisco-magana/hygienepile-0k/nah-13-weak-topic-targeting-bias-queue-toward-low-grade-topics
nz-nzUnverified signature[NAH-13] Weak-topic targeting: bias next_card toward low-grade topics9632a81 -
Merge pull request #3 from francisco-magana/hygienepile-0k/nah-8-grade_answer-strict-json-grading-parserrepair-retry
nz-nzUnverified signature[NAH-8] grade_answer: strict-JSON grading + parser/repair retrybed0974 -
[NAH-15] README: add the model section
Document MiniCPM4.1-8B, the two places the model is load-bearing (grading + adaptive follow-ups), how inference is served (single chat() wrapper, ZeroGPU, lazy bf16 load, tight max_tokens, defensive JSON), stub mode, and the RECALL_MODEL fallback config flip. Ready to fold into Arturo's full README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>3e12ddf -
[NAH-9] Make the smaller-model fallback a one-env-var config flip
RECALL_MODEL now resolves through a MODELS alias table (8b default, 1b fast fallback, 4b Tiny Titan); unknown values pass through as a literal HF id, so a slow/OOM Space can swap to MiniCPM5-1B with `RECALL_MODEL=1b` and no code change. Add active_model() + a load-time log line so we can see which model the Space actually loaded at the 4:00 sync. Note: code-side flip only — live-Space latency/OOM verification is the runtime half of NAH-9 and still needs the deployed Space. Tests (test_model_config.py, no GPU): alias resolution, full-id passthrough. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>385ea21 -
[NAH-13] Weak-topic targeting: bias next_card toward low-grade topics
next_card now looks at the next few due cards and surfaces the one whose topic has the lowest average grade so far (when that topic is actually weak, avg < 3). The chosen card is rotated to the front so apply_result's "pop the front" contract still holds. No-op until there's answer history, so early cards keep normal order. Tests (test_weak_topic.py, no model): no-history order, weak topic surfaced, lookahead window respected, apply_result contract preserved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>ab8e02f
-
Merge pull request #2 from francisco-magana/franciscomaganacontact/nah-16-commit-content_pipelinepy-stubs
Francisco MagañaUnverified signature[NAH-16] Commit content_pipeline.py stubs22364b0 -
[NAH-8] grade_answer: strict-JSON grading + parser/repair retry
Add a reusable llm.chat_json() helper that parses the model reply as JSON and, on failure, feeds the bad reply back once with a "return ONLY JSON" nudge before giving up (returns None). Wire grade_answer() to it with strict score validation (numeric, 0-5) and a neutral safe default so malformed model output never crashes the study loop. Tests (test_grade_answer.py, no GPU — chat() monkeypatched): clean JSON, repair-retry recovery, safe default when never valid, out-of-range score. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>560c197 -
[NAH-16] Commit content_pipeline.py stubs
8eb7774 -
Merge pull request #1 from francisco-magana/franciscomaganacontact/nah-17-extract_text-pdf-pastedtxt-length-based-chunker
Francisco MagañaUnverified signature[NZH-17] extract_text (PDF + pasted/.txt) + length-based chunkera51440e -
[NZH-17] extract_text (PDF + pasted/.txt) + length-based chunker
07659df -
Add app, content pipeline, learning engine, and gitignore
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>f31d2d4 -
first commit
2610fbc