Why my model can't recognise my own hand written digit?
You have to remember that machine learning model do not understand any concepts as we do, humans. It cannot generalize something it hasn't seen. And yours hasn't seen black digits on white background, so it has no way of predicting a digit right.

The only two things you can do is :


Train your model from scratch with both datas : black digits on white background and white digits on black background. These datas have to be balanced (as much as possible). Maybe the model need to be more complex, maybe you need more data, and maybe your accuracy will decrease. You can then predict both type of datas.
Uses a test dataset only with similar datas of the train set, white digits on black background.


You can also do a data augmentation with your previous train dataset :
as the digits are white and background black, you can reverse images color, then you will have black digits on white background. That way, you have your train set doubled in size, without writing any more digits by yourself !