Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
I have a tensorflow keras model in the HDF5 file stored in the managed folder. How to load it with the load_model tensorflow.keras.models function in the web app for predictions?
Thank you
Hi @akurmankulov ,
The recommended approach here would be to deploy a prediction endpoint with that model and call an API endpoint from the webapp
If the model is not create in DSS you can import it as mlflow model :
https://doc.dataiku.com/dss/latest/apinode/endpoint-mlflow.html
https://doc.dataiku.com/dss/latest/mlops/mlflow-models/importing.html
https://doc.dataiku.com/dss/latest/mlops/mlflow-models/limitations.html
https://doc.dataiku.com/dss/latest/mlops/mlflow-models/importing.html
Once done you can simply use the dataikuapi to call the endpoint
import dataikuapi
client = dataikuapi.APINodeClient("https://api-xxxx-xx-int2.xxxx.xxxx.com/", "predict")
record_to_predict = {
"categorical_feature1": "value1",
"numerical_feature1": 42,
"categorical_feature2": "value2"
}
prediction = client.predict_record("model-predict", record_to_predict)
print(prediction["result"])