This project implements a basic static web application for recommending movies based on content similarity. The recommendations are generated using a precomputed cosine similarity matrix from the MovieLens dataset. For more information and to view the code for the movie recommendation algorithm, please view the repo here.
This web app allows users to input a movie title from a pre-computed list and receive the top 10 movie recommendations based on genres, tags, movie title, and average rating.
- Content-Based Filtering: Uses movie genres, tags, titles, and average rating for recommendations.
- Cosine Similarity: Calculates similarity scores between movies.
- Precomputed Recommendations: Recommendations are precomputed and stored in a JSON file to save on compute and memory.
-
Data Preparation:
- Aggregates tags and average rating for each movie, and then combines them with the movie genre and title to create a feature set for each movie.
- Calculates cosine similarity scores between movies.
-
Recommendation Function:
- A function that takes a movie title and retrieves the top 10 similar movies based on precomputed similarity scores.
-
Web App:
- A simple web interface where users can input a movie title to get recommendations.
- Hosted on Azure Static Web Apps.
- Precomputed Data:
- For this student project, only a subset of movies is used.
- Ten movies and their top 10 related movies are stored in a JSON file (
top_10_movies.json
). - This approach minimizes computational and memory requirements, making it easier to manage and deploy.
- Scalability:
- In a production-level project, recommendations could be dynamically generated by connecting to a movie API.
- The recommendation script could run daily (e.g., at midnight) to update the recommendations.
- Results could be stored in a NoSQL database in JSON format, allowing the web app to fetch real-time recommendations.
-
Clone the Repository:
git clone https://github.com/yourusername/MovieRecommenderWebApp.git
-
Navigate to the Project Directory:
cd MovieRecommenderWebApp
-
Start a Local Server:
python -m http.server 8000
-
Deploy to Azure:
- Follow the Azure Static Web Apps setup to link your GitHub repository and deploy the app.
- Open the web app in your browser.
- Enter a movie title to get the top 10 recommendations.
- Integrate Collaborative Filtering: Improve recommendations by incorporating user behavior data.
- Dynamic Updates: Connect to a movie API for real-time updates.
- Database Integration: Store recommendation results in a NoSQL database for efficient querying and scalability.