Spaces:
Sleeping
Sleeping
albin
commited on
Commit
·
2c1f7a9
1
Parent(s):
726cbe5
use proba instead of values for result
Browse files
main.py
CHANGED
|
@@ -128,7 +128,7 @@ async def predict(request: Request, requess: Req = Depends(form_req)):
|
|
| 128 |
|
| 129 |
prediction_proba = model.predict_proba(data)[:, 1]
|
| 130 |
threshold = 0.1
|
| 131 |
-
output = 1 if prediction_proba
|
| 132 |
output.astype(int)
|
| 133 |
|
| 134 |
output_text = "Legitimate" if output == 1 else "Phishing"
|
|
|
|
| 128 |
|
| 129 |
prediction_proba = model.predict_proba(data)[:, 1]
|
| 130 |
threshold = 0.1
|
| 131 |
+
output = 1 if prediction_proba >= threshold else 0
|
| 132 |
output.astype(int)
|
| 133 |
|
| 134 |
output_text = "Legitimate" if output == 1 else "Phishing"
|