Downloads · 30 days
11
7% of all-time downloads
techhy/mindtrack-mental-health-analyzer
mindtrack-mental-health-analyzer is a text classification model from techhy. 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.
MindTrack is a fine-tuned DistilBERT model specifically trained for mental health sentiment analysis and risk detection in text content. The model can classify text into two categories:
Downloads · 30 days
11
7% of all-time downloads
All-time downloads
153
Public
Parameters
67M
268 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
MindTrack is a fine-tuned DistilBERT model specifically trained for mental health sentiment analysis and risk detection in text content. The model can classify text into two categories:
The model achieves the following performance on the validation set:
The model was trained on a perfectly balanced dataset.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_id = "techhy/mindtrack-mental-health-analyzer"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
# Example usage
text = "I am feeling great today!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probabilities = torch.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(probabilities, dim=-1).item()
confidence = probabilities[0][predicted_class].item()
labels = {0: "Normal", 1: "Risk Detected"}
print(f"Prediction: {labels[predicted_class]} (Confidence: {confidence:.2%})")
This model is designed to assist in identifying potential mental health concerns in text content. Important: This tool should not replace professional medical advice or diagnosis. Always consult qualified healthcare professionals for mental health issues.
The model was trained on a carefully curated dataset of mental health-related text, including:
If you use this model in your research or applications, please cite:
@misc{mindtrack2024,
title={MindTrack: Mental Health Sentiment Analyzer},
author={Soham},
year={2024},
url={https://huggingface.co/techhy/mindtrack-mental-health-analyzer}
}
For questions or issues, please open an issue on the GitHub repository.