Instructions to use sasasassaszzd/PHQ8-prototype with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sasasassaszzd/PHQ8-prototype with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="sasasassaszzd/PHQ8-prototype", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sasasassaszzd/PHQ8-prototype", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| tags: | |
| - custom-model | |
| - phq8 | |
| # PHQ8 Prototype Model | |
| This is a custom BERT-based model with an MLP head for PHQ-8 score prediction. | |
| ## How to use | |
| ```python | |
| from transformers import AutoTokenizer, AutoModel | |
| tokenizer = AutoTokenizer.from_pretrained("username/PHQ8-prototype") | |
| model = AutoModel.from_pretrained("username/PHQ8-prototype", trust_remote_code=True) | |
| inputs = tokenizer("I feel tired and down.", return_tensors="pt") | |
| outputs = model.inference(**inputs) | |
| print(outputs) | |