Downloads · 30 days
5
11% of all-time downloads
usef310/flan-t5-small-sentiment
flan-t5-small-sentiment is a text classification model from usef310. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Fine-tuned version of google/flan-t5-small for sentiment analysis on IMDB reviews.
Downloads · 30 days
5
11% of all-time downloads
All-time downloads
47
Public
Parameters
77M
309 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
Fine-tuned version of google/flan-t5-small for sentiment analysis on IMDB reviews.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("usef310/flan-t5-small-sentiment")
model = AutoModelForSeq2SeqLM.from_pretrained("usef310/flan-t5-small-sentiment")
text = "This movie was amazing!"
inputs = tokenizer("sentiment: " + text, return_tensors="pt")
outputs = model.generate(**inputs)
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(prediction) # Output: positive or negative