Downloads · 30 days
0
shivasuryas/spam_classifier
spam_classifier is a text classification model from shivasuryas. Use it when you need a label for a piece of text. The card lists the license as mit.
Downloads · 30 days
0
Access
Public
Updated Jun 2, 2024
Repo size
548 MB
Likes
1
Public
Click a slice to open those files.
.pth548 MB · 100%
From the Hugging Face model README
model_state_dict = torch.load("review_classifier.pth", map_location=torch.device('cpu'))
model.load_state_dict(model_state_dict)
text_1 = (
"I love to go to Waterloo university and summer break"
""
)
print(classify_review(
text_1, model, tokenizer, device, max_length=train_dataset.max_length
))