elucidator8918 commited on
Commit
950ba1c
·
verified ·
1 Parent(s): c7e99c2

Update tasks/text.py

Browse files
Files changed (1) hide show
  1. tasks/text.py +2 -2
tasks/text.py CHANGED
@@ -100,8 +100,8 @@ async def evaluate_text(request: TextEvaluationRequest):
100
  with torch.no_grad():
101
  text_input_ids = text_encoding["input_ids"].to(device)
102
  text_attention_mask = text_encoding["attention_mask"].to(device)
103
- outputs = model(text_input_ids, text_attention_mask)
104
- predictions = torch.argmax(outputs.logits, dim=1).cpu().numpy()
105
 
106
  #--------------------------------------------------------------------------------------------
107
  # YOUR MODEL INFERENCE STOPS HERE
 
100
  with torch.no_grad():
101
  text_input_ids = text_encoding["input_ids"].to(device)
102
  text_attention_mask = text_encoding["attention_mask"].to(device)
103
+ logits = model(text_input_ids, text_attention_mask)
104
+ predictions = torch.argmax(logits, dim=1).cpu().numpy()
105
 
106
  #--------------------------------------------------------------------------------------------
107
  # YOUR MODEL INFERENCE STOPS HERE