Spaces:
Runtime error
Runtime error
| title: Arabic Complaint Classification API | |
| emoji: 🔍 | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| app_port: 7860 | |
| Production-grade Arabic complaint classification: three MARBERT-v2 classifiers (sentiment, topic, intent) plus a deterministic routing engine and optional LLM explanation layer. | |
| **Source code:** [github.com/ysfxjo55/arabic-complaint-classification-api](https://github.com/ysfxjo55/arabic-complaint-classification-api) | |
| ## API | |
| | Endpoint | Method | Description | | |
| |----------|--------|-------------| | |
| | `/predict` | POST | Classify a complaint (sentiment, topic, intent, action) | | |
| | `/explain-classification` | POST | Same as `/predict` plus optional LLM explanation | | |
| | `/health` | GET | Liveness check | | |
| | `/ready` | GET | Readiness check (models loaded) | | |
| | `/docs` | GET | OpenAPI Swagger UI | | |
| ### Example | |
| ```bash | |
| curl -X POST https://Ysfxjo-arabic-complaint-classification.hf.space/predict \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"text": "التطبيق يعلق عند الدفع ومحدش يرد عليّ"}' | |
| ``` | |
| Set `HF_TOKEN` in Space secrets so the container can download the three MARBERT models from Hugging Face Hub on startup. | |