First, have a fire extinguisher handy and pull the spark plugs on the generator and turn it over by hand if possible. You likely have gasoline in the cylinders. Also it is likely have gasoline in the oil sump of the generator.
Likely there is a small electric fuel pump that sends fuel to the generator. (I thought these fuel pumps only ran when the generator was on, but I could be wrong.) The needle and float in the generator carburetor are not sealing closed. It could be a bit of dirt holding the needle open or you might need a new needle. Either way the carburetor bowl needs to be dropped. Sometime spraying the needle with some carburetor cleaner will clear the dirt.
If fuel is still pumping out of the generator after that attempt, the carburetor will have to be rebuilt with a new needle. Make sure to check that the float is not leaking/sinking.