Welcome to the IMDB Movie Review Sentiment Analysis project! This application leverages a simple Recurrent Neural Network (RNN) to determine whether an IMDB movie review is positive or negative. Built with Streamlit, the app offers an intuitive and interactive user interface, allowing you to input your own reviews and receive instant sentiment predictions. 🎉
- 🔍 Sentiment Analysis: Accurately classifies movie reviews as positive or negative.
- 🖥️ Interactive UI: Engage with a user-friendly Streamlit web app to input reviews and receive real-time predictions.
- ⚡ Pre-trained Model: Utilizes a pre-trained RNN model for swift and reliable sentiment analysis.
- Python: Ensure you have Python 3.10+ installed on your system. 🐍
It's a good practice to create a virtual environment to manage your project's dependencies. Follow the instructions below based on your operating system:
-
Open Command Prompt or PowerShell.
-
Navigate to the Project Directory:
cd path\to\your\project-directory
-
Create a Virtual Environment:
python -m venv venv
-
Activate the Virtual Environment:
- Command Prompt:
venv\Scripts\activate
- Command Prompt:
-
Open Terminal.
-
Navigate to the Project Directory:
cd path/to/your/project-directory
-
Create a Virtual Environment:
python3 -m venv venv
-
Activate the Virtual Environment:
source venv/bin/activate
🔔 Note: After activation, your terminal prompt will be prefixed with (venv) indicating that the virtual environment is active.
-
Clone the Repository:
git clone https://github.com/alphatechlogics/Sentiment-Analysis.git cd project-directory
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Streamlit App:
streamlit run main.py
- Launch the App: After running
streamlit run main.py
, open the provided link in your browser. - Input Your Review: Enter a movie review into the text box.
- Get Prediction: Click the Classify button to receive your sentiment prediction. 🎯
- Sentiment: Positive 😊 / Negative 😞
- Prediction Score: A probability score indicating the model's confidence. 📈
- Architecture: Simple Recurrent Neural Network (RNN) 🤖
- Dataset: IMDB Movie Reviews Dataset 📚
- Preprocessing: Reviews are tokenized and padded to a fixed length of 500 words. ✂️
- Output: Binary classification indicating Positive or Negative sentiment. ✅
The primary script to launch the Streamlit app. It includes helper functions for text preprocessing and generating real-time predictions. 🛠️
A Jupyter Notebook used for training and evaluating the RNN model. It encompasses:
- Data loading and preprocessing 📂
- Model architecture and training pipeline 🏗️
- Evaluation metrics 📊
The pre-trained RNN model saved in HDF5 format. This file is essential for making predictions without retraining the model. 💾
A comprehensive list of dependencies required for the project. Ensure all packages are installed to run the application smoothly. 📦
The project relies on the following libraries:
tensorflow==2.15.0
🧠numpy
➕pandas
🐼scikit-learn
🔧tensorboard
📈streamlit
🌐scikeras
🔗
Screenshot of the IMDB Movie Review Sentiment Analysis application in action.
✨ Happy Sentiment Analyzing! ✨