|
|
--- |
|
|
language: en |
|
|
license: mit |
|
|
tags: |
|
|
- sentiment-analysis |
|
|
- mini-transformer |
|
|
pipeline_tag: text-classification |
|
|
library_name: pytorch |
|
|
datasets: |
|
|
- custom |
|
|
--- |
|
|
|
|
|
# Mini Transformer Sentiment Model |
|
|
|
|
|
A minimal Transformer encoder for sentiment classification. |
|
|
Trained on a small custom dataset using PyTorch. |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") |
|
|
model = AutoModelForSequenceClassification.from_pretrained("mishrabp/mini-transformers") |
|
|
|
|
|
inputs = tokenizer("I love this!", return_tensors="pt") |
|
|
print(model(**inputs).logits) |
|
|
|