Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def predict():
|
|
| 16 |
probs = model.predict_proba(features)[:,1]
|
| 17 |
|
| 18 |
# Apply threshold 0.3
|
| 19 |
-
prediction =
|
| 20 |
|
| 21 |
return jsonify({'attack_detected': prediction})
|
| 22 |
|
|
|
|
| 16 |
probs = model.predict_proba(features)[:,1]
|
| 17 |
|
| 18 |
# Apply threshold 0.3
|
| 19 |
+
prediction = int(probs[0] > 0.3)
|
| 20 |
|
| 21 |
return jsonify({'attack_detected': prediction})
|
| 22 |
|