Spaces:
Sleeping
Sleeping
added con
Browse files
config.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import re
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
# Paths
|
| 5 |
+
BERT_MODEL_PATH = "Gaykar/PhishingDistilBERT"
|
| 6 |
+
|
| 7 |
+
XGB_MODEL_PATH ="emailxgb_model.json"
|
| 8 |
+
|
| 9 |
+
URL_FEATURES = [
|
| 10 |
+
'URL_COUNT', 'USE_OF_IP', 'url_length_max', 'url_length_avg',
|
| 11 |
+
'url_subdom_max', 'url_subdom_avg', 'short_url_count',
|
| 12 |
+
'sus_url_count', 'sus_url_flag', 'dot_count_max', 'dot_count_avg',
|
| 13 |
+
'perc_max', 'perc_avg', 'ques_max', 'ques_avg',
|
| 14 |
+
'hyphen_max', 'hyphen_avg', 'equal_max', 'equal_avg'
|
| 15 |
+
]
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|