stanfordnlp/imdb
Viewer • Updated • 100k • 177k • 472
How to use kaniskaZoro/sentiment-analyzer-2x-accuracy with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="kaniskaZoro/sentiment-analyzer-2x-accuracy") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("kaniskaZoro/sentiment-analyzer-2x-accuracy")
model = AutoModelForSequenceClassification.from_pretrained("kaniskaZoro/sentiment-analyzer-2x-accuracy", device_map="auto")This repository contains a sentiment analysis model trained on the IMDb dataset. The model is based on distilbert-base-uncased and fine-tuned for binary sentiment classification (positive/negative).
sentiment_model/ : Contains the trained model files.results/checkpoint-125/ : Checkpoint directory from training.sample_data/ : Sample dataset files used for training and evaluation.wandb/ : Weights & Biases logs and run data.pip install transformers datasets sentence-transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained('kaniskaZoro/sentiment-analyzer')
model = AutoModelForSequenceClassification.from_pretrained('kaniskaZoro/sentiment-analyzer-2x-accuracy')
text = "The movie was fantastic!"
inputs = tokenizer(text, return_tensors='pt', padding=True, truncation=True, max_length=256)
outputs = model(**inputs)
The model was trained using the Trainer API from Hugging Face Transformers with the following settings:
Specify license here (e.g., MIT, Apache 2.0).