Spaces:
Sleeping
Sleeping
albin
commited on
Commit
·
c9f777a
1
Parent(s):
58fd15e
debug
Browse files
main.py
CHANGED
|
@@ -98,7 +98,8 @@ async def predict(request: Request, requess: Req = Depends(form_req)):
|
|
| 98 |
data = dataFrame_features[selected_columns].values.reshape(1, -1)
|
| 99 |
|
| 100 |
prediction_proba = model.predict_proba(data)[:, 1]
|
| 101 |
-
threshold = 0.
|
|
|
|
| 102 |
output = 1 if prediction_proba >= threshold else 0
|
| 103 |
|
| 104 |
output_text = "Legitimate" if output == 1 else "Phishing"
|
|
|
|
| 98 |
data = dataFrame_features[selected_columns].values.reshape(1, -1)
|
| 99 |
|
| 100 |
prediction_proba = model.predict_proba(data)[:, 1]
|
| 101 |
+
threshold = 0.1
|
| 102 |
+
print("prediction_proba:", prediction_proba)
|
| 103 |
output = 1 if prediction_proba >= threshold else 0
|
| 104 |
|
| 105 |
output_text = "Legitimate" if output == 1 else "Phishing"
|