# Model: PersonalityClassifier
## Model Details
* **Model Type:** PersonalityClassifier is a fine-tuned model from `google/flan-t5-xl` using annotation data for personality classification.
* **Model Date:** PersonalityClassifier was trained in Jan 2024.
* **Paper or resources for more information:** [https://arxiv.org/abs/2504.06868](https://arxiv.org/abs/2504.06868)
## Requirements
* `torch==2.1.0`
* `transformers==4.29.0`
## How to use the model
```python
import torch
from transformers import T5ForConditionalGeneration, AutoTokenizer
# Set device to CUDA if available, otherwise use CPU
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Load model and tokenizer
model_name = "mirlab/PersonalityClassifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name).to(device)
# Define model inference function
def modelGenerate(input_text, lm, tokenizer):
# Tokenize input text and move to device
…