Spaces:
Sleeping
Sleeping
update
Browse files- 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 |
-
|
102 |
-
|
103 |
-
|
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 |
|