File size: 1,004 Bytes
b02bdfd 1bc2fda b02bdfd 1bc2fda |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
---
license: apache-2.0
datasets:
- imdb
metrics:
- accuracy
pipeline_tag: text-classification
---
# 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:
```python
# 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"
|