Kebinnuil commited on
Commit
d1ff217
·
verified ·
1 Parent(s): 3a63c01

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -1
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 feel like giving up.")
 
 
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)