Instructions to use Beast212004/nlp-sentiment-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Beast212004/nlp-sentiment-models with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://Beast212004/nlp-sentiment-models") - Notebooks
- Google Colab
- Kaggle
NLP Sentiment Analysis Models
Pre-trained deep learning models for sentiment analysis on Amazon product reviews.
Models Included
- CNN (TensorFlow): Convolutional Neural Network with learned embeddings
- CNN + GloVe (TensorFlow): CNN with pre-trained GloVe embeddings
- CNN (PyTorch): Convolutional Neural Network with learned embeddings
- CNN + GloVe (PyTorch): CNN with pre-trained GloVe embeddings
- BiLSTM + GloVe (PyTorch): Bidirectional LSTM with pre-trained GloVe embeddings
Dataset
Trained on Amazon Reviews 2023 dataset with ~47K product reviews across multiple categories.
Performance
- CNN models: ~85-87% accuracy
- BiLSTM models: ~86-88% accuracy
Usage
These models are automatically downloaded by the Streamlit dashboard when deployed on Streamlit Cloud.
Manual Download
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="Beast212004/nlp-sentiment-models",
filename="cnn_pytorch_pretrained.pt"
)
Repository
GitHub: https://github.com/YOUR_USERNAME/nlp-sentiment-analysis
- Downloads last month
- 33
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support