Update README.md
Browse files
README.md
CHANGED
@@ -27,6 +27,13 @@ Example output
|
|
27 |
## Example
|
28 |
|
29 |
```python
|
|
|
|
|
|
|
|
|
|
|
30 |
from transformers import pipeline
|
|
|
31 |
classifier = pipeline("text-classification", model="Kebinnuil/suicidal_detection_model")
|
32 |
-
classifier("I
|
|
|
|
27 |
## Example
|
28 |
|
29 |
```python
|
30 |
+
from transformers import pipeline, DistilBertTokenizer, DistilBertForSequenceClassification
|
31 |
+
|
32 |
+
tokenizer = DistilBertTokenizer.from_pretrained("Kebinnuil/suicidal_detection_model")
|
33 |
+
model = pipeline("text-classification", model="Kebinnuil/suicidal_detection_model")
|
34 |
+
|
35 |
from transformers import pipeline
|
36 |
+
|
37 |
classifier = pipeline("text-classification", model="Kebinnuil/suicidal_detection_model")
|
38 |
+
result = classifier("I want to jump off the bridge")
|
39 |
+
print(result)
|