CoolFace
Apppublic

hibbanz/cognitive-distortion-indobert

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

Cognitive Distortion Classification

This Space serves a two-stage Indonesian cognitive distortion classification pipeline trained with IndoBERT.

Required folder structure

Place the Kaggle export folder in the Space root:

text
.
├── app.py
├── requirements.txt
└── exported_model/
    ├── binary_model/
    ├── multiclass_model/
    ├── tokenizer/
    ├── threshold_config.json
    ├── metrics_summary.json
    ├── training_config.json
    ├── label_mapping.json
    ├── id2label.json
    └── label2id.json

The two required model files are:

text
exported_model/binary_model/model.safetensors
exported_model/multiclass_model/model.safetensors

Pipeline

  1. 1.Stage 1: binary detection, No Distortion vs Distortion.
  2. 2.Stage 2: multiclass classification, only executed when Stage 1 predicts Distortion.

The binary decision uses the threshold saved in:

text
exported_model/threshold_config.json

Deployment notes

For large model files, use Git LFS or the Hugging Face web uploader. The .gitattributes file in this package marks *.safetensors as large files.

This application is a text classification demo. It is not a psychological diagnosis tool.