Commit
·
a231aee
1
Parent(s):
fbcdb1c
Update README.md
Browse filesAdded to the description the purpose of this model.
README.md
CHANGED
|
@@ -17,7 +17,7 @@ model-index:
|
|
| 17 |
|
| 18 |
# distilbert-depression-base
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) trained on CLPsych 2015 and evaluated on a scraped dataset from Twitter.
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
- Evaluation Loss: 0.64
|
| 23 |
- Accuracy: 0.65
|
|
@@ -29,7 +29,7 @@ It achieves the following results on the evaluation set:
|
|
| 29 |
|
| 30 |
## Intended uses & limitations
|
| 31 |
|
| 32 |
-
Feed a corpus of tweets to the model to generate label if input is indicative of
|
| 33 |
|
| 34 |
Limitation: All token sequences longer than 512 are automatically truncated. Also, training and test data may be contaminated with mislabeled users.
|
| 35 |
|
|
@@ -45,8 +45,8 @@ You can use this model directly with a pipeline for sentiment analysis:
|
|
| 45 |
>>> from transformers import pipeline
|
| 46 |
>>> classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 47 |
>>> tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512}
|
| 48 |
-
>>> result=classifier('pain peko',**tokenizer_kwargs) #For truncation to apply in the pipeline
|
| 49 |
-
|
| 50 |
|
| 51 |
[{'label': 'LABEL_1', 'score': 0.5048992037773132}]
|
| 52 |
```
|
|
|
|
| 17 |
|
| 18 |
# distilbert-depression-base
|
| 19 |
|
| 20 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) trained on CLPsych 2015 and evaluated on a scraped dataset from Twitter to detect potential users in Twitter for depression.
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
- Evaluation Loss: 0.64
|
| 23 |
- Accuracy: 0.65
|
|
|
|
| 29 |
|
| 30 |
## Intended uses & limitations
|
| 31 |
|
| 32 |
+
Feed a corpus of tweets to the model to generate label if input is indicative of a depressed user or not. Label 1 is depressed, Label 0 is not depressed.
|
| 33 |
|
| 34 |
Limitation: All token sequences longer than 512 are automatically truncated. Also, training and test data may be contaminated with mislabeled users.
|
| 35 |
|
|
|
|
| 45 |
>>> from transformers import pipeline
|
| 46 |
>>> classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 47 |
>>> tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512}
|
| 48 |
+
>>> result=classifier('pain peko',**tokenizer_kwargs) #For truncation to apply in the pipeline.
|
| 49 |
+
>>> #Should note that the string passed as the input can be a corpus of tweets concatenated together into one document.
|
| 50 |
|
| 51 |
[{'label': 'LABEL_1', 'score': 0.5048992037773132}]
|
| 52 |
```
|