oliverguhr commited on
Commit
b876773
1 Parent(s): c5c8dd0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -48,6 +48,21 @@ The code above will output following list:
48
  ["negative","negative","positive","positive","neutral", "neutral"]
49
  ```
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  ## Model and Data
53
 
 
48
  ["negative","negative","positive","positive","neutral", "neutral"]
49
  ```
50
 
51
+ ### Output class probabilities
52
+
53
+ ```python
54
+ from germansentiment import SentimentModel
55
+
56
+ model = SentimentModel()
57
+
58
+ classes, probabilities = model.predict_sentiment(["das ist super"], output_probabilities = True)
59
+ print(classes, probabilities)
60
+ ```
61
+ ```python
62
+ ['positive'] [[['positive', 0.9761366844177246], ['negative', 0.023540444672107697], ['neutral', 0.00032294404809363186]]]
63
+ ```
64
+
65
+
66
 
67
  ## Model and Data
68