Is it safe?

Recently found out I was pregnant (4 weeks and 5) and I was going to the gym around 4 days a week and going to spin classes once a week. Is it ok for me to continue? Obviously I know I need to be careful and not strain to much. I was also doing weights do I cut out the weights or just put less on instead of building?

I just want to keep in shape throughout pregnancy and maintain my shape.

Thanks in advance guys!