Instructions to use gundruke/da_bert_sentiment_analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gundruke/da_bert_sentiment_analysis with Transformers:
# 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") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Danish Sentiment Analysis
Information
- Dataset : DDSC/angry-tweets
- Base model : Danish bert botxo
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