This project allows users to analyze YouTube video comments for sentiment analysis (positive and negative sentiments) through a Flask-based web application.
- Web Scraping: Extract YouTube video details and comments using Python-based scraping.
- Sentiment Analysis: Analyze YouTube comments using a custom-built sentiment analysis model.
- Dynamic Visualization: Display results such as positive and negative comment statistics in a user-friendly format.
- File Management: Automatic deletion of temporary files after processing.
- Backend: Flask for the web framework.
- Frontend: HTML, CSS, Jinja2 for dynamic templates.
- Data Analysis: Pandas for handling CSV files and generating insights.
- Sentiment analysis is powered by a custom logic that outputs CSV files for both positive and negative comments.
The application is hosted locally and can be accessed via Flask's development server.
-
Clone this repository:
git clone https://github.com/TejaTadepalli/YouTubeSentimentAnalysis.git cd YouTubeSentimentAnalysis
-
Install dependencies:
Run the following command to install the required Python packages:
pip install flask pandas selenium nltk
-
Run the application:
python main.py
-
Access the application at:
http://127.0.0.1:5000/
-
Analyze YouTube Comments:
- Enter a valid YouTube video URL.
- Click the submit button to process and view results.
- Browser Compatibility: This application uses ChromeDriver for web scraping, which works with the Chrome browser. For other browsers, you will need to download their respective drivers (e.g., GeckoDriver for Firefox, EdgeDriver for Microsoft Edge) and configure the application accordingly.