<human>:  How did the cotton gin work?
<bot>: The cotton gin was invented by Eli Whitney in 1793. It was a machine that separated the cotton fibers from the seeds. The cotton gin was a very important invention because it made cotton farming much easier.