modifying ML code to remove individual files after tf-idf encoding