With the popularity of social media, sentiment analysis and text categorisation by analysing the information people post online has become an effective method to study personality prediction. This paper focuses on how to use a personality prediction model based on Bidirectional LSTM for personality prediction. Accurate personality prediction results can provide personalised recommendation services for individuals, which has certain commercial value. In this paper, the dataset of Kaggle is first preprocessed, and then the Bidirectional LSTM model is constructed and the hyperparameters are set.The processed data are then put into the model for training and testing. Finally, the above steps are repeated using other different machine learning models. After comparison experiments with other common machine learning models, it was found that the Bidirectional LSTM model showed significant advantages in the personality prediction task, and its accuracy reached 93.5%, which was significantly higher than the traditional machine learning model.