Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
pipeline_tag: text-classification
|
| 4 |
+
tags:
|
| 5 |
+
- personality-prediction
|
| 6 |
+
- big-five
|
| 7 |
+
- essays
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# Essays Big Five Personality Predictor
|
| 11 |
+
|
| 12 |
+
This repository contains a PyTorch deployment bundle trained in
|
| 13 |
+
`AFLPS-ML-Psycholinguistics` to predict Big Five personality dimensions from
|
| 14 |
+
essay text.
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
|
| 18 |
+
- `pytorch_model.bin`: PyTorch bundle containing model weights, TF-IDF
|
| 19 |
+
vocabulary, IDF weights, threshold, and metrics.
|
| 20 |
+
- `vectorizers/essays_tfidf.npz`: portable TF-IDF artifact exported from the
|
| 21 |
+
preprocessing environment.
|
| 22 |
+
- `deployment.py`: model architecture and preprocessing helpers.
|
| 23 |
+
- `predict.py`: command-line batch and single-text inference script.
|
| 24 |
+
- `requirements.txt`: minimal inference dependencies.
|
| 25 |
+
|
| 26 |
+
## Local Inference
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
pip install -r requirements.txt
|
| 30 |
+
python predict.py pytorch_model.bin --text "Paste a new essay here."
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
For a CSV with a `text` column:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
python predict.py pytorch_model.bin --input essays.csv --output predictions.csv
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## Output
|
| 40 |
+
|
| 41 |
+
The model returns probabilities and binary predictions for:
|
| 42 |
+
|
| 43 |
+
- `O`: Openness
|
| 44 |
+
- `C`: Conscientiousness
|
| 45 |
+
- `E`: Extraversion
|
| 46 |
+
- `A`: Agreeableness
|
| 47 |
+
- `N`: Neuroticism
|
| 48 |
+
|
| 49 |
+
Original local source repo upload target: `Lily-Trinh/PersonalityTraitsFromText`.
|