Biosynthesis of titanium dioxide nanoparticles for the photodegradation of dyes and removal of bacteria