Update README.md
Browse files
README.md
CHANGED
@@ -23,6 +23,18 @@ print(model(**tokenized).logits)
|
|
23 |
# returns scores 0.8409 and 0.2601 for the two candidates
|
24 |
```
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
## Training Details
|
28 |
|
|
|
23 |
# returns scores 0.8409 and 0.2601 for the two candidates
|
24 |
```
|
25 |
|
26 |
+
### Use with pipeline
|
27 |
+
```python
|
28 |
+
from transformers import pipeline
|
29 |
+
|
30 |
+
pipe = pipeline("text-classification", model="tum-nlp/NegBLEURT")
|
31 |
+
pairwise_input = [
|
32 |
+
[["Ray Charles is legendary.", "Ray Charles is a legend."]],
|
33 |
+
[["Ray Charles is legendary.", "Ray Charles isn’t legendary."]]
|
34 |
+
]
|
35 |
+
print(pipe(pairwise_input, function_to_apply="none"))
|
36 |
+
# returns [{'label': 'NegBLEURT_score', 'score': 0.8408917784690857}, {'label': 'NegBLEURT_score', 'score': 0.26007288694381714}]
|
37 |
+
```
|
38 |
|
39 |
## Training Details
|
40 |
|