Instructions to use THE-NIKHIL07/sentiment_model_Conv1D with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use THE-NIKHIL07/sentiment_model_Conv1D with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://THE-NIKHIL07/sentiment_model_Conv1D") - Notebooks
- Google Colab
- Kaggle
Conv1D Sentiment Analysis Model
This is a Keras Conv1D model trained on the IMDB movie review dataset for binary sentiment classification.
- Labels: 0 = Negative, 1 = Positive
- Preprocessing: TextVectorization layer included inside the model
- Architecture: Embedding -> Conv1D -> GlobalMaxPooling -> Dense layers
- Embeddings: Can use pretrained embeddings or trainable embeddings
Usage Example
from tensorflow.keras.models import load_model
model = load_model("sentiment_model.keras")
pred = model.predict(["This movie was amazing"])
print(pred)
This model was trained in Google Colab.