Spaces:
Running on Zero
Running on Zero
Commit History
-
Add opt-in usage telemetry to a private HF dataset
Logs upload, translate, edit, download, navigate, resume, and prompt events to billingsmoore/stui-usage, gated by a per-session opt-out checkbox in Settings and disclosed on the landing page. Also stops tracking CLAUDE.md and any .claude/ directory — those are local development aids now, not shared repo content. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>04721fb
-
Translate one segment at a time for the local CPU backend
Batching doesn't help on CPU the way it does on GPU: a single sequence's matmuls already use all available threads, so grouping several segments into one generate() call just pads shorter ones to the longest in the group (wasted compute) and delays every result in the group until the slowest one finishes. Looping one at a time removes that padding waste and lets the UI show each translation as soon as it's ready, with per-segment progress and stop-checking instead of per-chunk. OpenRouter's batched path (which has a real reason to batch: fewer HTTP round-trips and shared "preceding" context) is unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>2cf98f7 -
Shrink translation batch size so results appear incrementally during Translate All
Previously _BATCH_SIZE (25) matched a full page, so with <=25 segments the whole page translated in a single call/inference pass and all translations appeared at once at the end. Smaller batches mean the UI's polling loop (which already re-renders the page every 0.5s) picks up newly finished segments in waves as each batch completes, instead of only after the last one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>a8287eb -
Switch translation backend from Gemini to OpenRouter, add test suite
Replaces the Gemini API integration with OpenRouter: the model dropdown is now live-fetched from OpenRouter's catalog with a small curated set of recommended models pinned to the top (also used as OpenRouter's server-side model fallback chain). Adds a pytest suite covering chunking, file I/O, prompt storage, the OpenRouter backend, the backend dispatcher, the local CPU backend, and the Gradio handlers/app wiring, plus sample Tibetan input files (txt/docx/pdf) used as test fixtures. Also adds a pre-push git hook that runs the suite and blocks the push on failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>36fc86c -
Enable ZeroGPU on local backend, remove deprecated Docker files
HF requires at least one @spaces.GPU function to boot a gradio-sdk Space on ZeroGPU hardware; decorate the local model's translate_batch and move tensors to cuda when available. Drop the unused Dockerfile now that the Space runs on the gradio SDK instead of docker. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>9e83c68 -
Initial simplified TranslationUI: plain-text upload/download, single Buddhist translation prompt, Gemini or local CPU model
88a619b