- The web app is built using React.js for the front-end and python's flask for the back-end.
- It enable user to search and go through a huge dataset of movies fetched from IMDB top 1000 movies huge dataset which includes multiple genre, language, multinational cast etc.
- The web app actively allows users to explore personalized movie recommendations, suggesting the top 10 films based on their input of movie.
Screencast.from.28-04-24.06.04.55.PM.IST.webm
-
Utilizes scikit-learn's TfidfVectorizer for TF-IDF-based feature matrix generation from movie overviews, considering word unigrams, bigrams, and trigrams, while excluding common English stop words. Cosine Similarity:
-
Calculates cosine similarity between movie overviews using the TF-IDF matrix, achieved through scikit-learn's linear_kernel function. Recommendation Function:
Cosine Similarity
-
Implements a content-based recommendation system, accepting a movie title as input, checking its presence in the dataset, and returning a list of recommended movies based on cosine similarity.
-
Flask API Endpoints:
Defines Flask endpoints, including /api/movies for all movies, /api/similarity/ for movie recommendations, /api/similar_names/<partial_name> for similar movie names, and / for serving the index.html file.
-
CORS (Cross-Origin Resource Sharing):
Incorporates the CORS extension in Flask to facilitate cross-origin resource sharing, enabling frontend requests from different origins to the Flask API.
-
Error Handling:
Utilizes the not_found function to handle 404 errors by serving the index.html file.
-
React App Structure:
Developed a React application to interface with the Flask backend. Implemented asynchronous JavaScript, utilizing the fetch API to retrieve recommendation data and search results from the backend.
-
Search Functionality:
Implemented a search bar in the React app, allowing users to input partial movie names. Used the search bar to make requests to the backend /api/similar_names/<partial_name> endpoint for movies with similar names.
-
Recommendation Functionality:
Integrated a recommendation feature within the React app, enabling users to receive movie suggestions. Implemented a mechanism to send requests to the backend's /api/similarity/<movie_title> endpoint, using movie titles for generating recommendations based on content similarity.
-
Poster Image Fetching:
Integrated TMDB (The Movie Database) API to fetch poster images for the recommended movies. Dynamically displayed poster images alongside the corresponding movie recommendations.
-
Clone or download this repository to your local machine.
-
Go to backend directory && install all the libraries mentioned in the [requirements.txt]
$ pip install -r requirements.txt
-
Then run the flask server by
$ python app.py
-
Go to the frontend directory by opening a new terminal and install the node modules and build the project.
$ cd frontend $ npm install -
Copy the .env.sample file to create a .env file and add your TMDB API key. Structue is Below
cp .env.sample .env VITE_TMDB_API_KEY= 'YOUR API KEY GOES HERE' VITE_API_BASE_URL= 'YOUR API KEY GOES HERE' VITE_YOUTUBE_API_KEY = 'YOUR API KEY GOES HERE' -
Then build the project by
$ npm run dev




