Spaces:
Sleeping
Sleeping
ronaldahmed
commited on
Update ccl_win.py
Browse files- ccl_win.py +2 -2
ccl_win.py
CHANGED
@@ -132,8 +132,8 @@ class Scorer:
|
|
132 |
scores = []
|
133 |
n_preds = len(pred_list)
|
134 |
with torch.no_grad():
|
135 |
-
for b in range(0,n_preds,batch_size):
|
136 |
-
strides = [x.lower() for x in pred_list[b:b+batch_size]]
|
137 |
tinput = self._tokenizer(strides,padding=True,truncation=True,max_length=512,return_tensors="pt")
|
138 |
tinput = {k:v.to(self.device) for k,v in tinput.items()}
|
139 |
output = self._model(**tinput)
|
|
|
132 |
scores = []
|
133 |
n_preds = len(pred_list)
|
134 |
with torch.no_grad():
|
135 |
+
for b in range(0,n_preds,self.batch_size):
|
136 |
+
strides = [x.lower() for x in pred_list[b:b+self.batch_size]]
|
137 |
tinput = self._tokenizer(strides,padding=True,truncation=True,max_length=512,return_tensors="pt")
|
138 |
tinput = {k:v.to(self.device) for k,v in tinput.items()}
|
139 |
output = self._model(**tinput)
|