This is a Streamlit app for sentiment analysis of Amazon reviews using a pre-trained model.
-
Clone the repository:
git clone https://github.com/DevanshChhabra/Sentiment_Analysis.git cd Sentiment_Analysis -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Download NLTK data (if not included in the project):
import nltk nltk.download('punkt') nltk.download('stopwords')
-
Run the Streamlit app:
streamlit run sentiment_analysis.py
sentiment_analysis.py: Main Streamlit app script.Sentiment_Analysis.h5: Trained model file.tokenizer_(1).json: Tokenizer file.requirements.txt: Python dependencies.
Enter a review into the text box and click "Predict" to get the sentiment analysis result.