Beyond Good Intentions: Reporting the Research Landscape of NLP for Social Good
Paper • 2305.05471 • Published
How to use feradauto/scibert_nlp4sg with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="feradauto/scibert_nlp4sg") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("feradauto/scibert_nlp4sg")
model = AutoModelForSequenceClassification.from_pretrained("feradauto/scibert_nlp4sg", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("feradauto/scibert_nlp4sg")
model = AutoModelForSequenceClassification.from_pretrained("feradauto/scibert_nlp4sg", device_map="auto")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="feradauto/scibert_nlp4sg")