how to plot accuracy and loss graph in python