Instructions to use Noor-Khan/spam-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Noor-Khan/spam-detector with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Noor-Khan/spam-detector", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
File size: 1,272 Bytes
46783e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"examples": [
{
"text": "Congratulations! You have WON a FREE 1000 cash prize. Call 09001234567 now to claim your reward!",
"expected": "spam",
"lr_p_spam": 0.9578,
"lr_label": "spam",
"nb_p_spam": 1.0,
"nb_label": "spam"
},
{
"text": "Hey, are we still meeting for lunch tomorrow? Let me know what time works for you.",
"expected": "ham",
"lr_p_spam": 0.0273,
"lr_label": "ham",
"nb_p_spam": 0.0001,
"nb_label": "ham"
},
{
"text": "URGENT: Your account will be closed today unless you verify your details at http://bit.ly/verify-now",
"expected": "spam",
"lr_p_spam": 0.3056,
"lr_label": "ham",
"nb_p_spam": 0.5219,
"nb_label": "spam"
},
{
"text": "Ok lar, see you at 7. Bring the notes from class.",
"expected": "ham",
"lr_p_spam": 0.0349,
"lr_label": "ham",
"nb_p_spam": 0.0001,
"nb_label": "ham"
}
],
"edge_cases": [
{
"text": "",
"lr_p_spam": 0.069,
"nb_p_spam": 0.1342
},
{
"text": "!!! ??? ...",
"lr_p_spam": 0.069,
"nb_p_spam": 0.1342
},
{
"text": " ",
"lr_p_spam": 0.069,
"nb_p_spam": 0.1342
}
]
} |