Spaces:
Sleeping
Sleeping
albin commited on
Commit ·
73511e4
1
Parent(s): 8f75466
do not specify type for features
Browse files
main.py
CHANGED
|
@@ -72,17 +72,28 @@ async def predict(request: Request, requess: Req = Depends(form_req)):
|
|
| 72 |
|
| 73 |
features = extract_features(str(url))
|
| 74 |
data = []
|
| 75 |
-
data.append(str(features['URL']))
|
| 76 |
-
data.extend(int(features['URLLength']))
|
| 77 |
-
data.extend(str(features['Domain']))
|
| 78 |
-
data.extend(int(features['DomainLength']))
|
| 79 |
-
data.extend(str(features['TLD']))
|
| 80 |
-
data.extend(float(features['CharContinuationRate']))
|
| 81 |
-
data.extend(int(features['TLDLength']))
|
| 82 |
-
data.extend(int(features['NoOfSubDomain']))
|
| 83 |
-
data.extend(float(features['DegitRatioInURL']))
|
| 84 |
-
data.extend(float(features['SpacialCharRatioInURL']))
|
| 85 |
-
data.extend(int(features['IsHTTPS']))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
prediction = model.predict([data])
|
| 88 |
output = prediction[0]
|
|
|
|
| 72 |
|
| 73 |
features = extract_features(str(url))
|
| 74 |
data = []
|
| 75 |
+
# data.append(str(features['URL']))
|
| 76 |
+
# data.extend(int(features['URLLength']))
|
| 77 |
+
# data.extend(str(features['Domain']))
|
| 78 |
+
# data.extend(int(features['DomainLength']))
|
| 79 |
+
# data.extend(str(features['TLD']))
|
| 80 |
+
# data.extend(float(features['CharContinuationRate']))
|
| 81 |
+
# data.extend(int(features['TLDLength']))
|
| 82 |
+
# data.extend(int(features['NoOfSubDomain']))
|
| 83 |
+
# data.extend(float(features['DegitRatioInURL']))
|
| 84 |
+
# data.extend(float(features['SpacialCharRatioInURL']))
|
| 85 |
+
# data.extend(int(features['IsHTTPS']))
|
| 86 |
+
data.append(features['URL'])
|
| 87 |
+
data.append(features['URLLength'])
|
| 88 |
+
data.append(features['Domain'])
|
| 89 |
+
data.append(features['DomainLength'])
|
| 90 |
+
data.append(features['TLD'])
|
| 91 |
+
data.append(features['CharContinuationRate'])
|
| 92 |
+
data.append(features['TLDLength'])
|
| 93 |
+
data.append(features['NoOfSubDomain'])
|
| 94 |
+
data.append(features['DegitRatioInURL'])
|
| 95 |
+
data.append(features['SpacialCharRatioInURL'])
|
| 96 |
+
data.append(features['IsHTTPS'])
|
| 97 |
|
| 98 |
prediction = model.predict([data])
|
| 99 |
output = prediction[0]
|