math-sight-reading / README.md
SoulFireMage's picture
Space config and readme
4b8efea verified
|
Raw History Blame Contribute Delete
1.97 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade
metadata
title: Mathematical Sight-Reading
emoji: 🎼
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.29.0
python_version: '3.11'
app_file: app.py
pinned: false
hf_oauth: true
short_description: Drill reading dense maths notation like sheet music

Mathematical Sight-Reading Framework (MSRF)

Train mathematical literacy by treating notation like sheet music: decode the symbols, explain the structure, then ground it in more than one domain.

You get a naked formula (no name, no context). You answer in three parts (formal sight-reading, concept and mechanics, application and metaphor). A judge model scores Precision (0-10), Concept (Superficial / Competent / Exemplary) and Transfer (A / B / C), then shows what you missed and an exemplary sight-read.

How it works

  • Formula bank (bank.py): 16 formulas over four tiers, each with a hidden reference sight-read. The judge grades against that reference, not its own memory, which is what keeps scoring stable. Add formulas by appending to the list.
  • Adaptive tiers (engine.py): rolling mean of your composite score moves you up or down a tier. Plain code, no LLM involved.
  • Spaced repetition: poorly answered formulas return after a few drills (Leitner boxes).
  • Hint ladder: hint 1 = types, hint 2 = mechanics. Each costs 0.1 of the composite.
  • Weak-spot report and export/import on the Progress tab.
  • Judge (judge.py): your own OpenRouter key, any model id. Default set with the JUDGE_MODEL variable; dropdown choices with JUDGE_MODELS (comma separated).

Privacy

Your key, progress and model choice live in your browser's localStorage. The key passes through the Space server in memory only to make the OpenRouter call; it is not logged or stored.

Tests

pip install gradio pytest playwright itsdangerous authlib
python -m pytest tests/test_core.py
python tests/test_ui.py      # browser test against a fake OpenRouter