Update README.md
Browse files
README.md
CHANGED
@@ -1,50 +1,52 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
4 |
---
|
5 |
|
6 |
# Malicious-Url-Detection
|
7 |
|
8 |
-
Leveraging this model, you can identify harmful links intended to exploit users—such as phishing or malware URLs—by accurately classifying them as either malicious or benign.
|
9 |
|
10 |
## Model Details
|
11 |
|
12 |
### Model Description
|
13 |
|
14 |
-
This
|
15 |
|
16 |
-
- **Developed by:** Eason Liu
|
17 |
-
- **Language
|
|
|
|
|
18 |
|
19 |
-
##
|
20 |
|
21 |
### Direct Use
|
22 |
-
|
23 |
-
|
24 |
|
25 |
### Out-of-Scope Use
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
## Bias, Risks, and Limitations
|
30 |
-
|
31 |
-
Users should note that the model’s performance depends on the representativeness of its training data. It may reflect biases inherent in the dataset and could produce false positives or negatives in certain scenarios. Therefore, it is recommended to incorporate this model as part of a broader cybersecurity framework rather than relying on it as a standalone solution.
|
32 |
-
|
33 |
-
### Recommendations
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
## How to Get Started with the Model
|
38 |
-
|
39 |
-
To begin using this model, install the Hugging Face transformers library and load the model with the following code snippet:
|
40 |
|
41 |
```python
|
42 |
from transformers import pipeline
|
43 |
|
44 |
-
#
|
45 |
-
classifier = pipeline(
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
# Example
|
48 |
url = "http://example.com/suspicious-link"
|
|
|
|
|
49 |
result = classifier(url)
|
50 |
print(result)
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- text-classification
|
5 |
+
- malicious-url-detection
|
6 |
---
|
7 |
|
8 |
# Malicious-Url-Detection
|
9 |
|
10 |
+
Leveraging this fine-tuned model, you can identify harmful links intended to exploit users—such as phishing or malware URLs—by accurately classifying them as either malicious or benign.
|
11 |
|
12 |
## Model Details
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
+
This model is a **fine-tuned** version of [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased), adapted specifically for malicious URL detection. It employs a text-classification approach to distinguish between benign and malicious URLs. By learning patterns from a curated dataset of phishing, malware, and legitimate URLs, it aims to help users and organizations bolster their defenses against a range of cyber threats.
|
17 |
|
18 |
+
- **Developed by:** Eason Liu
|
19 |
+
- **Language:** English
|
20 |
+
- **Model Type:** Text Classification (URL-focused)
|
21 |
+
- **Finetuned From:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased)
|
22 |
|
23 |
+
## Intended Use
|
24 |
|
25 |
### Direct Use
|
26 |
+
- **URL Classification:** Detect whether a URL is malicious (e.g., phishing, malware) or benign.
|
27 |
+
- **Security Pipelines:** Integrate into email filtering systems or website scanning tools to flag harmful links.
|
28 |
|
29 |
### Out-of-Scope Use
|
30 |
+
- General text classification tasks not related to malicious URL detection.
|
31 |
+
- Tasks requiring more nuanced context beyond the URL string (e.g., domain reputation, real-time link behavior).
|
32 |
|
33 |
+
## How to Get Started
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
Below is a quick example showing how to use this model with the 🤗 Transformers `pipeline`:
|
|
|
|
|
|
|
|
|
36 |
|
37 |
```python
|
38 |
from transformers import pipeline
|
39 |
|
40 |
+
# Initialize the text-classification pipeline with this fine-tuned model
|
41 |
+
classifier = pipeline(
|
42 |
+
"text-classification",
|
43 |
+
model="Eason918/malicious-url-detector",
|
44 |
+
truncation=True
|
45 |
+
)
|
46 |
|
47 |
+
# Example URL
|
48 |
url = "http://example.com/suspicious-link"
|
49 |
+
|
50 |
+
# Classify the URL
|
51 |
result = classifier(url)
|
52 |
print(result)
|