Peterard commited on
Commit
ec7e476
1 Parent(s): a0ea3bc

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - text-classification
6
+
7
+ widget:
8
+ - text: "The app crashed when I opened it this morning. Can you fix this please?"
9
+ example_title: "Likely bug report"
10
+ - text: "Please add a like button!"
11
+ example_title: "Unlikely bug report"
12
+ ---
13
+
14
+ How to use this classifier:
15
+
16
+ ```
17
+ from transformers import pipeline
18
+
19
+ pipe = pipeline("text-classification", model="Peterard/distilbert_bug_classifier")
20
+
21
+ pipe("The app crashed when I opened it this morning. Can you fix this please?")
22
+ # [{'label': 'bug', 'score': 0.9042391180992126}]
23
+
24
+ pipe("Please add a like button!")
25
+ # [{'label': 'no_bug', 'score': 0.9977496266365051}]
26
+
27
+ ```
28
+
29
+ N.B. The label will change depending on which is the likelier class