How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="Jack5654/bert-sentiment-imdb")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("Jack5654/bert-sentiment-imdb")
model = AutoModelForSequenceClassification.from_pretrained("Jack5654/bert-sentiment-imdb", device_map="auto")
Quick Links

bert-sentiment-imdb

This is a fine-tuned BERT model for sentiment analysis on the IMDB dataset.

  • Base Model: bert-base-uncased
  • Dataset: IMDB
  • Task: Sentiment Analysis (Binary)

Usage

from transformers import pipeline

classifier = pipeline(
    "sentiment-analysis", model="Jack5654/bert-sentiment-imdb"
)

result = classifier("This movie was amazing! I loved every minute of it.")
print(result)
# [{'label': 'LABEL_1' (positive), 'score': ...}]
Downloads last month
87
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using Jack5654/bert-sentiment-imdb 1