Text Classification
Transformers
TensorBoard
Safetensors
English
distilbert
sentiment-analysis
imdb
fine-tuned
text-embeddings-inference
Instructions to use BhuviMohan/distilbert-imdb-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BhuviMohan/distilbert-imdb-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="BhuviMohan/distilbert-imdb-finetuned")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("BhuviMohan/distilbert-imdb-finetuned") model = AutoModelForSequenceClassification.from_pretrained("BhuviMohan/distilbert-imdb-finetuned") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("BhuviMohan/distilbert-imdb-finetuned")
model = AutoModelForSequenceClassification.from_pretrained("BhuviMohan/distilbert-imdb-finetuned")Quick Links
DistilBERT Fine-Tuned on IMDB Sentiment Dataset
This model is a fine-tuned version of distilbert-base-uncased on the IMDB movie reviews dataset for binary sentiment classification (positive/negative).
Model Details
- Base model: distilbert-base-uncased
- Dataset: IMDB (25k train + 25k test reviews)
- Labels:
- 0 โ negative
- 1 โ positive
How to Use
from transformers import pipeline
clf = pipeline("text-classification", model="BhuviMohan/distilbert-imdb-finetuned")
print(clf("The movie was absolutely fantastic!"))
## Training Procedure
- Epochs: 1
- Batch size: 8
- Learning rate: 2e-5
- Optimizer: AdamW
- Hardware: CPU training (Windows)
- Results (Evaluation)
**Accuracy: ~1.0 (on 2k subset)**
Save the file.
---
# โ
**STEP 5 โ Upload model to Hugging Face Hub**
Make sure your token is created with **Write access**.
Then login (if not logged in):
```bash
huggingface-cli login
- Downloads last month
- -
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="BhuviMohan/distilbert-imdb-finetuned")