{"id":23521951,"url":"https://github.com/nivesayee/recipe-genie","last_synced_at":"2025-10-31T15:30:42.403Z","repository":{"id":240442143,"uuid":"729216836","full_name":"nivesayee/recipe-genie","owner":"nivesayee","description":"Recipe Genie is a recipe recommendation system that recommends recipes to users based on the ingredients they have at home.","archived":false,"fork":false,"pushed_at":"2024-07-04T09:45:47.000Z","size":31863,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T17:13:52.187Z","etag":null,"topics":["cosine-similarity","cosine-similarity-scores","recipe","recipe-recommendation","recipe-recommender","recipe-search","recipes","recommendation-engine","recommendation-system","recommender-system","tf-idf","tf-idf-vectorizer"],"latest_commit_sha":null,"homepage":"https://recipe-genie-wihv.onrender.com/","language":"Python","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/nivesayee.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-08T16:48:25.000Z","updated_at":"2024-12-14T03:33:17.000Z","dependencies_parsed_at":"2024-06-28T10:30:16.247Z","dependency_job_id":"46d93303-7873-4152-a382-2041a131f1d5","html_url":"https://github.com/nivesayee/recipe-genie","commit_stats":null,"previous_names":["nivesayee/recipe-genie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivesayee%2Frecipe-genie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivesayee%2Frecipe-genie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivesayee%2Frecipe-genie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivesayee%2Frecipe-genie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nivesayee","download_url":"https://codeload.github.com/nivesayee/recipe-genie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239212553,"owners_count":19600830,"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":["cosine-similarity","cosine-similarity-scores","recipe","recipe-recommendation","recipe-recommender","recipe-search","recipes","recommendation-engine","recommendation-system","recommender-system","tf-idf","tf-idf-vectorizer"],"created_at":"2024-12-25T17:13:56.861Z","updated_at":"2025-10-31T15:30:42.331Z","avatar_url":"https://github.com/nivesayee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recipe Genie 🍲✨\n\n![Recipe Genie Banner](src/static/images/hero-banner.jpg)\n\nRecipe Genie is a web application that helps users discover recipes based on the ingredients they have on hand. Simply enter your ingredients, and Recipe Genie will provide you with a list of delicious recipes to try.\n\n## Features 🌟\n\n- **Ingredient-based Recipe Recommendations:** Input your ingredients, and Recipe Genie will suggest recipes that you can make with those ingredients.\n- **Flexible Search:** Recipe Genie supports a wide range of ingredients, so you can find recipes for almost any combination of items in your pantry.\n- **Detailed Recipe Information:** View detailed information about each recipe, including title, description, total time, ingredients, and instructions.\n- **Interactive User Interface:** Recipe Genie provides a user-friendly interface that makes it easy to search for recipes and explore new culinary ideas.\n\n## Technologies Used 🛠️\n\n- **Python:** Backend development using Python programming language.\n- **Flask:** Web framework used for building the backend server.\n- **Pandas:** Data manipulation and analysis library used for handling recipe data.\n- **scikit-learn:** Machine learning library used for text vectorization and similarity calculation.\n- **HTML/CSS:** Frontend design and styling.\n- **JavaScript:** Client-side scripting for dynamic interactions.\n- **Render:** Platform used for deploying the application.\n\n## Project Details 📝\n\n1. **Data Collection:** 📊\u003cbr/\u003e\u003cbr/\u003e\nThe recipe data was scraped from https://pinchofyum.com/ using a Python web scraping tool like Beautiful Soup. The following steps were taken:\n\n- **Identify the Data:** Determined which recipe attributes were necessary (e.g., title, ingredients, instructions).\n- **Scraping Process:** Wrote scripts to crawl the website and extract the relevant data. This involved sending HTTP requests to the website, parsing the HTML content, and extracting the desired information.\n- **Save the Data:** The scraped data was saved in CSV format for further processing.\n\u003cbr/\u003e\n\n2. **Data Preprocessing:** 🍅\u003cbr/\u003e\u003cbr/\u003e\nOnce the data was collected, it required preprocessing. This included:\n\n- **Tokenization:** Split the ingredient text into individual words using NLTK's word tokenizer.\n- **Stopwords Removal:** Removed common English stopwords that do not contribute to the meaning using NLTK's stopwords list.\n- **Stemming:** Reduced words to their root form using NLTK's PorterStemmer.\n- **Unwanted Words and Measurements Removal:** Excluded specific unwanted words and common measurement terms that do not add value to the ingredient description.\n- **Regex Cleaning:** Removed any non-alphabetic characters and parentheses.\n\u003cbr/\u003e\n\n3. **Text Vectorization and Similarity Calculation:** 🔍\u003cbr/\u003e\u003cbr/\u003e\nTo recommend recipes based on ingredients, the following steps were taken:\n\n- **TF-IDF Vectorization:** Used the TF-IDF (Term Frequency-Inverse Document Frequency) method from scikit-learn to convert the ingredient lists into numerical vectors. This method helps in giving more importance to unique ingredients while reducing the weight of common ingredients.\n\n- **Cosine Similarity:** Calculated the similarity between the user's input ingredients and the recipes using cosine similarity. This metric measures the cosine of the angle between two vectors, providing a similarity score.\n\u003cbr/\u003e\n\n4. **Building the web application with Flask:** 🌐\u003cbr/\u003e\u003cbr/\u003e\n- **Backend Setup:** Created a Flask application to handle user requests and serve the recommendations. The Flask app processes the user's input, calculates the similarity scores, and returns the top 5 recommended recipes based on the similarity scores.\n\n- **Frontend Design:** Used HTML and CSS to create the user interface. JavaScript was added for dynamic interactions, such as displaying recipe details in a modal window.\n\u003cbr/\u003e\n\n5. **Deploying the Application on Render:** 🚀\u003cbr/\u003e\n- **Setup Render Account:** Created an account on Render and set up a new web service.\n\n- **Deployment:** Pushed the application code to this Git repository. Connected the repository to Render and deployed the application by following Render's deployment guide.\n\n\n## Usage 🎉\n\n1. **Access the Application:** Visit the Recipe Genie website at (https://recipe-genie-wihv.onrender.com/) to access the application.\n2. **Input Ingredients:** Enter the ingredients you have on hand into the provided input field.\n3. **Get Recipe Recommendations:** Click on the \"Get Recipes\" button to receive a list of recommended recipes based on your ingredients.\n4. **Explore Recipes:** Browse through the list of recommended recipes, and click on any recipe to view more details, including ingredients and instructions.\n\n\u003cimg alt=\"Usage\" src=\"usage.gif\" /\u003e\n\n## Acknowledgements 🙏\n\n- Recipes were scraped from [Pinch of Yum](https://pinchofyum.com/).\n- Background image for the website was sourced from [Freepik](https://www.freepik.com) and created by [rorozoa](https://www.freepik.com/free-photo/forkful-steaming-spaghetti-with-shiny-noodles-hint-tomato-sauce_135009355.htm#fromView=search\u0026page=1\u0026position=23\u0026uuid=b2d1a2e0-1b78-438d-bb24-7d040d437f83).\n- Special thanks to Render for providing a platform for deploying web applications easily.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivesayee%2Frecipe-genie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnivesayee%2Frecipe-genie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivesayee%2Frecipe-genie/lists"}