avatarAPI / README.md
SondosM's picture
Upload 10 files
7f255a3 verified
---
title: Arabic Sign Language NLP API
emoji: 🤟
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---
# Arabic Sign Language NLP API
Translates Arabic text (Fus-ha and Ammiya) into sign animation sequences.
## Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | `/` | Health check — returns model info and sign count |
| POST | `/translate` | Translate Arabic text (JSON body) |
| GET | `/translate?text=...` | Quick translate via URL param |
| GET | `/signs` | List all signs in the database |
| GET | `/sequence-file` | Read the last saved sequence file |
## POST /translate
```json
{
"text": "انا عايز اروح المدرسة",
"save_sequence": false
}
```
**Response:**
```json
{
"status": "success",
"input_text": "انا عايز اروح المدرسة",
"sequence": ["انا", "يريد", "يذهب", "مدرسة"],
"total_steps": 4,
"sign_count": 4,
"letter_count": 0,
"missing_keypoint_files": [],
"detailed_plan": [...]
}
```
## Setup
1. Upload your `arabic_sign_lang_features.csv` to the Space files.
2. (Optional) Upload your `keypoints/` folder for `.npy` validation.
3. Set `CSV_PATH` env variable if your CSV has a different name.
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `CSV_PATH` | `arabic_sign_lang_features.csv` | Path to sign label CSV |
| `KEYPOINTS_FOLDER` | `keypoints` | Folder with .npy files |
| `SIMILARITY_THRESHOLD` | `0.72` | AraBERT match threshold |
## Interactive Docs
Visit `/docs` for the Swagger UI.