cornell-movie-review-data/rotten_tomatoes
Viewer • Updated • 10.7k • 79.4k • 112
How to use FlySharker/distilbert-rotten-tomatoes with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="FlySharker/distilbert-rotten-tomatoes") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("FlySharker/distilbert-rotten-tomatoes")
model = AutoModelForSequenceClassification.from_pretrained("FlySharker/distilbert-rotten-tomatoes")This repository contains a fine-tuned version of DistilBERT optimized for sentiment classification.
The model was trained on the Rotten Tomatoes dataset, which consists of 10,662 movie snippets from the Rotten Tomatoes editorial staff. The goal is to determine whether a given review snippet is "Fresh" (positive) or "Rotten" (negative).
from transformers import pipeline
classifier = pipeline("text-classification", model="你的用户名/你的模型名")
result = classifier("This movie was an absolute masterpiece with stunning visuals!")
print(result)
# Output: [{'label': 'POSITIVE', 'score': 0.999}]
Base model
distilbert/distilbert-base-uncased