Dear Student
In electric generator energy conversion take place from mechanical energy to electrical energy.
In electric inverter energy conversion take place from one electrical energy to the other electrical energy.In electric inverter inversion may be from AC current to DC current vice versa is also occur
Regards