EdBianchi commited on
Commit
affd149
1 Parent(s): b2cfdba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,11 +28,11 @@ def recommend_image(movie, sim):
28
  index = data[data['title'] == movie].index[0]
29
  dist = dict(enumerate(sim[index]))
30
  dist = dict(sorted(dist.items(), reverse=True, key = lambda item: item[1]))
31
- #index from 1 because the forst is the movie itself
32
  cnt = 0
33
  for key in dist:
34
  cnt = cnt+1
35
- if cnt < 11:
36
  title = data.iloc[key].title
37
  posterRes, plotRes = get_poster_plot(title)
38
  poster.append(posterRes)
 
28
  index = data[data['title'] == movie].index[0]
29
  dist = dict(enumerate(sim[index]))
30
  dist = dict(sorted(dist.items(), reverse=True, key = lambda item: item[1]))
31
+ #index from 1 because the first is the movie itself
32
  cnt = 0
33
  for key in dist:
34
  cnt = cnt+1
35
+ if cnt < 10:
36
  title = data.iloc[key].title
37
  posterRes, plotRes = get_poster_plot(title)
38
  poster.append(posterRes)