Spaces:
Sleeping
Sleeping
File size: 3,782 Bytes
583bc4b 5dca017 583bc4b 8d53c2a 583bc4b f8e1a1c 720dfc2 f8e1a1c 720dfc2 f8e1a1c 720dfc2 f8e1a1c 720dfc2 f8e1a1c 720dfc2 f8e1a1c 720dfc2 f8e1a1c 583bc4b f8e1a1c 583bc4b f8e1a1c 583bc4b f8e1a1c 583bc4b f8e1a1c 5dca017 f8e1a1c 5dca017 583bc4b f8e1a1c cc40ef5 f8e1a1c cc40ef5 f8e1a1c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | ---
title: ECHO TUTOR PRO
emoji: 'π£οΈ'
colorFrom: blue
colorTo: indigo
sdk: docker
app_file: app.py
pinned: false
---
# ECHO TUTOR PRO π£οΈ
An AI-powered English language tutor with a premium, immersive interface. Practice natural English conversation with real-time corrections, suggestions, and adaptive difficulty.
## β¨ Features
- **Streaming AI Responses** β Real-time token-by-token response rendering via SSE
- **Adaptive Difficulty** β Beginner, Intermediate, and Advanced levels
- **Conversation Topics** β 8 curated topics: Free Talk, Travel, Food, Tech, Movies, Sports, Work, Daily Life
- **Premium UI** β Glassmorphism design, animated particle background, 3D orb avatar
- **Voice Interaction** β Real-time Speech-to-Text (STT) and Text-to-Speech (TTS)
- **Audio Waveform** β Live microphone visualization using Web Audio API
- **Smart Corrections** β AI provides inline corrections and vocabulary suggestions
- **PWA Support** β Installable as a Progressive Web App
- **Session Persistence** β Conversation history saved across page refreshes
- **Keyboard Shortcuts** β Ctrl+M (mic), Enter (send), Escape (end)
## π Quick Start
### 1. Clone the repository
```bash
git clone <your-repo-url>
cd echo-tutor
```
### 2. Set environment variable
```bash
export NVIDIA_API_KEY="your-api-key-here"
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Run locally
```bash
python app.py
```
Open `http://localhost:7860` in your browser.
## Auth + Nova Integration (Production Runtime)
- Production runtime for `PROJECT_APP` is Flask via `app.py` (not `main.py`).
- Auth pages are served as standalone routes:
- `/signup`
- `/verify`
- `/login`
- Auth API is mounted under `/auth` from `auth_module.flask_auth_routes`.
- Signup/request-otp generates local OTP and pushes it to Nova when configured:
- `POST /api/external/push-otp` on Nova
- `GET /api/external/check-verified` on Nova
Required env keys for integration:
- `NOVA_API_URL`
- `NOVA_API_KEY`
- `APP_ID`
- `JWT_SECRET_KEY`
To route auth through Nova centrally, set:
- `AUTH_MODE=central`
- `AUTH_PROXY_TIMEOUT_SECONDS=15`
## π³ Docker
```bash
docker build -t echo-tutor .
docker run -p 7860:7860 -e NVIDIA_API_KEY="your-key" echo-tutor
```
## π Project Structure
```
echo-tutor/
βββ app.py # Flask backend with streaming SSE
βββ config.py # Configuration (levels, topics, API settings)
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker container configuration
βββ Procfile # Gunicorn process file
βββ templates/
β βββ index.html # Main application template
βββ static/
βββ css/style.css # Premium glassmorphism design system
βββ js/script.js # Application engine (SSE, particles, waveform)
βββ manifest.json # PWA manifest
βββ service-worker.js
βββ icons/
βββ icon-192.png
βββ icon-512.png
```
## π§ API Endpoints
| Endpoint | Method | Description |
| -------------- | ------ | ------------------------------------ |
| `/` | GET | Main application page |
| `/chat` | POST | Non-streaming chat endpoint |
| `/chat/stream` | POST | SSE streaming chat endpoint |
| `/topics` | GET | Available topics & difficulty levels |
| `/health` | GET | Health check with uptime |
## π Deploy on Hugging Face Spaces
1. Push to your HF Space repository
2. Set `NVIDIA_API_KEY` as a Space secret
3. The app runs automatically via Docker
For more: <https://huggingface.co/docs/hub/spaces-config-reference>
|