NaolTaye commited on
Commit
c3ebc78
·
1 Parent(s): 5ce8ded
Files changed (1) hide show
  1. tasks/text.py +2 -2
tasks/text.py CHANGED
@@ -90,8 +90,8 @@ async def evaluate_text(request: TextEvaluationRequest):
90
  with torch.no_grad():
91
  print('BEFORE PREDICTION')
92
 
93
- test_input_ids = tokenized_test["input_ids"].to(device)
94
- test_attention_mask = tokenized_test["attention_mask"].to(device)
95
  outputs = model(test_input_ids, test_attention_mask)
96
  p = torch.argmax(outputs.logits, dim=1)
97
  predictions = np.append(predictions, p.cpu().numpy())
 
90
  with torch.no_grad():
91
  print('BEFORE PREDICTION')
92
 
93
+ test_input_ids = tokenized_test["input_ids"]
94
+ test_attention_mask = tokenized_test["attention_mask"]
95
  outputs = model(test_input_ids, test_attention_mask)
96
  p = torch.argmax(outputs.logits, dim=1)
97
  predictions = np.append(predictions, p.cpu().numpy())