AspireNex_Movie_Recommendation_Sytem Tailwind Templates

Aspirenex_movie_recommendation_sytem

Created a movie recommendation system built using Flask, Python, and AI techniques like Singular Value Decomposition (SVD). It suggests movies to users based on their preferences by normalizing user ratings, decomposing the user-item matrix, generating personalized recommendations. The frontend is designed using HTML, CSS (Tailwind), and JavaScript

MOVIE RECOMMENDATION SYSTEM

Greetings Everyone🌻, This is my Movie Recommendation System built using Flask and Python

This task was assigned by AspireNex for the Artificial Intelligence Internship Selection Process.


TASK 2 - RECOMMENDATION SYSTEM

Create a simple recommendation system that suggests items to users based on their preferences. You can use techniques like collaborative filtering or content-based filtering to recommend movies, books, or products to users.



RSys
This project is a movie recommendation system built using Flask, Python, and AI techniques like Singular Value Decomposition (SVD) for recommendations.The frontend is designed using HTML, CSS (Tailwind), and JavaScript.

Languages and Tools

python html5 css3 javascript


CODE EXPLANATION

Let’s take a quick look at how the code works

app.py

Data Handling and Flask Setup: The movie recommendation system is built using Flask, a lightweight web framework for Python

  • Data Preparation: The sample data and movie data are defined using dictionaries and converted to Pandas DataFrames. Data


  • User-Item Matrix Creation: A pivot table is created to form the user-item matrix, which is then converted to a sparse matrix format.

  • Normalization: The user-item matrix is normalized by subtracting the mean rating for each user.

  • Singular Value Decomposition (SVD): SVD is performed on the normalized matrix to decompose it into three matrices (U, Sigma, Vt). SVD

  • Prediction Generation: The decomposed matrices are used to reconstruct the original matrix, generating predicted ratings for all users.

  • Recommendation Function: A function recommend_movies is defined to generate movie recommendations for a specific user based on the predicted ratings.

  • Flask Route: The / route renders the index.html template with the recommended and already rated movies for a sample user.

static

  • main.css: Contains the CSS styles used to customize the appearance and layout of HTML elements in the project.
  • pictures: Directory containing movie posters.
  • input.css: Tailwind CSS input file.

templates

  • index.html: This HTML file serves as the main template for your web application, defining the structure and content that Flask will render and serve to users.

Other Files

  • package-lock.json: Auto-generated file that holds the exact versions of dependencies.
  • package.json: Holds the metadata for the project and dependencies for Tailwind CSS.
  • postcss.config.js: Configuration for PostCSS.
  • tailwind.config.js: Configuration file for Tailwind CSS.

Running the Code

After cloning the repository, open the project in your code editor.
Navigate to the terminal and execute the following command to start the Flask server:

run

CONCLUSION

In summary, this movie recommendation system effectively suggests movies to users based on their preferences using Singular Value Decomposition (SVD).
It normalizes user ratings, decomposes the user-item matrix, and generates personalized recommendations.
Moving forward, I plan to enhance its capabilities further by integrating more advanced collaborative filtering techniques.
Thank you for visiting!





coding

Connect with me:

flyingmanya flying_manya flying_manya

🌵 https://gautamrajputmanya.wixsite.com/mysite

📫 gautamrajputmanya@gmail.com

Top categories

Loading Svelte Themes