Downloads · 30 days
15
3% of all-time downloads
TRT1000/depression-detection-model
depression-detection-model is a text classification model from TRT1000. Use it when you need a label for a piece of text. The card lists the license as mit.
This model is a fine-tuned version of distilbert-base-uncased for binary depression classification based on Reddit and mental health-related posts.
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
444
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased for binary depression classification based on Reddit and mental health-related posts.
The datasets were cleaned to remove rows with missing text, labels were binarized (0 = not depressed, 1 = depressed), and duplicates were removed.
| Metric | Value |
|---|---|
| Loss | 0.0631 |
| Samples/sec | 85.56 |
| Steps/sec | 5.35 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
model = AutoModelForSequenceClassification.from_pretrained("your-username/depression-detection-model")
tokenizer = AutoTokenizer.from_pretrained("your-username/depression-detection-model")
inputs = tokenizer("I feel sad and hopeless", return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_class = torch.argmax(logits).item()
print("Prediction:", predicted_class)