The bad performance is due to bugs and not to overfitting: training.py#15:

Source: Deep Learning on Medium

The bad performance is due to bugs and not to overfitting:
training.py#15: input_sequence = one_hot_encode([choice],vocab_size)
input_sequence should be test_sequence (or the other way around)
gru.py#16: the intent on return is inside the for loop.

Nice explanations!