refact model_traing.py