Not able to get the desired accuracy

attached the Collab worspace

https://colab.research.google.com/drive/1zOIGDis5C--jfXHHKOMM-hxQ30o0UDWb

Hey @yashb4569, everything seems fine, just you need to add this single line before,

t = generateText("apna",k=4,maxLen=2004) 

Add this line before above line,

np.random.seed(11)
t = generateText("apna",k=4,maxLen=2004)

Hope this resolved your doubt.
Remember to mark it as resolved :blush: