Text Classification
Transformers
PyTorch
English
roberta
fact-checking
climate
text entailment
text-embeddings-inference
Instructions to use amandakonet/climatebert-fact-checking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amandakonet/climatebert-fact-checking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="amandakonet/climatebert-fact-checking")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("amandakonet/climatebert-fact-checking") model = AutoModelForSequenceClassification.from_pretrained("amandakonet/climatebert-fact-checking") - Notebooks
- Google Colab
- Kaggle
Commit ·
6127b9f
1
Parent(s): a5675d3
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,7 @@ features = tokenizer(['Beginning in 2005, however, polar ice modestly receded fo
|
|
| 25 |
model.eval()
|
| 26 |
with torch.no_grad():
|
| 27 |
scores = model(**features).logits
|
| 28 |
-
label_mapping = ['
|
| 29 |
labels = [label_mapping[score_max] for score_max in scores.argmax(dim=1)]
|
| 30 |
print(labels)
|
| 31 |
```
|
|
|
|
| 25 |
model.eval()
|
| 26 |
with torch.no_grad():
|
| 27 |
scores = model(**features).logits
|
| 28 |
+
label_mapping = ['entailment', 'contradiction', 'neutral']
|
| 29 |
labels = [label_mapping[score_max] for score_max in scores.argmax(dim=1)]
|
| 30 |
print(labels)
|
| 31 |
```
|