stanfordnlp/imdb
Viewer • Updated • 100k • 180k • 370
How to use Beehzod/smart_sentiment_analysis with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Beehzod/smart_sentiment_analysis") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Beehzod/smart_sentiment_analysis")
model = AutoModelForSequenceClassification.from_pretrained("Beehzod/smart_sentiment_analysis")This model is a fine-tuned version of DistilBERT for sentiment analysis tasks. It was trained on the IMDB dataset to classify movie reviews as positive or negative. It can be used in applications where text sentiment analysis is needed, such as social media monitoring or customer feedback analysis.
The model was evaluated on a held-out test set using the following metrics:
To use this sentiment analysis model with the Hugging Face Transformers library:
from transformers import pipeline
# Load the model from the Hugging Face Hub
sentiment_pipeline = pipeline("sentiment-analysis", model="Beehzod/smart_sentiment_analysis")
# Example predictions
text = "This movie was fantastic! I really enjoyed it."
results = sentiment_pipeline(text)
for result in results:
print(f"Label: {result['label']}, Score: {result['score']:.4f}")