Commit ·
95634f6
1
Parent(s): 3ee841e
Update README.md
Browse files
README.md
CHANGED
|
@@ -75,7 +75,19 @@ Like many machine learning models, this model may exhibit bias in its decision-m
|
|
| 75 |
|
| 76 |
Use the code below to get started with the model.
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
## Training Details
|
| 81 |
|
|
|
|
| 75 |
|
| 76 |
Use the code below to get started with the model.
|
| 77 |
|
| 78 |
+
```python
|
| 79 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 80 |
+
|
| 81 |
+
tokenizer = AutoTokenizer.from_pretrained("webimmunization/COVID-19-CT-tweets-classification")
|
| 82 |
+
model = AutoModelForSequenceClassification.from_pretrained("webimmunization/COVID-19-CT-tweets-classification")
|
| 83 |
+
|
| 84 |
+
tweet = "bill gates has been talking about population control openly for years - now we have a coronavirus vaccine! coincidence? i think not!"
|
| 85 |
+
conspiracy_theory = "the coronavirus vaccine is either unsafe or part of a larger plot to control people or reduce the population."
|
| 86 |
+
|
| 87 |
+
encoded_input = tokenizer(tweet, conspiracy_theory, return_tensors="pt")
|
| 88 |
+
logits = model(encoded_input.input_ids, encoded_input.attention_mask).logits
|
| 89 |
+
support_likelihood = logits.softmax(dim=1)[0].tolist()[0] # 0.93198
|
| 90 |
+
```
|
| 91 |
|
| 92 |
## Training Details
|
| 93 |
|