Tom Yeoman
commited on
Add multi-nb-tfidf-model and configuration files
Browse files- .gitattributes +1 -1
- README.md +22 -0
- config.json +6 -0
- multi-nb-tfidf-model.pkl +3 -0
.gitattributes
CHANGED
@@ -32,4 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Multinomial Naive Bayes with TF-IDF
|
2 |
+
|
3 |
+
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.
|
4 |
+
|
5 |
+
## Usage
|
6 |
+
|
7 |
+
You can load and use this model with the following script:
|
8 |
+
|
9 |
+
```python
|
10 |
+
import joblib
|
11 |
+
from huggingface_hub import hf_hub_download
|
12 |
+
|
13 |
+
# Download the model from Hugging Face
|
14 |
+
model_path = hf_hub_download(repo_id="your_username/multi-nb-tfidf-model", filename="multi-nb-tfidf-model.pkl")
|
15 |
+
|
16 |
+
# Load the model
|
17 |
+
model = joblib.load(model_path)
|
18 |
+
|
19 |
+
# Use the model for predictions
|
20 |
+
sample_text = ["Example text to classify"]
|
21 |
+
predictions = model.predict(sample_text)
|
22 |
+
print(predictions)
|
config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "sklearn",
|
3 |
+
"model_name": "Multinomial Naive Bayes with TF-IDF",
|
4 |
+
"framework": "scikit-learn",
|
5 |
+
"description": "A Multinomial Naive Bayes model trained with TF-IDF vectorizer on a phishing detection dataset."
|
6 |
+
}
|
multi-nb-tfidf-model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:219d4bcdf2668b8c6d5594fd1b63b09ac0dbd68ec264d719ab4844b3534bf930
|
3 |
+
size 9734218
|