amcoff/skolmat
Viewer • Updated • 901 • 75
How to use amcoff/classify_skolmat with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="amcoff/classify_skolmat") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("amcoff/classify_skolmat")
model = AutoModelForSequenceClassification.from_pretrained("amcoff/classify_skolmat")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("amcoff/classify_skolmat")
model = AutoModelForSequenceClassification.from_pretrained("amcoff/classify_skolmat")from transformers import pipeline
nlp = pipeline(
"text-classification",
model="amcoff/classify_skolmat",
tokenizer="KBLab/bert-base-swedish-cased",
)
nlp("Kökets val")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="amcoff/classify_skolmat")