Reddit Mood is a Python application designed to scrape comments from the Reddit's Tech subreddits, analyze their sentiment, and classify them into various emotional categories. The project uses praw
for Reddit API interactions and Hugging Face's transformers
library for emotion detection.
To set up and run the project locally, follow these instructions:
git clone https://github.com/FadlGh/Reddit-Mood.git
cd Reddit-Mood
Create and activate a virtual environment:
python -m venv venv
venv\Scripts\activate # On Mac use: source venv/bin/activate
Install the required Python packages:
pip install -r requirements.txt
Create a .env file in the root directory and add your Reddit API credentials:
CLIENT_ID=your_client_id
CLIENT_KEY=your_client_key
PASSWORD=your_password
To scrape comments from the technews subreddit and save them to data/comments.csv, run:
python src/data_scraper.py
To classify the emotions of the comments in data/comments.csv, run:
python src/emotion_detector.py
To train own model, run:
python src/model.py
To graph the data, run:
python src/graph.py