How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="gundruke/da_bert_sentiment_analysis")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("gundruke/da_bert_sentiment_analysis")
model = AutoModelForSequenceClassification.from_pretrained("gundruke/da_bert_sentiment_analysis", device_map="auto")
Quick Links

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Danish Sentiment Analysis

Information

Approach

  • Preprocessing

    • Links and Usernames are replaced with @USER and [LINK], removing those keyholders
    • Removing hashtags as they generally donot contribute to sentiment
    • Removing emoji as models used in this notebook donot take emojis into consideration (replacing with their meaning could also be tested)
    • lowercase
    • Stopwords removal, danish stopwords from NLTK
  • Training with HF trainer

  • Training with pytorch loop

  • Uploading model to Huggingface hub

  • FastAPI endpoint

  • Packaged the api service as a docker container

Downloads last month
1
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support