Text Classification
Transformers
Safetensors
English
bert
depression-detection
mental-health
Eval Results (legacy)
text-embeddings-inference
Instructions to use RaxzellMornov/depression-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RaxzellMornov/depression-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="RaxzellMornov/depression-bert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("RaxzellMornov/depression-bert") model = AutoModelForSequenceClassification.from_pretrained("RaxzellMornov/depression-bert") - Notebooks
- Google Colab
- Kaggle
BERT - SentiMind
Fine-tuned BERT model for binary classification of depressive vs. non-depressive tweets.
Model Description
Google original BERT base uncased. Solid baseline performance.
| Label | ID |
|---|---|
| Non-Depressive | 0 |
| Depressive | 1 |
Performance
| Metric | Value |
|---|---|
| F1 Score | 0.9073 |
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "RaxzellMornov/depression-bert"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
text = "I feel so empty and hopeless."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class = logits.argmax(-1).item()
labels = {0: "Non-Depressive", 1: "Depressive"}
print(labels[predicted_class])
Training Details
- Task: Binary sequence classification
- Framework: PyTorch + Hugging Face Transformers
- Fine-tuned on: Depressive Twitter dataset
Disclaimer
SentiMind is intended for research and educational purposes only. It should not be used as a substitute for professional mental health diagnosis.
- Downloads last month
- 34
Evaluation results
- F1 Scoreself-reported0.907