Zakia commited on
Commit
29e3408
1 Parent(s): 646659b

change predict function

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- predictions = predictions_df["Label"][0]
19
- return predictions
 
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