Recommender-Systems-SS24 / movie-recommendation-api

0 stars 0 forks source link

Dummy data for frontend testing #1

Closed clarari closed 2 months ago

clarari commented 3 months ago
def get_recommendations(movie_id):
    recommendations_1 = [{"MovieID": 1276, "Title": "Cool Hand Luke", "Genres": ["Crime", "Drama"]},
                         {"MovieID": 85295, "Title": "Scooby-Doo! Curse of the Lake Monster",
                          "Genres": ["Mystery", "Fantasy", "Comedy", "Adventure"]},
                         {"MovieID": 7176, "Title": "Crimson Gold", "Genres": ["Drama"]},
                         {"MovieID": 27369, "Title": "Is It Fall Yet?", "Genres": ["Animation", "Comedy"]},
                         {"MovieID": 6770, "Title": "My Life Without Me", "Genres": ["Drama", "Romance"]}]

    recommendations_2 = [
        {"MovieID": 7236, "Title": "A Boy and His Dog", "Genres": ["Drama", "Science Fiction", "Comedy"]},
        {"MovieID": 963, "Title": "The Inspector General", "Genres": ["Comedy", "Music", "Romance"]},
        {"MovieID": 1702, "Title": "Flubber", "Genres": ["Comedy", "Family", "Science Fiction"]},
        {"MovieID": 26150, "Title": "Andrei Rublev", "Genres": ["Drama", "History"]},
        {"MovieID": 128, "Title": "Jupiter's Wife", "Genres": [""]}]

    recommendations_3 = [{"MovieID": 34271, "Title": "Hustle & Flow", "Genres": ["Drama"]},
                         {"MovieID": 50440, "Title": "Primeval", "Genres": ["Adventure"]},
                         {"MovieID": 4262, "Title": "Scarface", "Genres": ["Action", "Crime", "Drama", "Thriller"]},
                         {"MovieID": 285, "Title": "Beyond Bedlam", "Genres": ["Horror"]},
                         {"MovieID": 4772, "Title": "Dinner Rush", "Genres": ["Drama", "Action", "Thriller"]}]

    recommendations_4 = [{"MovieID": 111113, "Title": "Neighbors", "Genres": ["Comedy"]},
                         {"MovieID": 164917, "Title": "13th", "Genres": ["Documentary"]},
                         {"MovieID": 95377, "Title": "One Man Band", "Genres": ["Animation", "Family"]},
                         {"MovieID": 3354, "Title": "Mission to Mars",
                          "Genres": ["Drama", "Science Fiction", "Adventure"]},
                         {"MovieID": 27869, "Title": "Tae Guk Gi: The Brotherhood of War",
                          "Genres": ["Action", "Adventure", "Drama", "History", "War"]}]

    recommendations_5 = [{"MovieID": 115569, "Title": "Nightcrawler", "Genres": ["Crime", "Drama", "Thriller"]},
                         {"MovieID": 6509, "Title": "Ali: Fear Eats the Soul", "Genres": ["Romance", "Drama"]},
                         {"MovieID": 2548, "Title": "The Rage: Carrie 2",
                          "Genres": ["Horror", "Thriller", "Science Fiction"]},
                         {"MovieID": 2983, "Title": "The Ipcress File", "Genres": ["Thriller"]},
                         {"MovieID": 8957, "Title": "Saw", "Genres": ["Horror", "Mystery", "Crime"]}]

    return [recommendations_1, recommendations_2, recommendations_3, recommendations_4, recommendations_5]
clarari commented 3 months ago

Hi Emir, maybe this function will help you to further develop the frontend. We can also add more movie data besides 'id', 'title' and 'genres', but this is probably enough for next week. With the id you can also display the posters, as the poster filenames are the id + .jpg (e.g. '3.jpg'). The movie posters can be downloaded at https://www.kaggle.com/datasets/ghrzarea/movielens-20m-posters-for-machine-learning.