Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +1 -1
tasks/text.py
CHANGED
@@ -99,7 +99,7 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
99 |
with torch.no_grad():
|
100 |
text_input_ids = text_encoding["input_ids"].to(device)
|
101 |
text_attention_mask = text_encoding["attention_mask"].to(device)
|
102 |
-
outputs = model(
|
103 |
predictions = torch.argmax(outputs.logits, dim=1).cpu().numpy()
|
104 |
|
105 |
#--------------------------------------------------------------------------------------------
|
|
|
99 |
with torch.no_grad():
|
100 |
text_input_ids = text_encoding["input_ids"].to(device)
|
101 |
text_attention_mask = text_encoding["attention_mask"].to(device)
|
102 |
+
outputs = model(text_input_ids, text_attention_mask)
|
103 |
predictions = torch.argmax(outputs.logits, dim=1).cpu().numpy()
|
104 |
|
105 |
#--------------------------------------------------------------------------------------------
|