File size: 1,142 Bytes
75189c8
 
 
 
 
 
 
 
 
3c4d13a
 
 
75189c8
9586c9c
 
3c4d13a
 
 
 
9586c9c
 
3c4d13a
 
 
9586c9c
 
 
 
 
 
3c4d13a
9586c9c
 
 
 
 
 
 
 
 
 
3c4d13a
 
9586c9c
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
---
license: cc-by-4.0
language:
- da
pipeline_tag: text-classification
widget:
  - text: Rigtig god service!
---

# What is this?

BERT classification model for short customer reviews written in Danish. 

The model uses 5 classes ranging from 1-5 stars:

* ⭐ (very poor)
* ⭐⭐ (poor)
* ⭐⭐⭐ (neutral)
* ⭐⭐⭐⭐ (good)
* ⭐⭐⭐⭐⭐ (very good)

The model is fine-tuned using the pre-trained [Danish BERT model]("Maltehb/danish-bert-botxo").

# How to use

Test the model using the [🤗Transformers](https://github.com/huggingface/transformers) library pipeline:

```python
from transformers import pipeline

classifier = pipeline("sentiment-analysis", model="KennethTM/danish-bert-review-sentiment")
classifier("Intet virkede og ingen hjælp at hente.")

#[{'label': '⭐', 'score': 0.4953940808773041}]
```

Or load it using the Auto* classes:

```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained("KennethTM/danish-bert-review-sentiment")
tokenizer = AutoTokenizer.from_pretrained("KennethTM/danish-bert-review-sentiment")
```