Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BERT Phishing Detection Model
|
| 2 |
+
|
| 3 |
+
This is a BERT-based model fine-tuned for phishing detection. The model can classify text/URLs as phishing or legitimate.
|
| 4 |
+
|
| 5 |
+
## Model Details
|
| 6 |
+
|
| 7 |
+
- **Model Type**: BERT for Sequence Classification
|
| 8 |
+
- **Architecture**: BertForSequenceClassification
|
| 9 |
+
- **Problem Type**: Single Label Classification
|
| 10 |
+
- **Hidden Size**: 768
|
| 11 |
+
- **Number of Layers**: 12
|
| 12 |
+
- **Number of Attention Heads**: 12
|
| 13 |
+
- **Max Position Embeddings**: 512
|
| 14 |
+
- **Vocabulary Size**: 30,522
|
| 15 |
+
|
| 16 |
+
## Usage
|
| 17 |
+
|
| 18 |
+
```python
|
| 19 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 20 |
+
import torch
|
| 21 |
+
|
| 22 |
+
# Load model and tokenizer
|
| 23 |
+
model_name = "th1enq/bert_checkpoint"
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 25 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 26 |
+
|
| 27 |
+
# Example usage
|
| 28 |
+
text = "Your text here"
|
| 29 |
+
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
|
| 30 |
+
|
| 31 |
+
with torch.no_grad():
|
| 32 |
+
outputs = model(**inputs)
|
| 33 |
+
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
| 34 |
+
predicted_class = torch.argmax(predictions, dim=-1)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Training
|
| 38 |
+
|
| 39 |
+
This model was fine-tuned on phishing detection data to classify text as phishing (1) or legitimate (0).
|
| 40 |
+
|
| 41 |
+
## License
|
| 42 |
+
|
| 43 |
+
Please refer to the original BERT license and any applicable dataset licenses.
|