NaolTaye commited on
Commit
983ced3
·
1 Parent(s): 0e65d94
Files changed (1) hide show
  1. tasks/text.py +3 -7
tasks/text.py CHANGED
@@ -98,13 +98,9 @@ async def evaluate_text(request: TextEvaluationRequest):
98
  tokenized_inputs = tokenizer(batch_quotes, padding=True, truncation=True, return_tensors='pt').to(device)
99
 
100
  # Forward pass through the model
101
- outputs = model(**tokenized_inputs)
102
- with torch.no_grad():
103
- print('BEFORE PREDICTION')
104
-
105
- outputs = model(**tokenized_test)
106
- p = torch.argmax(outputs.logits, dim=1)
107
- predictions = np.append(predictions, p.cpu().numpy())
108
 
109
  print("Finished prediction run")
110
 
 
98
  tokenized_inputs = tokenizer(batch_quotes, padding=True, truncation=True, return_tensors='pt').to(device)
99
 
100
  # Forward pass through the model
101
+ p = model(**tokenized_inputs)
102
+
103
+ predictions = np.append(predictions, p.cpu().numpy())
 
 
 
 
104
 
105
  print("Finished prediction run")
106