Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +1 -2
tasks/text.py
CHANGED
|
@@ -159,9 +159,8 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
| 159 |
predictions = []
|
| 160 |
for batch in tqdm(test_dataloader):
|
| 161 |
|
| 162 |
-
b_input_ids, b_input_mask, b_token_type_ids = batch
|
| 163 |
with torch.no_grad():
|
| 164 |
-
logits = model(
|
| 165 |
|
| 166 |
logits = logits.detach().cpu().numpy()
|
| 167 |
predictions.extend(logits.argmax(1))
|
|
|
|
| 159 |
predictions = []
|
| 160 |
for batch in tqdm(test_dataloader):
|
| 161 |
|
|
|
|
| 162 |
with torch.no_grad():
|
| 163 |
+
logits = model(**batch)
|
| 164 |
|
| 165 |
logits = logits.detach().cpu().numpy()
|
| 166 |
predictions.extend(logits.argmax(1))
|