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
Download samples/examples.json from Noor-Khan/spam-detector: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/Noor-Khan/spam-detector/resolve/main/samples/examples.json
- Command line
-
hf download hf://Noor-Khan/spam-detector/samples/examples.json
-
curl -L -o examples.json https://huggingface.co/Noor-Khan/spam-detector/resolve/main/samples/examples.json
1.27 kB
| { | |
| "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 | |
| } | |
| ] | |
| } |