j-hartmann
commited on
Commit
•
e26a7d1
1
Parent(s):
b6ed3f8
Update README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,20 @@ The model was fine-tuned on 2,000 manually annotated social media posts.
|
|
22 |
The hold-out accuracy is 95% (vs. a balanced 50% random-chance baseline).
|
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 95% (vs. a balanced 50% random-chance baseline).
|
23 |
For details on the training approach see Web Appendix F in Hartmann et al. (2021).
|
24 |
|
25 |
+
# Application
|
26 |
+
|
27 |
+
```python
|
28 |
+
from transformers import pipeline
|
29 |
+
classifier = pipeline("text-classification", model="j-hartmann/purchase-intention-english-roberta-large", return_all_scores=True)
|
30 |
+
classifier("I want this!")
|
31 |
+
```
|
32 |
+
|
33 |
+
```python
|
34 |
+
Output:
|
35 |
+
[[{'label': 'no', 'score': 0.0014553926885128021},
|
36 |
+
{'label': 'yes', 'score': 0.9985445737838745}]]
|
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 |
```
|