added "Usage" section to README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,16 @@ Code: https://github.com/sambitmukherjee/hf-nlp-course-exercises/blob/main/chapt
|
|
22 |
|
23 |
Experiment tracking: https://wandb.ai/sadhaklal/bert-base-uncased-finetuned-sst2-v2
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
## Metric
|
26 |
|
27 |
Accuracy on the `'validation'` split of SST-2: 0.9278
|
|
|
22 |
|
23 |
Experiment tracking: https://wandb.ai/sadhaklal/bert-base-uncased-finetuned-sst2-v2
|
24 |
|
25 |
+
## Usage
|
26 |
+
|
27 |
+
```
|
28 |
+
from transformers import pipeline
|
29 |
+
|
30 |
+
classifier = pipeline("text-classification", model="sadhaklal/bert-base-uncased-finetuned-sst2-v2")
|
31 |
+
print(classifier("uneasy mishmash of styles and genres ."))
|
32 |
+
print(classifier("by the end of no such thing the audience , like beatrice , has a watchful affection for the monster ."))
|
33 |
+
```
|
34 |
+
|
35 |
## Metric
|
36 |
|
37 |
Accuracy on the `'validation'` split of SST-2: 0.9278
|