Views
No views yet
state_dict.1from huggingface_hub import hf_hub_download
2import torch
3from BertEmotionClassifier import BertEmotionClassifier
4
5model_path = hf_hub_download(repo_id="aadhi3/RoBert_Model", filename="model.pth")
6
7model = BertEmotionClassifier(num_labels=5)
8model.load_state_dict(torch.load(model_path, map_location="cpu"))
9model.eval()