Skip to content

Instantly share code, notes, and snippets.

@bluedistro
Created January 1, 2019 19:24
Show Gist options
  • Save bluedistro/0910128558bda21c2ecca24062049027 to your computer and use it in GitHub Desktop.
Save bluedistro/0910128558bda21c2ecca24062049027 to your computer and use it in GitHub Desktop.
load model and tokenizer
tokenizer_path = 'tokenizer'
model_path = 'model'
model_file = os.path.join(model_path, 'movie_sentiment_m1.h5')
tokenizer_file = os.path.join(tokenizer_path, 'tokenizer_m1.pickle')
model = load_model(model_file)
# load tokenizer
with open(tokenizer_file, 'rb') as handle:
tokenizer = pickle.load(handle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment