Giter Club home page Giter Club logo

deep-shrooms-backend's Introduction

deep-shrooms-backend

model-repo
frontend

Flask-backend for our Keras/Tensorflow model that predicts mushrooms based on pictures.

Running instance

API

POST /predict

Params: .jpg file as multipart/form-data

Returns: JSON-object that has prediction value on its edibility 0 being unedible and 1 edible.

Example:

{
  "prediction": 0.658562958240509
}

How to install

  1. First install Python >=3.5
  2. You should have now pip so then install virtualenv: pip install virtualenv (or pip3 install virtualenv if you have also Python 2 installed eg. Mac OS X)
  3. Create virtualenv environment: virtualenv <name>
  4. Activate that environment: source ./<name>/bin/activate
  5. Clone this repository including the frontend with: git clone --recursive https://github.com/TeemuKoivisto/deep-shrooms-backend
  6. Install requirements: pip install -r requirements.txt
  7. Follow the installation instructions on the deep-shrooms-frontend
  8. And you're done!

Run the development server on localhost:9000 with ./dev.sh.
It will automatically refresh on any changes to the source code.

Production server uses pm2 for running the app as a daemon. You can install it with npm i -g pm2.

To run the production server on localhost:9000 with pm2 start ./prod.sh.
NOTE: You have to build the frontend by going to its folder and entering: npm run build.

Detailed list of dependencies

You can probably install the same requirements as in requirements.txt with:

pip install keras tensorflow flask flask-cors h5py gunicorn

deep-shrooms-backend's People

Contributors

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