C3_W4_Lab_1: 'Sequential' object has no attribute 'predict_classes'

Try

seed_text = "Laurence went to dublin"
next_words = 100
  
for _ in range(next_words):
	token_list = tokenizer.texts_to_sequences([seed_text])[0]
	token_list = pad_sequences([token_list], maxlen=max_sequence_len-1, padding='pre')
	index = np.argmax(model.predict(token_list, verbose=0))
	output_word = tokenizer.index_word[index]
	seed_text += " " + output_word
print(seed_text)
3 Likes