File size: 2,797 Bytes
f97b6f2
a61a11f
 
a036a9c
 
 
a61a11f
e1fe666
 
d7521cf
35321b0
 
 
 
 
 
 
 
 
 
 
a036a9c
 
f97b6f2
 
a61a11f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ee030f1
 
 
ad85bf3
ee030f1
 
2e339c9
a61a11f
 
 
cb6e3a3
 
f97b6f2
a61a11f
 
 
 
 
 
 
 
 
 
 
 
 
a036a9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
language: en
tags:
- bert
- sentiment-analysis
- text-classification
license: mit
pipeline_tag: text-classification
library_name: transformers
widget:
- text: 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
  example_title: Positive
- text: I received the update and will review it later this week.
  example_title: Neutral
- text: 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.
  example_title: Negative
base_model:
- google/bert_uncased_L-2_H-128_A-2
---

# Bert_sentiment_classifier
A BERT (`bert-base-uncased`) model fine-tuned for **3-class sentiment classification**:
- **Positive**
- **Neutral**
- **Negative**

## Labels
| id | label    |
|---:|----------|
| 0  | Neutral  |
| 1  | Positive |
| 2  | Negative |

## Test Drive
Try one of these examples into the widget:
- **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."
- **Neutral:** "I received the update and will review it later this week."
- **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"

## Try it out

<div style="position:relative; width:100%; height:0; padding-bottom:75%;">
  <iframe src = 'https://huggingface.co/spaces/POKWIR/bert-sentiment-demo' ></iframe>
</div>


## How to use

### Transformers pipeline
```python
from transformers import pipeline

clf = pipeline(
    "text-classification",
    model="pokwir/Bert_sentiment_classifier",
    tokenizer="pokwir/Bert_sentiment_classifier",
    return_all_scores=True
)

texts = [
    "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.",
    "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.",
    "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."
]

print(clf(texts))