LSTM Text Classification Model for Sentiment Analysis

This repository contains a Long Short-Term Memory (LSTM) text classification model trained on the IMDB dataset for sentiment analysis. The model has achieved an accuracy of 96% on the test dataset and is available for use as a TensorFlow model.

Model Details

  • Architecture: Long Short-Term Memory (LSTM) Neural Network
  • Dataset: IMDB Movie Reviews (Sentiment Classification)
  • Accuracy: 96%

Usage

You can use this model for sentiment analysis tasks. Below are some code snippets to help you get started:

# Load the model and perform inference
import tensorflow as tf
model = tf.keras.models.load_model('imdb_lstm_model.h5')


# Perform inference
prediction = model.predict([text])

# Get the predicted sentiment (e.g., 'Positive' or 'Negative')
predicted_sentiment = "Positive" if prediction > 0.5 else "Negative"
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Dataset used to train Pankaj001/TextClassification-IMDB-dataset