A newer version of the Streamlit SDK is available:
1.46.1
title: Youtube Sentiment Analysis
emoji: π
colorFrom: pink
colorTo: red
sdk: streamlit
sdk_version: 1.37.1
app_file: app.py
pinned: false
license: mit
YouTube Sentiment Analysis
Overview
YouTube Sentiment Analysis is a web application that allows users to input a YouTube video link and retrieve comments along with their sentiment analysis. The application employs a machine learning model to determine whether the comments are positive or negative, providing insights into the general opinion of the viewers.
Features
- Input Video Link: Users can enter any valid YouTube video link.
- Sentiment Analysis: The application analyzes comments' sentiment using AI and provides a detailed summary.
- Styled Comments Table: Comments are displayed in a table, color-coded based on their sentiment.
- User-Friendly Interface: Built with Streamlit, providing an intuitive web interface.
Technologies Used
- Python: The primary programming language for the application.
- Streamlit: For creating interactive web applications.
- Pandas: For data manipulation and analysis.
- Machine Learning Model: For predicting the sentiment of the comments.
- YouTube API: To fetch comments from the specified YouTube videos.
Deploying
- Youtube Sentiment Analysis deployed website: https://alaindelong-youtube-sentiment-analysis.hf.space/
- Published Model: https://huggingface.co/spaces/AlainDeLong/youtube-sentiment-analysis/tree/main
- Due to the large size of the model, it cannot be included here; it will be available at the huggingface link mentioned above.
Installation
To set up the project locally, follow these steps:
Clone the repository:
git clone https://github.com/AlainDeLong2k/demo-youtube-sentiment-analysis.git cd demo-youtube-sentiment-analysis
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required packages:
pip install -r requirements.txt
Run the application:
streamlit run app.py
Usage
- Open a web browser and navigate to http://localhost:8501 (this is the default Streamlit port).
- Enter a valid YouTube video link in the input field. Examples of valid links include:
- Click on the
Analyze
button to retrieve and analyze comments for sentiment. - View the summary and comments in the application.
Contributing
Contributions are welcome! If you would like to contribute to this project, please fork the repository and submit a pull request with your changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
For any further questions or issues, feel free to open an issue in the repository.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference