I would write as;
"Hello,
I have been offered an accommodation for the course of my stay in ----(name of town). I am writing to ask whether I can commute from home each day to the training class rather than staying in the provided accommodation.
Thank you"
Hamid