Update README.md
Browse files
README.md
CHANGED
|
@@ -54,10 +54,10 @@ model.eval() # Set the model to evaluation mode
|
|
| 54 |
with torch.no_grad():
|
| 55 |
outputs = model(**encoded_input)
|
| 56 |
|
| 57 |
-
predictions = outputs.logits.squeeze()
|
| 58 |
|
| 59 |
-
|
| 60 |
-
predicted_scores = predictions.
|
|
|
|
| 61 |
|
| 62 |
trait_names = ["Agreeableness", "Openness", "Conscientiousness", "Extraversion", "Neuroticism"]
|
| 63 |
|
|
|
|
| 54 |
with torch.no_grad():
|
| 55 |
outputs = model(**encoded_input)
|
| 56 |
|
|
|
|
| 57 |
|
| 58 |
+
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
| 59 |
+
predicted_scores = predictions[0].tolist()
|
| 60 |
+
|
| 61 |
|
| 62 |
trait_names = ["Agreeableness", "Openness", "Conscientiousness", "Extraversion", "Neuroticism"]
|
| 63 |
|