Skip to content

Instantly share code, notes, and snippets.

Last active October 26, 2021 21:10
What would you like to do?
Running image classification in Python with a NatML Hub predictor.
# Fetch the model data from Hub
model_data = MLModelData.from_hub("@natsuite/resnet152", access_key);
# Deserialize the model # The model is actually being created server-side
model = model_data.deserialize();
# Create the ResNet classification Hub predictor
predictor = ResNetHubPredictor(model);
# Predict
image =;
label, score = predictor.Predict(image);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment