vineet88/context-aware-safety-ml-api
0
SafeChat ML Service
FastAPI-based toxicity classification and detoxification service for English, Hindi, and Hinglish.
What This Space Exposes
GET /service metadataGET /docsinteractive API docsPOST /api/v1/moderatetoxicity classification with polite suggestionsPOST /api/v1/moderate/batchbatch moderationPOST /api/v1/detoxifydetoxification-only endpointGET /api/v1/healthandGET /api/v1/readyhealth endpoints
Model Setup
- Toxicity classifier:
vineet88/safechat-muril-toxicity-finetuned - Detoxifier: template fallback enabled by default in the Space for faster startup on CPU
- Optional detox model:
ai4bharat/IndicBARTcan still be enabled by settingSAFECHAT_USE_MODEL_DETOX=true
Notes
- The Space is packaged as a Docker Space.
- The container listens on port
8000. - The root endpoint returns JSON. API docs are available at
/docs. - The Space pulls the fine-tuned MuRIL checkpoint from a separate Hugging Face model repo at runtime.
- The default Space configuration favors faster boot over heavy seq2seq model loading.
