From 9e41a778f2f7f4de25fed00f5568c8407d941327 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 5 Feb 2018 14:25:46 +0000 Subject: [PATCH] use channel and keyword values --- recommendation_engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recommendation_engine.py b/recommendation_engine.py index 59ea1d3..6fe83fd 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -78,8 +78,8 @@ class Engine: return clips def get_videos(self, user): - channels = self.state['channels'] - sliders = self.state['keywords'] + channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()} + sliders = {k: v.get('value', 0) for k, v in self.state['keywords'].items()} # For each playlist, compute keyword score score = {} for playlist in self.playlists: