Instructions to use youssef1232/phq9-free-text-scoring with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use youssef1232/phq9-free-text-scoring with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="youssef1232/phq9-free-text-scoring")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("youssef1232/phq9-free-text-scoring") model = AutoModelForSequenceClassification.from_pretrained("youssef1232/phq9-free-text-scoring", device_map="auto") - Notebooks
- Google Colab
- Kaggle
PHQ-9 Free Text Scoring
A BERT-based model that predicts PHQ-9 depression severity from free-text responses.
Model Details
- Architecture: BERT
- Task: Text Classification
- Framework: Transformers
- Classes:
- 0: Minimal
- 1: Mild
- 2: Moderate
- 3: Moderately Severe
- 4: Severe
Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="youssef1232/phq9-free-text-scoring"
)
result = classifier("I feel hopeless and have lost interest in everything")
print(result)
- Downloads last month
- 33