Downloads · 30 days
9
35% of all-time downloads
dina1/bert-imdb-sentiment
bert-imdb-sentiment is a text classification model from dina1. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This model is a fine-tuned version of bert-base-uncased on the IMDB movie reviews dataset.
Downloads · 30 days
9
35% of all-time downloads
All-time downloads
26
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of bert-base-uncased on the IMDB movie reviews dataset.
Binary Sentiment Classification:
0 → Negative1 → Positivefrom transformers import AutoTokenizer, AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("dina1/bert-imdb-sentiment")
tokenizer = AutoTokenizer.from_pretrained("dina1/bert-imdb-sentiment")
text = "This movie was absolutely wonderful!"
inputs = tokenizer(text, return_tensors="pt", truncation=True)
outputs = model(**inputs)
predicted_class = outputs.logits.argmax().item()
print("Predicted Sentiment:", predicted_class)