Downloads · 30 days
17
1% of all-time downloads
z-dickson/multilingual_sentiment_newspaper_headlines
multilingual_sentiment_newspaper_headlines is a text classification model from z-dickson. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of bert-base-multilingual-cased on a dataset of 30k newspaper headlines in German, Polish, English, Dutch and Spanish. The dataset contains 6k headlines in each of the five languages…
Downloads · 30 days
17
1% of all-time downloads
All-time downloads
1.9K
Public
Repo size
712 MB
Likes
1
Public
Click a slice to open those files.
.h5712 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of bert-base-multilingual-cased on a dataset of 30k newspaper headlines in German, Polish, English, Dutch and Spanish. The dataset contains 6k headlines in each of the five languages. The newspapers used are as follows:
It achieves the following results on the evaluation set:
import torch
from transformers import AutoTokenizer, TextClassificationPipeline,TFAutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("z-dickson/multilingual_sentiment_newspaper_headlines")
m1 = TFAutoModelForSequenceClassification.from_pretrained("z-dickson/multilingual_sentiment_newspaper_headlines", from_tf=True)
sentiment_classifier = TextClassificationPipeline(tokenizer=tokenizer, model=m1)
sentiment_classifier('Brazylia: Bolsonaro wci±ż nie uznał porażki. Jego zwolennicy blokuj± autostrady')
[{'label': 'negative, 0', 'score': 0.9989686012268066}]
The following hyperparameters were used during training:
| Train Loss | Train Sparse Categorical Accuracy | Validation Loss | Validation Sparse Categorical Accuracy | Epoch |
|---|---|---|---|---|
| 0.8008 | 0.6130 | 0.7099 | 0.6558 | 0 |
| 0.6148 | 0.6973 | 0.7559 | 0.6200 | 1 |
| 0.4626 | 0.7690 | 0.8233 | 0.6368 | 2 |
| 0.3632 | 0.8229 | 0.9609 | 0.6454 | 3 |
| 0.2886 | 0.8688 | 1.0107 | 0.6434 | 4 |