backend-junPreP Update(Update whitelist model), front-urlpredictor.jsx UI Update
This commit is contained in:
@@ -29,6 +29,12 @@ def use_model(url : str):
|
||||
input_data = featured_df[features_cols]
|
||||
|
||||
# 학습된 모델에 적용
|
||||
model_pred = round(float(np.mean([model.predict_proba(input_data)[:, 1] for model in models_load])), 4)
|
||||
model_pred = round(np.mean([model.predict_proba(input_data)[:, 1] for model in models_load]), 4)
|
||||
|
||||
return model_pred
|
||||
#return model_pred
|
||||
return {
|
||||
"url" : url,
|
||||
"malicious_probability" : float(model_pred),
|
||||
"is_malicious" : bool(model_pred > best_threshold),
|
||||
"threshold" : float(best_threshold)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user