Skip to content

Repository files navigation

Sentiment-Explorer-Using-Simple-RNN

This project demonstrates how to use a Simple Recurrent Neural Network (RNN) to classify IMDb movie reviews as positive or negative.

Table of Contents

Introduction

Sentiment analysis is a common task in natural language processing (NLP) that involves determining the emotional tone behind a text. In this project, we use the IMDb dataset, a collection of movie reviews labeled as positive or negative, to train and evaluate a Simple RNN model.

Dataset

The dataset is part of the TensorFlow/Keras library and can be directly loaded using: python

     from tensorflow.keras.datasets import imdb

Model Architecture

The Simple RNN model consists of the following layers:

  1. Embedding Layer: Converts word indices to dense vectors of fixed size.
  2. Simple RNN Layer: Processes sequences of embeddings to capture temporal dependencies.
  3. Dense Layer: Fully connected layer with a single neuron and sigmoid activation for binary classification.

rnnsummary

Prerequisites

  • Python 3.8+
  • TensorFlow 2.0+
  • NumPy
  • Matplotlib (optional, for visualization)

Run the code using steps -

  1. Clone the repository
 git clone <url_of_repository>
  1. Select the kernel and run all the files.
  2. Run main.py using commond
    streamlit run main.py
  3. Enter the movie review & classify it as positive or negative.

good review

badreviw


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages