KevSun commited on
Commit
add6ad0
·
verified ·
1 Parent(s): 9ce112b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -30,7 +30,6 @@ The following provides the code to implement the task of detecting personality f
30
  ```python
31
  # install these packages before importing them (transformers, PyTorch)
32
  # install these packages before importing them (transformers, PyTorch)
33
-
34
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
35
  import torch
36
 
@@ -61,18 +60,19 @@ predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
61
  predicted_scores = predictions[0].tolist()
62
 
63
 
64
- trait_names = ["Agreeableness", "Openness", "Conscientiousness", "Extraversion", "Neuroticism"]
65
 
66
 
67
  for trait, score in zip(trait_names, predicted_scores):
68
  print(f"{trait}: {score:.4f}")
69
 
70
  ##"output":
71
- #Agreeableness: 0.3032
72
- #Openness: 0.1607
73
- #Conscientiousness: 0.1835
74
- #Extraversion: 0.1558
75
- #Neuroticism: 0.1969
 
76
 
77
 
78
  ```
 
30
  ```python
31
  # install these packages before importing them (transformers, PyTorch)
32
  # install these packages before importing them (transformers, PyTorch)
 
33
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
34
  import torch
35
 
 
60
  predicted_scores = predictions[0].tolist()
61
 
62
 
63
+ trait_names = ["agreeableness", "openness", "conscientiousness", "extraversion", "neuroticism"]
64
 
65
 
66
  for trait, score in zip(trait_names, predicted_scores):
67
  print(f"{trait}: {score:.4f}")
68
 
69
  ##"output":
70
+ #agreeableness: 0.2138
71
+ #openness: 0.2890
72
+ #conscientiousness: 0.1921
73
+ #extraversion: 0.1307
74
+ #neuroticism: 0.1744
75
+
76
 
77
 
78
  ```