| | --- |
| | language: |
| | - en |
| | tags: |
| | - sentiment-analysis |
| | - text-classification |
| | datasets: |
| | - sst2 |
| | model_type: distilbert |
| | license: apache-2.0 |
| | --- |
| | |
| |
|
| |
|
| | # My First Model |
| | This is a pre-trained DistilBERT model fine-tuned on the SST-2 dataset for sentiment analysis. It predicts whether a given text expresses positive or negative sentiment. |
| |
|
| | ## How to Use |
| | ```python |
| | from transformers import AutoModelForSequenceClassification, AutoTokenizer |
| | model = AutoModelForSequenceClassification.from_pretrained("your_username/my-first-model") |
| | tokenizer = AutoTokenizer.from_pretrained("your_username/my-first-model") |
| | inputs = tokenizer("This movie is great!", return_tensors="pt") |
| | outputs = model(**inputs) |
| | |
| | |