I have to agree with kcb, it would be best to hire a qualified electrician. The gage of wire will depend on the type of wire used and it must be installed with a code compliant transfer switch.

Jack