Giter VIP home page Giter VIP logo

book-recommender-api's Introduction

book-recommender-api

API with 10,000 books (each averaging 50,000 reviews) that given a selected book, recommends books with one of two methods: Nearest Neighbors or Correlation Matrix Factorization.

prod url: books.bendevera.com

routes

  • GET /api - root route with constant response.

  • GET /api/books - route to get all books in the database.

  • GET /api/books/<id>- route to get an individual book by id.

  • POST /api/recommend - route to get book recommendations.

    • book_id | int | [1,10000] | "reference" book that is used to generate recommendations
    • type | string | nearest/matrix/popularity | method used to generate recommendations

local setup

  1. install dependencies pip install -r requirements.txt
  2. create postgres database
  3. set flask app export FLASK_APP=manage.py
  4. initialize flask db and migrations folder flask db init
  5. create first migration flask migrate -m "message"
  6. upgrade db flask db upgrade
  7. store all books using script in root directory python store_books.py
  8. store all recommendations (preprocess for speed) python store_recommendations.py both|mf|nn
  9. run app flask run

book-recommender-api's People

Contributors

bendevera 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.