If you just have a couple of gnats I'd just say ignore it. I had some in with my crickets in the fall and just changing the bedding/food more often made them go away.
or
You can try making a fly catcher. Take a jar, put some fruit/vegetables in it, and make a piece of paper into a funnel to put over the top. Flies go in but they can't figure out how to get out. Every now and then dump the flies outside and change the fruit.