Pankaj001 commited on
Commit
1bc2fda
·
verified ·
1 Parent(s): b02bdfd

adding documentation

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -1,3 +1,32 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ datasets:
4
+ - imdb
5
+ metrics:
6
+ - accuracy
7
+ pipeline_tag: text-classification
8
  ---
9
+
10
+ # LSTM Text Classification Model for Sentiment Analysis
11
+
12
+ 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.
13
+
14
+ ## Model Details
15
+ - **Architecture**: Long Short-Term Memory (LSTM) Neural Network
16
+ - **Dataset**: IMDB Movie Reviews (Sentiment Classification)
17
+ - **Accuracy**: 96%
18
+
19
+ ## Usage
20
+ You can use this model for sentiment analysis tasks. Below are some code snippets to help you get started:
21
+
22
+ ```python
23
+ # Load the model and perform inference
24
+ import tensorflow as tf
25
+ model = tf.keras.models.load_model('imdb_lstm_model.h5')
26
+
27
+
28
+ # Perform inference
29
+ prediction = model.predict([text])
30
+
31
+ # Get the predicted sentiment (e.g., 'Positive' or 'Negative')
32
+ predicted_sentiment = "Positive" if prediction > 0.5 else "Negative"