Downloads · 30 days
8
8% of all-time downloads
RaxzellMornov/depression-bert
depression-bert is a text classification model from RaxzellMornov. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Fine-tuned BERT model for binary classification of depressive vs. non-depressive tweets.
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
104
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
Fine-tuned BERT model for binary classification of depressive vs. non-depressive tweets.
Google original BERT base uncased. Solid baseline performance.
| Label | ID |
|---|---|
| Non-Depressive | 0 |
| Depressive | 1 |
| Metric | Value |
|---|---|
| F1 Score | 0.9073 |
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])
SentiMind is intended for research and educational purposes only. It should not be used as a substitute for professional mental health diagnosis.