notaphoenix commited on
Commit
06e6637
·
1 Parent(s): a24c21d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -1
README.md CHANGED
@@ -20,6 +20,7 @@ The model is a fine-tuned checkpoint of [DistilRoBERTa-base](https://huggingface
20
 
21
  # Application 🚀
22
 
 
23
 
24
  ```python
25
  from transformers import pipeline
@@ -32,4 +33,18 @@ classifier("This is a modern sentence!")
32
  {'label': 'modern', 'score': 0.901931643486023},
33
  {'label': 'shakespearean', 'score': 0.09806833416223526}
34
  ]]
35
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  # Application 🚀
22
 
23
+ ## Return all labels
24
 
25
  ```python
26
  from transformers import pipeline
 
33
  {'label': 'modern', 'score': 0.901931643486023},
34
  {'label': 'shakespearean', 'score': 0.09806833416223526}
35
  ]]
36
+ ```
37
+
38
+ ## Return top label
39
+
40
+ ```python
41
+ from transformers import pipeline
42
+ classifier = pipeline("text-classification", model="notaphoenix/shakespeare_classifier_model")
43
+ classifier("This is a modern sentence!")
44
+ ```
45
+
46
+ ```json
47
+ [
48
+ {'label': 'modern', 'score': 0.901931643486023}
49
+ ]
50
+ ```