Update negbleurt.py
Browse files- negbleurt.py +1 -1
negbleurt.py
CHANGED
@@ -68,6 +68,6 @@ class NegBLEURT(evaluate.Metric):
|
|
68 |
|
69 |
scores_negbleurt = []
|
70 |
for i in range(0, len(references), batch_size):
|
71 |
-
tokenized = self.tokenizer(references[i:i+batch_size],
|
72 |
scores_negbleurt += self.model(**tokenized).logits.flatten().tolist()
|
73 |
return {'negBLEURT': scores_negbleurt}
|
|
|
68 |
|
69 |
scores_negbleurt = []
|
70 |
for i in range(0, len(references), batch_size):
|
71 |
+
tokenized = self.tokenizer(references[i:i+batch_size], predictions[i:i+batch_size], return_tensors='pt', padding=True, max_length=512, truncation=True)
|
72 |
scores_negbleurt += self.model(**tokenized).logits.flatten().tolist()
|
73 |
return {'negBLEURT': scores_negbleurt}
|