Skip to content

Repository files navigation

English Quiz Tutor Overlay

English Quiz Tutor Overlay is a local Windows desktop app for practicing English quiz questions. It lets you select a screen region, captures the quiz question, runs OCR, sends the editable text to a local Ollama model, and shows concise English answers in an always-on-top tutor window.

This app is for learning, review, and understanding mistakes. It does not include stealth behavior, proctoring bypasses, website automation, automatic clicking, or automatic answer selection.

System Requirements

  • Windows 10/11
  • Python 3.10+
  • 16 GB RAM recommended
  • Ollama installed locally
  • Tesseract OCR installed locally
  • GPU is optional. Ollama decides whether it can use your GTX 1650 or CPU.

Install Ollama

  1. Install Ollama from https://ollama.com
  2. Pull the default model:
ollama pull qwen2.5:3b
  1. Start Ollama if it is not already running:
ollama serve

The app calls Ollama at http://localhost:11434/api/generate.

Install Tesseract OCR on Windows

Install Tesseract OCR for Windows, then either add it to PATH or set TESSERACT_CMD in .env.

Example:

TESSERACT_CMD=C:\Program Files\Tesseract-OCR\tesseract.exe

If Tesseract is missing, the app will show a friendly OCR error instead of crashing.

Setup

pip install -r requirements.txt
copy .env.example .env
python main.py

You can also create config.json, but .env is the simplest option.

Configuration

.env.example contains the default settings:

OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=qwen2.5:3b
OCR_ENGINE=tesseract
TESSERACT_CMD=
OCR_LANGUAGE=eng
OCR_UPSCALE_FACTOR=2
TESSERACT_PSM=6
REQUEST_TIMEOUT_SECONDS=90

Settings can also be changed inside the app with the Settings button. The app writes those changes to .env.

To change the Ollama model, edit OLLAMA_MODEL in .env or use Settings in the app. Pull the model first, for example:

ollama pull qwen2.5:3b

How to Use

  1. Open the quiz you want to practice.
  2. Run python main.py.
  3. Click Capture Quiz.
  4. Drag a rectangle around the quiz question.
  5. The app runs OCR and automatically gets the answer by default.
  6. If OCR is wrong, edit the OCR text and click Get Answer again.

Answer Format

The main screen is intentionally simple: capture the quiz, check/edit OCR text if needed, then get the answer. Tutor responses are generated in English by default and the app shows only the Answer / Sample responses: section.

Screenshots are saved in captures/.

Troubleshooting

Ollama offline

Run:

ollama pull qwen2.5:3b
ollama serve

Then press Settings or restart the app to re-check the status.

Tesseract not found

Install Tesseract OCR and set TESSERACT_CMD in .env if it is not on PATH.

OCR text is wrong

Try selecting a tighter region, zooming the quiz page, or editing the OCR text manually before clicking Get Answer. The app preprocesses screenshots by enlarging, increasing contrast, sharpening, and binarizing the image before sending it to Tesseract. If OCR is still poor, try increasing OCR_UPSCALE_FACTOR to 3 or changing TESSERACT_PSM to 4, 6, or 11 in .env.

Capture fails

Run the app in a normal unlocked Windows desktop session. Remote, sandboxed, or protected desktop environments can block screen capture APIs.

Model replies slowly

Use a smaller Ollama model, close other GPU/CPU-heavy apps, or increase REQUEST_TIMEOUT_SECONDS in .env.

Ethical Use

Use this app only for English learning, quiz practice, and reviewing mistakes. Do not use it to cheat on exams, bypass supervision, hide from proctoring tools, or automate answers on websites or other apps.

Developer Notes

Main modules:

  • main.py: application entrypoint
  • overlay_ui.py: PySide6 UI
  • screen_capture.py: region selection and screenshot capture
  • ocr.py: OCR adapter
  • ollama_client.py: Ollama HTTP client
  • prompts.py: tutor prompt template
  • config.py: .env and config.json loading

TODO: add an EasyOCR adapter behind the same OCR interface if Tesseract quality is not enough.

About

A local Windows desktop overlay that captures English quiz questions from the screen, extracts text with OCR, and generates concise answer suggestions using a local Ollama model.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages