Jasontth/climate_fever_plus
Viewer โข Updated โข 16.2k โข 74 โข 1
How to use JLei/climate_fever_roberta-base-fact-checking with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="JLei/climate_fever_roberta-base-fact-checking") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("JLei/climate_fever_roberta-base-fact-checking")
model = AutoModelForSequenceClassification.from_pretrained("JLei/climate_fever_roberta-base-fact-checking", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("JLei/climate_fever_roberta-base-fact-checking")
model = AutoModelForSequenceClassification.from_pretrained("JLei/climate_fever_roberta-base-fact-checking", device_map="auto")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="JLei/climate_fever_roberta-base-fact-checking")