ardavey commited on
Commit
05dfa1d
1 Parent(s): 9a11b97

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # bert-large-depression-classification-model
2
+ To access this model, just copy & paste the following code:
3
+ ```python
4
+ from transformers import pipeline
5
+
6
+ classifier = pipeline('text-classification', model='ardavey/bert-large-depression-classification-model')
7
+ ```
8
+
9
+ **Example usage**:
10
+ ```python
11
+ from transformers import pipeline
12
+
13
+ classifier = pipeline('text-classification', model='ardavey/bert-large-depression-classification-model')
14
+
15
+ text_samples = [
16
+ "The things I used to love don’t bring me any joy anymore. Everything feels empty",
17
+ "I often wonder if things would be better if I just disappeared.",
18
+ "Sometimes things get tough, but I know I have the strength to get through it."
19
+ ]
20
+
21
+ predictions = classifier(text_samples)
22
+
23
+ for sample, prediction in zip(text_samples, predictions):
24
+ print(f"Text: {sample}")
25
+ print(f"Prediction: {'Depressed' if prediction['label'] == 'LABEL_1' else 'Not Depressed'}, Score: {prediction['score']}")
26
+ print()
27
+ ```
28
+
29
+ **Output**:
30
+ ```
31
+ Text: The things I used to love don’t bring me any joy anymore. Everything feels empty
32
+ Prediction: Depressed, Score: 0.9950354099273682
33
+
34
+ Text: I often wonder if things would be better if I just disappeared.
35
+ Prediction: Depressed, Score: 0.970693051815033
36
+
37
+ Text: Sometimes things get tough, but I know I have the strength to get through it.
38
+ Prediction: Not Depressed, Score: 0.9896683692932129
39
+ ```