change predict function
Browse files
app.py
CHANGED
@@ -15,8 +15,9 @@ model = load_model('tuned_blend_specific_model_19112021')
|
|
15 |
# define the function to call
|
16 |
def predict(model, input_df):
|
17 |
predictions_df = predict_model(estimator=model, data=input_df)
|
18 |
-
|
19 |
-
|
|
|
20 |
|
21 |
|
22 |
|
|
|
15 |
# define the function to call
|
16 |
def predict(model, input_df):
|
17 |
predictions_df = predict_model(estimator=model, data=input_df)
|
18 |
+
predict_label = predictions_df["Label"][0] # either 1 (amputation yes) or 0 (amputation no)
|
19 |
+
predict_score = predictions_df["Score"][0] # the prediction (accuracy)
|
20 |
+
return predict_label+" "+predict_score
|
21 |
|
22 |
|
23 |
|