diff --git a/Jenkinsfile_predict b/Jenkinsfile_predict index 2fcbe6e..52d0db4 100644 --- a/Jenkinsfile_predict +++ b/Jenkinsfile_predict @@ -13,7 +13,7 @@ pipeline { { steps { - copyArtifacts(fingerprintArtifacts: true, projectName: 's434704-training/master', selector: buildParameter('WHICH_BUILD')) + copyArtifacts(fingerprintArtifacts: true, projectName: 's434695-training/train', selector: buildParameter('WHICH_BUILD')) } } stage('predict') diff --git a/Zadanie_09_MLflow_Predict.py b/Zadanie_09_MLflow_Predict.py index 8c44897..c8e54da 100644 --- a/Zadanie_09_MLflow_Predict.py +++ b/Zadanie_09_MLflow_Predict.py @@ -1,9 +1,8 @@ import mlflow -import sys -import json +import pandas as pd + +model = mlflow.keras.load_model("my_model") +data = pd.read_json('my_model/input_example.json', orient='index') -model = mlflow.keras.load_model("movies_on_streaming_platforms_model") -with open('movies_on_streaming_platforms_model/input_example.json') as json_file: - data = json.load(json_file) print(data) print(model.predict(data)) \ No newline at end of file