Instructions to use thuggingface/multi-nb-tfidf-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thuggingface/multi-nb-tfidf-model with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("thuggingface/multi-nb-tfidf-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from thuggingface/multi-nb-tfidf-model: direct link, hf CLI and curl.
- Browser
- Download file 747 Bytes
-
https://huggingface.co/thuggingface/multi-nb-tfidf-model/resolve/main/README.md
- Command line
-
hf download hf://thuggingface/multi-nb-tfidf-model/README.md
-
curl -L -o README.md https://huggingface.co/thuggingface/multi-nb-tfidf-model/resolve/main/README.md
747 Bytes
| # Multinomial Naive Bayes with TF-IDF | |
| This is a Multinomial Naive Bayes model trained with a TF-IDF vectorizer on a phishing detection dataset. It was trained using scikit-learn with the support of the National Innovation Centre for Data (NICD) at Newcastle University. | |
| ## Usage | |
| You can load and use this model with the following script: | |
| ```python | |
| import joblib | |
| from huggingface_hub import hf_hub_download | |
| # Download the model from Hugging Face | |
| model_path = hf_hub_download(repo_id="your_username/multi-nb-tfidf-model", filename="multi-nb-tfidf-model.pkl") | |
| # Load the model | |
| model = joblib.load(model_path) | |
| # Use the model for predictions | |
| sample_text = ["Example text to classify"] | |
| predictions = model.predict(sample_text) | |
| print(predictions) |