larskjeldgaard
commited on
Commit
•
ac6cadf
1
Parent(s):
df438f0
fix typos
Browse files
README.md
CHANGED
@@ -12,14 +12,14 @@ widget:
|
|
12 |
# Danish BERT fine-tuned for Sentiment Analysis (Polarity)
|
13 |
This model detects polarity ('positive', 'neutral', 'negative') of danish texts.
|
14 |
|
15 |
-
It is trained on Tweets
|
16 |
|
17 |
Here is an example on how to load the model in PyTorch using the [🤗Transformers](https://github.com/huggingface/transformers) library:
|
18 |
|
19 |
```python
|
20 |
-
from transformers import AutoTokenizer,
|
21 |
tokenizer = AutoTokenizer.from_pretrained("larskjeldgaard/senda")
|
22 |
-
model =
|
23 |
|
24 |
# create 'senda' sentiment analysis pipeline
|
25 |
senda_pipeline = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
|
|
|
12 |
# Danish BERT fine-tuned for Sentiment Analysis (Polarity)
|
13 |
This model detects polarity ('positive', 'neutral', 'negative') of danish texts.
|
14 |
|
15 |
+
It is trained and tested on Tweets annotated by [Alexandra Institute](https://github.com/alexandrainst).
|
16 |
|
17 |
Here is an example on how to load the model in PyTorch using the [🤗Transformers](https://github.com/huggingface/transformers) library:
|
18 |
|
19 |
```python
|
20 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
21 |
tokenizer = AutoTokenizer.from_pretrained("larskjeldgaard/senda")
|
22 |
+
model = AutoModelForSequenceClassification.from_pretrained("larskjeldgaard/senda")
|
23 |
|
24 |
# create 'senda' sentiment analysis pipeline
|
25 |
senda_pipeline = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
|