Skip to content

Latest commit

Β 

History

History
108 lines (70 loc) Β· 2.69 KB

File metadata and controls

108 lines (70 loc) Β· 2.69 KB

🎬 Review Analysis System

A Streamlit web app for analyzing movie reviews and classifying them as positive or negative using a pre-trained RNN model built with TensorFlow and Keras on the IMDb dataset.


πŸ“š Project Overview

This project allows users to input any movie review text and receive a real-time sentiment prediction.
It uses a simple Recurrent Neural Network (RNN) trained on the IMDb movie review dataset.
The web interface is built with Streamlit for a fast, clean, and easy user experience.


πŸš€ Features

  • Text Input: Users can input any movie review.
  • Sentiment Prediction: Classifies the review as Positive or Negative.
  • Prediction Score: Shows the model's confidence score for the prediction.
  • Real-time Analysis: Quick response via a lightweight Streamlit interface.

πŸ› οΈ Technologies Used

  • Python
  • TensorFlow / Keras
  • Streamlit
  • IMDb Dataset (Keras built-in)

🧠 How It Works

  • The app loads a pre-trained RNN model (simple_rnn_imdb.h5).
  • User input is preprocessed by:
    • Tokenizing words based on IMDb's word index.
    • Padding the sequence to a fixed length (500).
  • The processed text is passed to the model for sentiment prediction.
  • Displays whether the review is Positive or Negative along with the confidence score.

βš™οΈ How to Run Locally

  1. Clone this repository:

    git clone https://github.com/your-username/review-analysis-system.git
    cd review-analysis-system
  2. Install the required packages:

    pip install tensorflow streamlit
  3. Make sure you have the pre-trained model file:

    • simple_rnn_imdb.h5 should be present in the project folder.
  4. Run the Streamlit app:

    streamlit run app.py
  5. Open the app in your browser at:

    http://localhost:8501
    

πŸ“‚ Project Structure

β”œβ”€β”€ app.py                  # Main Streamlit application
β”œβ”€β”€ simple_rnn_imdb.h5       # Pre-trained RNN model
└── README.md                # Project documentation

πŸ“’ Future Improvements

  • Add live review scraping (e.g., from Rotten Tomatoes or IMDb).
  • Improve preprocessing with punctuation removal and stopword filtering.
  • Deploy online using platforms like Streamlit Cloud or AWS.

🀝 Contributing

Pull requests are welcome!
If you find any bugs or want to add features, feel free to open an issue or submit a pull request.


πŸ“œ License

This project is open source under the MIT License.


🌟 Show Your Support

If you like this project, please ⭐ star the repo β€” it really helps!