Skip to content

Commit

Permalink
Merge pull request #64 from McGill-MMA-EnterpriseAnalytics/aladelca-p…
Browse files Browse the repository at this point in the history
…atch-30

Update predict.py
  • Loading branch information
aladelca authored Apr 26, 2024
2 parents e83a1fa + f4b80cd commit f23cb8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 09_model_pipeline/predict/src/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pickle
class Predict:
def main_predict(data, bucket_name, path):
#model = load_models_from_s3(bucket_name, path )
model = pickle.load(open("09_model_pipeline/predict/src/trained_model.pickle",'rb'))
model = load_models_from_s3(bucket_name, path )
#model = pickle.load(open("09_model_pipeline/predict/src/trained_model.pickle",'rb'))
probas = model.predict_proba(data)
preds = np.where(probas[:,1] >= 0.4, 1, 0)
data['prob_0'] = probas[:,0]
Expand Down

0 comments on commit f23cb8c

Please sign in to comment.