How do you get rid of gnats or fruit flies indoors?

leave out a glass of red wine or vinegar