MiriUll commited on
Commit
9d1d71f
1 Parent(s): 936eb80

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -27,12 +27,12 @@ print(model(**tokenized).logits)
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
 
 
27
  ```python
28
  from transformers import pipeline
29
 
30
+ pipe = pipeline("text-classification", model="tum-nlp/NegBLEURT", function_to_apply="none") # set function_to_apply="none" for regression output!
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))
36
  # returns [{'label': 'NegBLEURT_score', 'score': 0.8408917784690857}, {'label': 'NegBLEURT_score', 'score': 0.26007288694381714}]
37
  ```
38