Tayyab_Vohra
Contributor

You can try this out, I don't know the shape of the dataframe it would be helpful if you would also print the shape of the dataframe , based on my assumption and the input you provided try this code.

import mlflow
import pandas as pd
 
# Load model as a PyFuncModel.
logged_model = 'runs:/id/model'
loaded_model = mlflow.pyfunc.load_model(logged_model)
 
# Create a list from the pandas DataFrame
data_list = data.values.tolist()
 
# Predict using the loaded model
predictions = loaded_model.predict(data_list)
 
# Print the predictions
print(predictions)