Skip to content

adhi29/sentimental-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMDb Movie Review Sentiment Analysis

Overview

This project provides a simple web application for sentiment analysis of IMDb movie reviews using a pre-trained TensorFlow model. The application is built with Streamlit, allowing users to input a movie review and receive a sentiment prediction (Positive or Negative).

Features

  • Input a movie review via a text area.
  • Analyze the sentiment using a pre-trained TensorFlow model.
  • Display the predicted sentiment (Positive or Negative).

Requirements

  • Python 3.8+
  • Streamlit
  • TensorFlow

Installation

  1. Clone the repository:
    git clone <repository_url>
    cd <repository_directory>
  2. Install the required packages:
    pip install -r requirements.txt
  3. Ensure the pre-trained model file (path_to_your_model.h5) is available and update the load_model function in dl_movie.py with the correct file path.

Usage

  1. Run the Streamlit app:
    streamlit run dl_movie.py
  2. Open the provided URL in your browser (typically http://localhost:8501).
  3. Enter a movie review in the text area and click "Analyze Review" to see the sentiment prediction.

File Structure

  • dl_movie.py: Main application script containing the Streamlit app and model logic.
  • path_to_your_model.h5: Pre-trained TensorFlow model file (update path as needed).
  • requirements.txt: List of required Python packages.

Notes

  • The model file (path_to_your_model.h5) must be a valid TensorFlow model trained for binary sentiment classification.
  • The predict_sentiment function assumes a binary classification threshold of 0.5.
  • Ensure the model path in load_model is correctly set before running the app.

About

this is my first project using lstm to identify a movie is positive,negative or neutral.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages