Downloads · 30 days
8
1% of all-time downloads
erst/xlm-roberta-base-finetuned-db07
xlm-roberta-base-finetuned-db07 is a text classification model from erst. Use it when you need a label for a piece of text. It is set up for transformers.
This model is xlm-roberta-base fine-tuned to classify Danish descriptions of activities into Dansk Branchekode DB07 codes.
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
1.4K
Public
Repo size
4.5 GB
Likes
0
Public
Click a slice to open those files.
.bin1.1 GB · 100%
From the Hugging Face model README
This model is xlm-roberta-base fine-tuned to classify Danish descriptions of activities into Dansk Branchekode DB07 codes.
Approximately 2.5 million business names and descriptions of activities from Norwegian and Danish businesses were used to fine-tune the model. The Norwegian descriptions were translated into Danish and the Norwegian SN 2007 codes were translated into Danish DB07 codes.
Activity descriptions and business names were concatenated but separated by the separator token </s>. Thus, the model was trained on input texts in the format f"{description_of_activity}</s>{business_name}".
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("erst/xlm-roberta-base-finetuned-db07")
model = AutoModelForSequenceClassification.from_pretrained("erst/xlm-roberta-base-finetuned-db07")
pl = pipeline(
"sentiment-analysis",
model=model,
tokenizer=tokenizer,
return_all_scores=False,
)
pl("Vi sælger sko")
pl("We sell clothes</s>Clothing ApS")
This model is released under the MIT License.