qnli question: In what year was the cotton gin invented? sentence: Although the city lost the status of state capital to Columbia in 1786, Charleston became even more prosperous in the plantation-dominated economy of the post-Revolutionary years.