A newer version of the Gradio SDK is available: 6.20.0
metadata
title: Spelling Practice
emoji: π
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 4.40.0
app_file: app.py
pinned: false
license: mit
Spelling Practice π
An interactive English spelling trainer powered by gTTS (audio) and optionally Gemma (AI tips).
How to use
- Click New Sentence β a sentence is read aloud.
- Type exactly what you heard in the text box.
- Click Submit (or press Enter).
- Errors are shown with strikethrough (
wrong) and the correct word in bold. - Get 3 correct answers in a row to level up.
Difficulty levels
| Level | Label |
|---|---|
| 1 | π’ Beginner |
| 2 | π΅ Intermediate |
| 3 | π Advanced |
| 4 | π΄ Expert |
Multi-user support
Every browser session gets its own isolated state via gr.State.
Concurrent users don't share or interfere with each other.
Optional: AI Tips with Gemma
To enable in-app spelling tips from a local LLM:
- Upload a
.ggufmodel file to your Space repository (e.g.gemma-4-E2B-it-Q4_0.gguf). - Uncomment
llama-cpp-pythoninrequirements.txt. - If your Space has a GPU, replace the pip line with the CUDA wheel:
llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121 - Set the
N_GPU_LAYERSSpace secret to-1(full GPU offload) or0(CPU only).
Without a model file the app runs fine β the tip section is simply hidden.
Local development
pip install gradio gTTS
python app.py