CoolFace
Apppublic

vineet88/context-aware-safety-ml-api

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

SafeChat ML Service

FastAPI-based toxicity classification and detoxification service for English, Hindi, and Hinglish.

What This Space Exposes

  • —GET / service metadata
  • —GET /docs interactive API docs
  • —POST /api/v1/moderate toxicity classification with polite suggestions
  • —POST /api/v1/moderate/batch batch moderation
  • —POST /api/v1/detoxify detoxification-only endpoint
  • —GET /api/v1/health and GET /api/v1/ready health 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/IndicBART can still be enabled by setting SAFECHAT_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.
vineet88/context-aware-safety-ml-api · CoolFace