Predicting the political compass quadrant of Reddit user comments using a deep learning classification model trained on comments from r/PoliticalCompassMemes.
The model is built using TensorFlow. See the .ipynb file for the data pre-processing and the model building process.
Nearly all users in the subreddit select a user flair. The flairs are pre-defined to represent each sector in the political compass. It is assumed in this project that the flair represents the user's political orientation. Each comment from this community is retrieved along with the user's flair. These flairs make the perfect target variable for the model.
This web app takes in a Reddit username as an input and predicts the political compass sector of each of the user's comments using the saved TensorFlow model. It will return the comment count of each sector as well as each comment with its sector prediction. The web app is built with Streamlit and deployed using Heroku.