fix
This commit is contained in:
parent
723054ca90
commit
d5fe9eaced
|
@ -23,9 +23,13 @@ class Recommender:
|
|||
if cosine_similarity(np.array(self.retriever.encode([tag])),
|
||||
np.array(self.retriever.encode([interest]))) > score:
|
||||
if self._new(username, material):
|
||||
print('hi')
|
||||
self.curr_recommendations[username] = self.curr_recommendations[username].append(material) if username not in self.curr_recommendations else [material]
|
||||
self.recommended[username] = self.recommended[username].append(False) if username not in self.recommended else [False]
|
||||
#print('hi')
|
||||
if username in self.curr_recommendations:
|
||||
self.curr_recommendations[username].append(material)
|
||||
self.recommended[username].append(False)
|
||||
else:
|
||||
self.curr_recommendations[username] = [material]
|
||||
self.recommended[username] = [False]
|
||||
|
||||
def generate_recommendations(self, username, interests, new_material):
|
||||
for interest in interests:
|
||||
|
|
Loading…
Reference in New Issue