spell / README.md
ramedde's picture
Upload 4 files
c8a6c00 verified
|
Raw
History Blame Contribute Delete
1.51 kB
---
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
1. Click **New Sentence** β€” a sentence is read aloud.
2. Type exactly what you heard in the text box.
3. Click **Submit** (or press Enter).
4. Errors are shown with strikethrough (~~wrong~~) and the **correct** word in bold.
5. 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:
1. Upload a `.gguf` model file to your Space repository (e.g. `gemma-4-E2B-it-Q4_0.gguf`).
2. Uncomment `llama-cpp-python` in `requirements.txt`.
3. 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
```
4. Set the `N_GPU_LAYERS` Space secret to `-1` (full GPU offload) or `0` (CPU only).
Without a model file the app runs fine β€” the tip section is simply hidden.
## Local development
```bash
pip install gradio gTTS
python app.py
```