stanfordnlp/imdb
Viewer โข Updated โข 100k โข 171k โข 945
How to use jainarika/sentiment-lstm with Keras:
# !pip install -U keras tensorflow huggingface_hub
# Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here;
# "jax" and "torch" also work for computation once TensorFlow is installed.
import os
os.environ["KERAS_BACKEND"] = "tensorflow"
import keras
model = keras.saving.load_model("hf://jainarika/sentiment-lstm")
Binary sentiment classifier (positive / negative) for movie reviews, trained on the IMDB dataset.
best_model.keras: trained Keras modelword_index.pkl: vocabulary used for tokenisingapp.log: training logTrained only on movie reviews; may do poorly on other domains, sarcasm, or mixed-sentiment text.