YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
---
language:
- en
license: apache-2.0
tags:
- text-classification
- sentiment-analysis
- bert
datasets:
- imdb
metrics:
- accuracy
- f1
base_model: bert-base-uncased
---
Model Card for bert-base-uncased fine-tuned on IMDB Sentiment Classification
Model Description
This model is a text classification model fine-tuned from the [translate:bert-base-uncased] base model.
It is trained on the IMDB movie review dataset to classify sentiment into two categories:
- 0: Negative
- 1: Positive
Training Data
The model was fine-tuned using the IMDB dataset consisting of movie reviews labeled with positive or negative sentiments.
Evaluation
- Dataset: IMDB test set
- Metrics:
- Accuracy: 0.77
- F1-score: 0.77
## Usage
---
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "Lucky0626/bert-base-uncased-imdb2-v01"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "This movie was absolutely fantastic!"
inputs = tokenizer(text, return_tensors="pt", max_length=128, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=-1)
print("Predicted sentiment:", predictions.item())
---
Limitations
- The model is trained only on English movie reviews and might not perform well on other languages or domains.
- Sentiment classification is binary; neutral or mixed sentiments are not classified.
License
- The base model, [translate:bert-base-uncased], is licensed under Apache 2.0.
- The IMDB dataset is publicly available for research purposes.
- Downloads last month
- 6
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support