Giter VIP home page Giter VIP logo

challenge-flask-api-mathieu's Introduction

challenge-flask-api

link to the descriptive challenge

The Mission

You are intern in a company to provide AI models to their customer. Unfortunatly the machine learning engineers that work with you are not very goods... They spend more time drinking coffee and play video games than doing their job. After few weeks their the project manager come to you and tell you that they have a client that is really upset to not have his model yet. He ask you to already create the API to get the data and return a random prediction. It will give him more time to beg the ML to finish the project.

Resolving request

First thing, the home page return the content (here is "hello world")

  • Method : GET
  • URL : /

Hello World

the first request is to create a route to check the status of the server

  • Method : GET
  • URL : /status

Status

Then I'm going to create a "login" route and if the method is "POST" I'll send back the requested information.

  • Method : POST
  • URL : /login

Login

Finally, let's define the "Fake prediction" route

  • Method : GET
  • URL : /predict/<seller_avaible>/<month>/<customer_visiting_website>

Prediction

If you want more information about the technical resolution take a look at the Notebook

Deployment

Click on the name for access to the corresponding file
I use Docker and Travis to automate the deployment of my project.

For pull and start this app on your computer with docker, just enter this command in your terminal.
It's magic.

docker run -p 5000:5000 leersma/challenge-flask-api:latest

just pay attention to the port used If you run it on port 5000 as in the example, you can easily access it like this: http://localhost:5000/.

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.