Spaces:
Running on Zero
Download README.md from ManasT2485/readloops: direct link, hf CLI and curl.
- Browser
- Download file 8.31 kB
-
https://huggingface.co/spaces/ManasT2485/readloops/resolve/main/README.md
- Command line
-
hf download hf://spaces/ManasT2485/readloops/README.md
-
curl -L -o README.md https://huggingface.co/spaces/ManasT2485/readloops/resolve/main/README.md
title: ReadLoops
emoji: 🐼
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 6.33.0
python_version: '3.12'
app_file: react_space.py
pinned: false
license: mit
short_description: A reading tutor for adults practising English or Greek.
ReadLoops
A reading practice demo for adults aged 18 and older, in English and Greek. Choose a passage, read aloud, review the transcript, correct possible word differences and complete an exercise. Typed practice also works. Text differences do not establish pronunciation errors.
Open ReadLoops · Hugging Face Space
The original interface
This Space serves the original ReadLoops React application. Its sidebar, passage cards, reading screens, colors, fonts, buttons, icons and panda artwork come from the local project. Gradio provides the ZeroGPU event bridge behind the interface. The React build is served inside a same-origin frame to isolate it from Gradio styles. No separate frontend hosting or font CDN is needed.
DESIGN_MANIFEST.json records hashes for the unchanged CSS, icons, artwork, font-loading entry point and favicon. Hosted wording and the API transport are adapted to the public environment. The local application remains separate and unchanged by this deployment.
What is included
- English and Greek practice, transcript review and authored exercises.
- Separate progress and policy histories for each language.
- Original fixed, epsilon-greedy, LinUCB and randomized comparison modes.
- Delayed reading-outcome rewards and offline policy estimates, with their original limitations.
- Evaluation passages excluded from policy training and marked seen for the current visit.
- Recording upload, transcription jobs, cancellation, retry and stale-result rejection.
- Per-visitor SQLite databases held in memory. No shared learner database or enrolled pilot data.
The local application has durable storage, a CPU process supervisor, Docker, Prometheus and separate pilot tools. This public demo does not claim the same durability or local benchmark results.
Consent and temporary data
Adult confirmation is required before starting a reading session. Recording consent is required before sending audio to Hugging Face. Recording initially happens in the browser; upload occurs only after consent. Avoid personal information. This demo does not train models on visitor recordings.
Each visitor receives an unguessable bearer token stored in browser session storage. The server uses that token to select a separate in-memory SQLite database. API calls, recordings, session IDs and policy exports are scoped to that database. An anonymous token is not a user account; do not share it or store sensitive material in this demo.
Progress survives a reload in the same tab while the visit remains available. It expires after one hour without an API request, or on a Space restart. A cleanup task checks expired visits every minute. Closing a tab does not promise immediate server deletion. Pending browser drafts use session storage. Use Progress to delete an individual session and recording; deleting an evaluation session keeps its exposure marker for the remainder of the visit.
Limits: 32 concurrent visitor profiles, 40 sessions per visit, 24 MiB of stored recordings per visit, and 12 MiB or 120 seconds per recording. A full demo returns a retry message. No recordings or visitor databases are included in the source package. Hosting infrastructure has its own operational logging and policies.
Speech inference
The adapter uses openai/whisper-medium, pinned to revision abdf7c39ab9d0397620ccaea8974cc764cd0953e. The model card declares Apache-2.0. Weights use safetensors and remote model code is disabled.
Audio is decoded with PyAV into bounded 16 kHz mono samples before requesting the GPU. Inference uses PyTorch FP16, beam size 5, 30-second chunks with overlap, an explicit English or Greek transcription task and no passage prompt. Model CUDA placement happens during startup, as required by the current ZeroGPU guidance. Clips up to 30 seconds request a 30-second GPU allocation; longer clips request 60 seconds. The platform can scale this allocation for its hardware. Shared queues and free daily quotas apply. CPU thread pools and subprocess data loaders are disabled in the forked worker, along with unsupported automatic compilation.
The frontend creates a job through its authenticated API. A same-origin frame message triggers the Gradio event; the server checks the visitor and job again before inference. Cancellation invalidates the completion token. A GPU call already running may continue, but an invalidated result cannot replace the current recording. Errors retain the recording for retry or typed practice. In-memory jobs do not survive Space restarts.
This PyTorch adapter differs from the local CTranslate2 CPU engine. Local accuracy and latency measurements are not hosted measurements. No hosted benchmark or validated calibration is bundled. Recognition output always requires review before speech-based word comparisons.
Policy limitations
The original policies and authored exercises are reused. Each visitor learns only from their own history, separately by language. Evaluation sessions do not train the policies. The delayed policy uses the next different, reviewed practice reading as a noisy proxy; it does not train from first-answer correctness. The older adaptive practice mode uses exercise correctness and is labelled separately in the interface.
There are two practice and two evaluation passages per language. This small content set demonstrates the mechanisms, not a calibrated curriculum or proven learning benefit. Repeated sessions from one visit are dependent. No policy winner or causal reading improvement is claimed. Expiry and restarts erase exposure tracking, so unseen status cannot be established across separate visits.
Local preview
From this Space checkout in PowerShell:
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install gradio==6.33.0 sqlmodel==0.0.50 numpy==2.4.6 av==18.1.1
cd frontend
npm ci
npm run build
npm test
cd ..
$env:READLOOPS_TEXT_ONLY = '1'
.\.venv\Scripts\python.exe react_space.py
Open http://127.0.0.1:7860. Text-only mode loads no model, rejects transcription requests and reports the speech model as not ready. It does not simulate inference. Do not set READLOOPS_TEXT_ONLY on the hosted Space when enabling speech.
Run the public API tests with:
.\.venv\Scripts\python.exe -m unittest discover -s tests -p test_space.py -v
Desktop browser checks use node tests/react-browser.mjs against the local preview. They use typed passages and isolated browser contexts, not a microphone.
Upload and hosted verification
Use the Gradio SDK and free ZeroGPU hardware. No paid endpoint, rented GPU, domain or external service is required. Eligibility and free quotas are documented by Hugging Face. GPU availability is not guaranteed.
package_space.py builds a source-and-assets upload folder with an explicit file list and hash manifest. Its default destination is dist/react-space. It refuses an existing destination; for a later build, pass a new directory under dist. The frontend build and fonts are included so the Space does not need Node during startup. Upload the contents of this folder to the Space root. The earlier dist/space Gradio prototype is superseded and must not be uploaded.
The Space is public and its original React interface has passed desktop checks for English and Greek typed sessions, reload recovery and visitor isolation. GPU transcription is subject to shared availability and free quotas. Failed requests retain the recording for retry during the visit; typed practice remains available. See VALIDATION.md for the speech checks and remaining limitations.
Licenses
ReadLoops code, passages and original panda artwork: MIT. Dependencies, model weights and bundled fonts retain their own licenses. See THIRD_PARTY.md and licenses/. ReadLoops is not affiliated with Duolingo.