Instructions to use marma/bert-base-swedish-cased-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marma/bert-base-swedish-cased-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="marma/bert-base-swedish-cased-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("marma/bert-base-swedish-cased-sentiment") model = AutoModelForSequenceClassification.from_pretrained("marma/bert-base-swedish-cased-sentiment") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Experimental sentiment analysis based on ~20k of App Store reviews in Swedish.
Usage
from transformers import pipeline
>>> sa = pipeline('sentiment-analysis', model='marma/bert-base-swedish-cased-sentiment')
>>> sa('Det här är ju fantastiskt!')
[{'label': 'POSITIVE', 'score': 0.9974609613418579}]
>>> sa('Den här appen suger!')
[{'label': 'NEGATIVE', 'score': 0.998340368270874}]
>>> sa('Det är fruktansvärt.')
[{'label': 'NEGATIVE', 'score': 0.998340368270874}]
>>> sa('Det är fruktansvärt bra.')
[{'label': 'POSITIVE', 'score': 0.998340368270874}]
- Downloads last month
- 640