POKWIR commited on
Commit
a61a11f
·
verified ·
1 Parent(s): cb6e3a3

Update Readme.md

Browse files
Files changed (1) hide show
  1. README.md +46 -5
README.md CHANGED
@@ -1,13 +1,54 @@
1
  ---
 
2
  pipeline_tag: text-classification
 
 
 
 
 
3
  ---
4
 
5
- ## Usage
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ```python
8
  from transformers import pipeline
9
 
10
- clf = pipeline("text-classification", model="pokwir/Bert_sentiment_classifier")
11
- clf("Dirty. Generally poor attitude among the nurses, even the good know the place sucks. When patients are crying for help nurse should not be busy watching Tik-Tok. Too many mistakes made too often. Teaching nurses instructing student nurse procedures incorrectly. Yes, it is bad.")
12
- clf("I had surgery last month. and I was very impressed with the quality of service from the moment I got in till I left. Also I like to mention the nurses they were out standing.")
13
- clf("This hospital has been going downhill for years thanks to dr.billie and her know all attitude she should go back to her vet clinic.")
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
  pipeline_tag: text-classification
4
+ tags:
5
+ - bert
6
+ - sentiment-analysis
7
+ - text-classification
8
+ license: mit
9
  ---
10
 
11
+ # Bert_sentiment_classifier
12
 
13
+ A BERT (`bert-base-uncased`) model fine-tuned for **3-class sentiment classification**:
14
+
15
+ - **Positive**
16
+ - **Neutral**
17
+ - **Negative**
18
+
19
+ ## Labels
20
+
21
+ | id | label |
22
+ |---:|----------|
23
+ | 0 | Neutral |
24
+ | 1 | Positive |
25
+ | 2 | Negative |
26
+
27
+ ## Test Drive
28
+
29
+ Try one of these examples into the widget:
30
+
31
+ - **Negative:** "Dirty. Generally poor attitude among the nurses, even the good know the place sucks. When patients are crying for help nurse should not be busy watching Tik-Tok. Too many mistakes made too often. Teaching nurses instructing student nurse procedures incorrectly. Yes, it is bad."
32
+ - **Neutral:** "I received the update and will review it later this week."
33
+ - **Positive:** "I had surgery last month. and I was very impressed with the quality of service from the moment I got in till I left. Also I like to mention the nurses they were out standing"
34
+
35
+ ## How to use
36
+
37
+ ### Transformers pipeline
38
  ```python
39
  from transformers import pipeline
40
 
41
+ clf = pipeline(
42
+ "text-classification",
43
+ model="pokwir/Bert_sentiment_classifier",
44
+ tokenizer="pokwir/Bert_sentiment_classifier",
45
+ return_all_scores=True
46
+ )
47
+
48
+ texts = [
49
+ "Dirty. Generally poor attitude among the nurses, even the good know the place sucks. When patients are crying for help nurse should not be busy watching Tik-Tok. Too many mistakes made too often. Teaching nurses instructing student nurse procedures incorrectly. Yes, it is bad.",
50
+ "I had surgery last month. and I was very impressed with the quality of service from the moment I got in till I left. Also I like to mention the nurses they were out standing.",
51
+ "This hospital has been going downhill for years thanks to dr.billie and her know all attitude she should go back to her vet clinic."
52
+ ]
53
+
54
+ print(clf(texts))