Skip to content

Instantly share code, notes, and snippets.

@edwardleoni
Created March 2, 2018 04:41
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 edwardleoni/8f6b2219637b2db6583fd283f0c5ee3a to your computer and use it in GitHub Desktop.
Save edwardleoni/8f6b2219637b2db6583fd283f0c5ee3a to your computer and use it in GitHub Desktop.
from keras.models import load_model
import numpy
model = load_model('wine-model.h5')
predict_me = numpy.array([
[6.6, 0.16, 0.4, 1.5, 0.044, 48, 143, 0.9912, 3.54, 0.52, 12.4], # Good
[5.2, 0.405, 0.15, 1.45, 0.038, 10, 44, 0.99125, 3.52, 0.4, 11.6] # Bad
])
predictions = model.predict(predict_me)
rounded = [round(output[0]) for output in predictions]
print(rounded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment