Update README.md
Browse files
README.md
CHANGED
|
@@ -44,7 +44,7 @@ tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
|
|
| 44 |
model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
|
| 45 |
|
| 46 |
text = "CIA Realizes It's Been Using Black Highlighters All These Years."
|
| 47 |
-
tokenized_text = tokenizer([preprocess_data(text)], padding=True, truncation=True, max_length=
|
| 48 |
output = model(**tokenized_text)
|
| 49 |
probs = output.logits.softmax(dim=-1).tolist()[0]
|
| 50 |
confidence = max(probs)
|
|
@@ -56,7 +56,7 @@ results = {"is_sarcastic": prediction, "confidence": confidence}
|
|
| 56 |
Output:
|
| 57 |
|
| 58 |
```
|
| 59 |
-
{'is_sarcastic': 1, 'confidence': 0.
|
| 60 |
```
|
| 61 |
|
| 62 |
## Performance
|
|
|
|
| 44 |
model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
|
| 45 |
|
| 46 |
text = "CIA Realizes It's Been Using Black Highlighters All These Years."
|
| 47 |
+
tokenized_text = tokenizer([preprocess_data(text)], padding=True, truncation=True, max_length=256, return_tensors="pt")
|
| 48 |
output = model(**tokenized_text)
|
| 49 |
probs = output.logits.softmax(dim=-1).tolist()[0]
|
| 50 |
confidence = max(probs)
|
|
|
|
| 56 |
Output:
|
| 57 |
|
| 58 |
```
|
| 59 |
+
{'is_sarcastic': 1, 'confidence': 0.9337034225463867}
|
| 60 |
```
|
| 61 |
|
| 62 |
## Performance
|