Hi, I had the same problem recently, even posted about it here-
Bald patch around grease gland The advice given to me was excellent and the links helpfull to lower my anxiety, since I am pretty sure the flies were the dangerous kind, that's why I am sharing it.
To get rid of them I got fly paper and put one in every room. Also fly screens for the windows and I put a fly screen on the door to their room. I didn't leave open their door at all when I was still seeing flies, now I just air it out for a couple minutes each day, just in case.
Not much flies stuck to the fly paper though. The majority, was killed by me. They were mostly at the windows trying to get out of the house, so I kindly let some out. I was seeing a couple of them for only a couple of days, less than a week. Just make sure you don't let new ones come in by windows or doors.
The cleaning regime was also changed. I was doing spot cleaning each day, changing trays with hay every 2-3 days and full deep clean once a week. After I saw the flies I started spot cleaning 2-4 times a day, basically almost every time I went to check on them. Changing the trays every day and deep clean every 2 days. Now that I don't see any flies I do deep cleans every 3-4 days. I was also cleaning their bums often, it's not like there was much to clean, but it kind of went hand in hand with their daily check ups. I also don't leave any of their garbage in their room. Everything goes in the bins outside straight away.
Both of my boys are still fine.
Wish you to get rid of the flies soon