Update README.md
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ The accuracy reaches 51%, and F1 score is 42%. Both are much higher than the sim
|
|
7 |
Please cite: "Wang, R., and Sun, K. 2024. Personality Detection of the Characters in English Fiction" if you use this model.
|
8 |
The following provides the code to implement the task of detecting personality from an input text.
|
9 |
|
10 |
-
|
11 |
#import packages
|
12 |
|
13 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
@@ -50,5 +50,5 @@ trait_names = ["Agreeableness", "Openness", "Conscientiousness", "Extraversion",
|
|
50 |
# Print the predicted personality traits scores
|
51 |
for trait, score in zip(trait_names, predicted_scores):
|
52 |
print(f"{trait}: {score:.4f}")
|
53 |
-
|
54 |
##"output": "agreeableness: 0.4600000000; openness: 0.2700000000; conscientiousness: 0.3100000000; extraversion: 0.1000000000; neuroticism: 0.8400000000"
|
|
|
7 |
Please cite: "Wang, R., and Sun, K. 2024. Personality Detection of the Characters in English Fiction" if you use this model.
|
8 |
The following provides the code to implement the task of detecting personality from an input text.
|
9 |
|
10 |
+
```python
|
11 |
#import packages
|
12 |
|
13 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
|
50 |
# Print the predicted personality traits scores
|
51 |
for trait, score in zip(trait_names, predicted_scores):
|
52 |
print(f"{trait}: {score:.4f}")
|
53 |
+
```
|
54 |
##"output": "agreeableness: 0.4600000000; openness: 0.2700000000; conscientiousness: 0.3100000000; extraversion: 0.1000000000; neuroticism: 0.8400000000"
|