MCPcopy Create free account
hub / github.com/codemistic/Web-Development / recommend

Function recommend

Recommendation-System-Web-App/main_app_file.py:24–32  ·  view source on GitHub ↗
(anime)

Source from the content-addressed store, hash-verified

22
23
24def recommend(anime):
25 anime_index = animelist[animelist['title'] == anime].index[0]
26 distance = similarity[anime_index]
27 anime_list = sorted(list(enumerate(distance)), reverse=True, key=lambda x: x[1])[1:16]
28 recommended_anime: List[Any] = []
29 for i in anime_list:
30 recommended_anime.append(animelist.iloc[i[0]].title)
31
32 return recommended_anime
33
34
35anime_dict = pickle.load(open('anime_list.pkl', 'rb'))

Callers 1

main_app_file.pyFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected