File size: 210 Bytes
0e7cada
 
 
 
 
 
 
1
2
3
4
5
6
7
import torch
from transformers import AutoModelForSequenceClassification

def load_model(model_path):
    model = AutoModelForSequenceClassification.from_pretrained(model_path)
    model.eval()
    return model