j-hartmann commited on
Commit
f995433
1 Parent(s): f96d3a9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -22,6 +22,20 @@ The model was fine-tuned on 5,304 manually annotated social media posts.
22
  The hold-out accuracy is 86.1%.
23
  For details on the training approach see Web Appendix F in Hartmann et al. (2021).
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  # Reference
26
  Please cite [this paper](https://journals.sagepub.com/doi/full/10.1177/00222437211037258) when you use our model. Feel free to reach out to [j.p.hartmann@rug.nl](mailto:j.p.hartmann@rug.nl) with any questions or feedback you may have.
27
  ```
 
22
  The hold-out accuracy is 86.1%.
23
  For details on the training approach see Web Appendix F in Hartmann et al. (2021).
24
 
25
+ # Application
26
+ ```python
27
+ from transformers import pipeline
28
+ classifier = pipeline("text-classification", model="j-hartmann/sentiment-roberta-large-english-3-classes", return_all_scores=True)
29
+ classifier("This is so nice!")
30
+ ```
31
+
32
+ ```python
33
+ Output:
34
+ [[{'label': 'negative', 'score': 0.00016451838018838316},
35
+ {'label': 'neutral', 'score': 0.000174045650055632},
36
+ {'label': 'positive', 'score': 0.9996614456176758}]]
37
+ ```
38
+
39
  # Reference
40
  Please cite [this paper](https://journals.sagepub.com/doi/full/10.1177/00222437211037258) when you use our model. Feel free to reach out to [j.p.hartmann@rug.nl](mailto:j.p.hartmann@rug.nl) with any questions or feedback you may have.
41
  ```