Delete README.md
Browse files
README.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
tags:
|
| 3 |
-
- text-classification
|
| 4 |
-
- pytorch
|
| 5 |
-
- transformers
|
| 6 |
-
library_name: transformers
|
| 7 |
-
language: en
|
| 8 |
-
datasets:
|
| 9 |
-
- yelp_review
|
| 10 |
-
model_type: bert
|
| 11 |
-
---
|
| 12 |
-
# Sentiment Analysis Model: Fine-tuned BERT Base
|
| 13 |
-
|
| 14 |
-
This model is a fine-tuned version of `bert-base-cased` on the Yelp Reviews dataset for sentiment analysis.
|
| 15 |
-
|
| 16 |
-
## Intended Use
|
| 17 |
-
|
| 18 |
-
This model predicts the sentiment of a given text, classifying it as either:
|
| 19 |
-
- `positive`
|
| 20 |
-
- `negative`
|
| 21 |
-
|
| 22 |
-
## Example Usage
|
| 23 |
-
|
| 24 |
-
```python
|
| 25 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 26 |
-
|
| 27 |
-
model_name = "your-username/your-model-name"
|
| 28 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 29 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 30 |
-
|
| 31 |
-
inputs = tokenizer("This restaurant is amazing!", return_tensors="pt")
|
| 32 |
-
outputs = model(**inputs)
|
| 33 |
-
logits = outputs.logits
|
| 34 |
-
print(logits)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|