BAPULM / utils /inference.py
Moreza009's picture
Upload folder using huggingface_hub
15c5ffb verified
import torch
from model.model import BAPULM
def load_model(checkpoint_path, device):
model = BAPULM()
model.to(device)
model.load_state_dict(torch.load(checkpoint_path, map_location=device))
model.eval()
return model