link to the descriptive challenge
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.
First thing, the home page return the content (here is "hello world")
- Method : GET
- URL : /
the first request is to create a route to check the status of the server
- Method : GET
- URL : /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
Finally, let's define the "Fake prediction" route
- Method : GET
- URL : /predict/<seller_avaible>/<month>/<customer_visiting_website>
If you want more information about the technical resolution take a look at the Notebook
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/.