fancyzhx/ag_news
Viewer • Updated • 128k • 115k • 203
How to use AyoubChLin/news-ESG-Bert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="AyoubChLin/news-ESG-Bert") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("AyoubChLin/news-ESG-Bert")
model = AutoModelForSequenceClassification.from_pretrained("AyoubChLin/news-ESG-Bert", device_map="auto")