Updated code to include query based collaborative filtering and TFIDF