Views
No views yet
1from transformers import pipeline
2
3pipe = pipeline("text-classification",
4 model="RazakAIhub/distilbert-spam-classifier")
5
6result = pipe("Congratulations! You've won a free prize!")
7print(result) # [{'label': 'spam', 'score': 0.99}]ham — legitimate messagespam — spam message