NLP - Text Generation
Find the bug in this code snippet for generating text with an RNN model:
```python
seed_text = "hello"
for _ in range(5):
token_list = tokenizer.texts_to_sequences([seed_text])[0]
token_list = np.array(token_list).reshape(1, -1)
predicted = model.predict(token_list)
next_word = np.argmax(predicted)
seed_text += " " + tokenizer.index_word[next_word]
print(seed_text)
```
