Skip to content

Implementation of a Recurrent Neural Network (RNN) using TensorFlow/Keras for binary sentiment classification on the IMDB dataset, featuring word embeddings, sequence padding, and a Streamlit interface for real-time inference.

License

Notifications You must be signed in to change notification settings

anjaliy11/RNN_sentimental_analysis

Repository files navigation

🎭 RNN Sentiment Analysis

Python TensorFlow Keras License


📖 Overview

This project implements a Simple Recurrent Neural Network (RNN) model for sentiment analysis on the IMDB movie review dataset.
The model classifies reviews as positive or negative based on textual input.

It also includes a Streamlit web app that allows users to input custom reviews and receive predictions in real time.


📑 Table of Contents


⚡ Quickstart

🔹 Clone Repository

git clone https://github.com/anjaliy11/RNN_sentimental_analysis.git
cd RNN_sentimental_analysis

🔹 Install Dependencies

pip install -r requirements.txt

🔹 Train the Model

jupyter notebook
simple_rnn.ipynb
prediction.ipynb

🔹 Run the Streamlit App

streamlit run main.py

✨ Features

✅ Train an RNN on the IMDB dataset
✅ Sentiment classification (Positive / Negative)
✅ Interactive Streamlit app for real-time predictions
✅ Preprocessing of text using word embeddings and padding
✅ High accuracy model with user-friendly interface


📂 Project Structure

RNN_sentimental_analysis/
│── main.py                 # Streamlit app for predictions
│── simple_rnn.ipynb                # Training script for RNN model
│── simple_rnn_imdb.keras   # Saved model file
│── requirements.txt        # Required dependencies
│── README.md               # Project documentation

🗺 Roadmap

  • Improve model generalization with LSTM/GRU
  • Add more datasets for robust sentiment classification
  • Enhance UI with advanced visualization
  • Deploy app on cloud (Heroku/Streamlit Cloud)

🤝 Contribution

Contributions are welcome!

  1. Fork the repo
  2. Create a new branch (feature-xyz)
  3. Commit your changes
  4. Open a Pull Request

📜 License

This project is licensed under the MIT License.


🙌 Acknowledgements


About

Implementation of a Recurrent Neural Network (RNN) using TensorFlow/Keras for binary sentiment classification on the IMDB dataset, featuring word embeddings, sequence padding, and a Streamlit interface for real-time inference.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published