{"id":26471235,"url":"https://github.com/shawonbarman/e-commerce_recommendation_system","last_synced_at":"2026-04-12T13:55:02.193Z","repository":{"id":192335337,"uuid":"686529857","full_name":"ShawonBarman/E-commerce_recommendation_system","owner":"ShawonBarman","description":"This Django-based E-commerce recommendation system uses machine learning models to provide product recommendations based on user input and similarity scores. It scrapes data from Amazon, preprocesses it, and displays product recommendations in a user-friendly interface.","archived":false,"fork":false,"pushed_at":"2023-09-03T06:17:47.000Z","size":4067,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-09-04T09:10:00.841Z","etag":null,"topics":["bootstrap","css","django","django-application","django-project","html","machine-learning","python","recommendation-system"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShawonBarman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-03T05:10:07.000Z","updated_at":"2023-09-04T09:10:35.443Z","dependencies_parsed_at":"2023-09-04T09:20:54.892Z","dependency_job_id":null,"html_url":"https://github.com/ShawonBarman/E-commerce_recommendation_system","commit_stats":null,"previous_names":["shawonbarman/e-commerce_recommendation_system"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawonBarman%2FE-commerce_recommendation_system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawonBarman%2FE-commerce_recommendation_system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawonBarman%2FE-commerce_recommendation_system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawonBarman%2FE-commerce_recommendation_system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShawonBarman","download_url":"https://codeload.github.com/ShawonBarman/E-commerce_recommendation_system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244506029,"owners_count":20463464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","css","django","django-application","django-project","html","machine-learning","python","recommendation-system"],"created_at":"2025-03-19T20:53:47.161Z","updated_at":"2026-04-12T13:54:57.159Z","avatar_url":"https://github.com/ShawonBarman.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce_recommendation_system\n\u003cp\u003eThis project is a Django-based E-commerce recommendation system that uses a dataset scraped from Amazon to provide product recommendations to users. Here's a breakdown of the key components and functionality of your project:\u003c/p\u003e\n\n\u003col\u003e\n  \u003cli\u003e\u003cstrong\u003eProject Structure:\u003c/strong\u003e I have organized my Django project into two apps: 'recommendationSystem' (the main app) and 'myApp'.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eData Scraping:\u003c/strong\u003e I scraped data from the Amazon website to build a dataset. This dataset likely contains information about various products, including their titles, categories, sub-categories, prices, ratings, and other relevant attributes.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eData Preprocessing:\u003c/strong\u003e I used the scikit-learn library to perform data preprocessing, which includes feature transformation using a preprocessor and computing the cosine similarity matrix.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eMachine Learning Models:\u003c/strong\u003e I have trained machine learning models for clustering (K-Means) and DBSCAN. These models are loaded using joblib for further use in the recommendation system.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eRecommendation Algorithm:\u003c/strong\u003e The recommendation logic is primarily based on K-Means clustering and cosine similarity. When a user enters a product title, your system finds the cluster to which that product belongs and recommends other products within the same cluster based on cosine similarity scores.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eDjango Views:\u003c/strong\u003e My 'myApp/views.py' contains Django view functions for handling user requests. The 'home' view renders the main page, and the 'get_recommendations' function generates product recommendations. The 'recommend_products' view handles POST requests when a user submits a product title and displays recommendations on the same page.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eUser Interface:\u003c/strong\u003e I have created HTML templates (index.html) for the user interface, with input fields for users to enter product titles and a section to display recommended products. Bootstrap is used for styling.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eRouting and URLs:\u003c/strong\u003e I have defined URL patterns in the 'urls.py' files for routing user requests to the appropriate views.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eData Display:\u003c/strong\u003e The recommended products are displayed in a responsive card layout, showing product details like title, category, sub-category, price, ratings, and total ratings.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eStatic Files:\u003c/strong\u003e Static files like CSS are loaded using '{% static %}' template tags.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eDatabase:\u003c/strong\u003e In this project, I used a pre-built dataset (data.pkl) and machine learning models loaded from joblib files, rather than a database to store and retrieve product information.\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cp\u003eOverall, my Django E-commerce recommendation system uses machine learning to provide product recommendations based on user input and similarity scores, offering a user-friendly interface for interaction. Users can input a product title, and the system will suggest similar products from the dataset based on the clustering and similarity calculations you've implemented.\u003c/p\u003e\n\n\u003ch3\u003e Here are step-by-step instructions on how to run this Django-based E-commerce recommendation project in a user-friendly way:\u003c/h3\u003e\n\n\u003col\u003e\n  \u003cli\u003e\u003cstrong\u003eDownload the Project from GitHub and Unzip:\u003c/strong\u003e Look for a \"Code\" button on this GitHub page. Click on it and select \"Download ZIP\" to download the project as a ZIP archive. And then locate the downloaded ZIP file on your computer (usually in your \"Downloads\" folder). After that right-click the ZIP file and select \"Extract\" or \"Extract All\" (the exact option may vary depending on your operating system). Then choose a destination folder where you want to extract the project files.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eNavigate to Project Directory:\u003c/strong\u003e Open the command prompt or terminal in this project root directory directly. Or open the command prompt or terminal on your computer and then use the 'cd' command to navigate to the root directory of this Django project. For example:\n  \u003cul\u003e\n    \u003cli\u003ecd path/to/this/project\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eCreate a Virtual Environment:\u003c/strong\u003e Create a virtual environment to isolate this project dependencies. This helps manage package versions.\n  \u003cul\u003e\n    \u003cli\u003epython -m venv myenv\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eActivate the Virtual Environment:\u003c/strong\u003e Activate the virtual environment you just created. This ensures that the project uses the isolated environment.\n  \u003cul\u003e\n    \u003cli\u003emyenv\\Scripts\\activate   (Windows)\u003c/li\u003e\n    \u003cli\u003esource myenv/bin/activate   (macOS/Linux)\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eUpgrade Pip:\u003c/strong\u003e Upgrade the 'pip' tool to the latest version to ensure you have the most recent package manager.\n  \u003cul\u003e\n    \u003cli\u003epython.exe -m pip install --upgrade pip\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eInstall Django and Required Packages:\u003c/strong\u003e Install Django and the necessary Python packages for this project.\n  \u003cul\u003e\n    \u003cli\u003epip install django\u003c/li\u003e\n    \u003cli\u003epip install numpy\u003c/li\u003e\n    \u003cli\u003epip install pandas\u003c/li\u003e\n    \u003cli\u003epip install joblib\u003c/li\u003e\n    \u003cli\u003epip install scikit-learn==1.2.2\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eDatabase Setup:\u003c/strong\u003e Run the following commands to set up the database for this Django project:\n  \u003cul\u003e\n    \u003cli\u003epython manage.py makemigrations\u003c/li\u003e\n    \u003cli\u003epython manage.py migrate\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eRun the Development Server:\u003c/strong\u003e Start the Django development server to run this project locally:\n  \u003cul\u003e\n    \u003cli\u003epython manage.py runserver\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eAccess This Project:\u003c/strong\u003e Once the server is running, open a web browser and enter the following URL: 'http://localhost:8000/'. You should see this E-commerce recommendation system's home page.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eInteract with the Recommendation System:\u003c/strong\u003e On the home page, you can enter a product title and click the \"Recommend\" button to get product recommendations based on your input.\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cp\u003eNow this Django E-commerce recommendation project should be up and running locally. Users can access the recommendation system through their web browsers and receive product recommendations based on their input.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawonbarman%2Fe-commerce_recommendation_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawonbarman%2Fe-commerce_recommendation_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawonbarman%2Fe-commerce_recommendation_system/lists"}