Coder Social home page Coder Social logo

tao-cao / recipe-recommendation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flourishlove/recipe-recommendation

0.0 1.0 0.0 197.79 MB

A web app which recommends recipes to different users, satisfy their nutrition need and flavor at the same time

Python 51.74% HTML 40.47% Shell 0.03% CSS 5.05% JavaScript 2.70%

recipe-recommendation's Introduction

Recipe-Recommendation

Introduction

People always face same problem in their daily life: What to eat and how to eat healthily. What’s more, people who love cooking usually don’t know how to start when facing too many ingredient pairings. Our Recipe Recommendation System gives users nutritious recipe choices which also satisfy their personal taste. Our target users are busy students and professionals who want to eat healthy. Our goal is to help people with their meal decision and bring up their health consciousness.

Data

Yummly’s API
Open Food Facts Dataset
Ingredient and Compound matching
Estimated Energy Requirements Diagram

Project Architecture

alt tag

  1. Combine two original dataset into one big recipe-compound matrix.
  2. With recipe-compound data on hand, we use two machine learning algorithms, hierarchical clustering and DBSCAN, to cluster flavor of recipes based on their compound. In final implementation, we use DBSCAN because it discard those isolated recipes and make recipe distribution better.
  3. Use information of user’s body condition to further filter out the recipes to recommend.

Installation

1. Running locally

In command prompt, enter code folder and install all necessary python libraries:

$ cd code
$ sudo pip install -r requirements.txt
$ python application.py

Then you will see something like

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger pin code: 103-344-409

Which means you run our demo successfully. Go to you browse and enter localhost:5000, you will see our webapplication.

If you don’t want to install all the libraries and packages in your system, you can use virtualenv to setup virtual environment:

$ sudo pip install virtualenv
$ cd code
$ virtualenv venv
$ . venv/bin/activate  (For Windows user: $ venv\Scripts\activate)
$ pip install -r requirements.txt
$ python application.py

This option provides you with a virtual environment in folder venv. Whenever you want to run the demo, you can just use command $ . venv/bin/activate. After testing demo, use

$ deactivate

to exist virtual environment.

Interface

There are two pages of our webapp.
Choose flavor and enter body condition in the first page. alt tag

Display recommendation on the second page. alt tag

Dependencies

Flask
scikit-learn

Solutions to some problems

Create and Connect to a MySQL Database with Amazon RDS
Deploy a flask application on AWS
Import CSV file into MySQL

SQL to load CSV data in workbench for escapsing comma:

USE recipe;
LOAD DATA LOCAL INFILE '/Users/meteor/Gatech/Recipe-Recommendation/cleaned_data/recipe_final.csv' INTO TABLE recipe_info FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

recipe-recommendation's People

Contributors

flourishlove avatar wxfang avatar xieyujia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.