Skip to content

Aryanonghub/Sentiment-Analysis-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors