Update README.md
Browse files
README.md
CHANGED
@@ -46,7 +46,7 @@ tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
|
|
46 |
model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
|
47 |
|
48 |
text = "We deden een man een nacht in een vat met cola en nu is hij dood"
|
49 |
-
tokenized_text = tokenizer([preprocess_data(text)], padding=True, truncation=True, max_length=
|
50 |
output = model(**tokenized_text)
|
51 |
probs = output.logits.softmax(dim=-1).tolist()[0]
|
52 |
confidence = max(probs)
|
@@ -58,7 +58,7 @@ results = {"is_sarcastic": prediction, "confidence": confidence}
|
|
58 |
Output:
|
59 |
|
60 |
```
|
61 |
-
{'is_sarcastic': 1, 'confidence': 0.
|
62 |
```
|
63 |
|
64 |
## Performance
|
|
|
46 |
model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
|
47 |
|
48 |
text = "We deden een man een nacht in een vat met cola en nu is hij dood"
|
49 |
+
tokenized_text = tokenizer([preprocess_data(text)], padding=True, truncation=True, max_length=256, return_tensors="pt")
|
50 |
output = model(**tokenized_text)
|
51 |
probs = output.logits.softmax(dim=-1).tolist()[0]
|
52 |
confidence = max(probs)
|
|
|
58 |
Output:
|
59 |
|
60 |
```
|
61 |
+
{'is_sarcastic': 1, 'confidence': 0.8915400505065918}
|
62 |
```
|
63 |
|
64 |
## Performance
|