thePixel42/depression-detection
Viewer β’ Updated β’ 200k β’ 198 β’ 2
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)