NikolajMunch commited on
Commit
6e9cd6b
1 Parent(s): c016a70

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -0
README.md CHANGED
@@ -20,6 +20,19 @@ language:
20
  | 😠 **Vrede** | Anger |
21
 
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  # Model performance
24
 
25
  **Accuracy** : 81.48
 
20
  | 😠 **Vrede** | Anger |
21
 
22
 
23
+ # How to use
24
+
25
+ ```ruby
26
+ from transformers import pipeline
27
+
28
+ model_path = "NikolajMunch/danish-emotion-classification"
29
+ classifier = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
30
+ prediction = classifier("Jeg er godt nok ked af at mine SMS'er er slettet")
31
+
32
+ print(prediction)
33
+ # [{'label': 'Tristhed', 'score': 0.9725030660629272}]
34
+ ```
35
+
36
  # Model performance
37
 
38
  **Accuracy** : 81.48