Skip to content

Instantly share code, notes, and snippets.

@Hehehe421
Last active September 6, 2023 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hehehe421/8aacc0069aa9c95930fdde5abf23c84b to your computer and use it in GitHub Desktop.
Save Hehehe421/8aacc0069aa9c95930fdde5abf23c84b to your computer and use it in GitHub Desktop.
# Load the registered model
model_uri = "models:/sql_model/2" # Update with the correct URI for your model
loaded_model = mlflow.pyfunc.load_model(model_uri)
# Create a new test DataFrame
new_test_data = pd.DataFrame({
'region': ['Region_1'],
'user_id': [300]
})
# Make predictions using the loaded model
predictions = loaded_model.predict(new_test_data)
# Display the predictions
print(predictions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment