File size: 1,596 Bytes
b319fc8 7f255a3 b319fc8 7f255a3 b319fc8 7f255a3 b319fc8 7f255a3 | 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 | ---
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.
|