stanfordnlp/imdb
Viewer • Updated • 100k • 271k • 380
How to use omaressamrme/tuning with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="omaressamrme/tuning") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("omaressamrme/tuning")
model = AutoModelForSequenceClassification.from_pretrained("omaressamrme/tuning")Fine-tuned DistilBERT for sentiment analysis on the IMDb dataset.
from transformers import pipeline
clf = pipeline("text-classification", model="omaressamrme/tuning")
print(clf("I absolutely loved this movie!"))
curl -H "Authorization: Bearer $HF_TOKEN" -H "Content-Type: application/json" -d '{"inputs": "I absolutely loved this movie!"}' https://api-inference.huggingface.co/models/omaressamrme/tuning
Open the Space: https://huggingface.co/spaces/omaressamrme/tuning-space
You can batch texts using the pipeline:
texts = ["Great film!", "Worst plot ever."]
preds = clf(texts)
Try comparing against another sentiment model (e.g., distilbert-base-uncased-finetuned-sst-2-english) in the Space "Compare" tab.
See the training script in the associated GitHub repo.