Spaces:
Sleeping
Sleeping
|
Download README.md from moshabann/echo-tutor: direct link, hf CLI and curl.
- Browser
- Download file 3.78 kB
-
https://huggingface.co/spaces/moshabann/echo-tutor/resolve/main/README.md
- Command line
-
hf download hf://spaces/moshabann/echo-tutor/README.md
-
curl -L -o README.md https://huggingface.co/spaces/moshabann/echo-tutor/resolve/main/README.md
3.78 kB
| 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> | |