Although it is not possible to predict the outcome of a particular case, you do have a strong argument for self-defense because you tried to retreat by walking away and were attacked.  You used reasonable non-deadly force to defend yourself and stop the attack in which you feared for your safety.  Therefore, it is unlikely that your attacker will prevail in court.