CoolFace
Apppublic

SkinsenseAI26/skinsense-scalp

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

SkinSense Scalp Analyzer API

FastAPI service that runs 6 TensorFlow models on a scalp image and returns condition scores: dandruff, density, thickness, buildup, shine, redness.

Endpoints

GET /

Health check.

POST /predict

Multipart form upload — analyzes a scalp image.

Headers

  • —x-api-key: <SCALP_API_KEY> (required if secret is set in Space settings)

Body

  • —image: file (JPEG / PNG / WebP, max 5MB)

Response

json
{
  "scores": {
    "dandruff": 0.71,
    "density": 0.42,
    "thickness": 0.55,
    "buildup": 0.31,
    "shine": 0.62,
    "redness": 0.18
  },
  "labels": {
    "dandruff": "High",
    "density": "Medium",
    "thickness": "Medium",
    "buildup": "Low",
    "shine": "Medium",
    "redness": "Low"
  },
  "recommendations": [
    "Anti-dandruff treatment recommended"
  ]
}

Configuration (Space → Settings → Variables and secrets)

NameTypePurpose
SCALP_API_KEYSecretAPI key required on /predict
CORS_ALLOWED_ORIGINSVariableComma-separated allowed origins (default *)

Example

bash
curl -X POST \
  -H "x-api-key: $SCALP_API_KEY" \
  -F "image=@scalp.jpg" \
  https://<user>-skinsense-scalp.hf.space/predict