View Code? Open in Web Editor
NEW
This project forked from bridgecrew-perf6/api-deployment-3
Python 98.25%
Dockerfile 1.51%
Procfile 0.24%
api-deployment-3's Introduction
![alt text](./contents/api_image.png)
Name of the app "house-pred-api"
- This is an app that predicts a house price based on user inputs
- The inputs are accepted in the form of json data
- Outputs are provided in json format as well
- There are three routes that are available in this app
- Default route with get method that will show if the server is alive
- Predict route with post and get method
: (Post) to receive json data and show prediction
: (Get) to show the required data from user
- This app is designed to accept only json data, the format of the json data is mentioned in (predict: get method)
- In case a user sends incorrect json data, error message will be shown with a link to more info
- python
- Docker
- Required python libraries which is found in "requirement.txt"
- Clone the repository
- Navigate to the directory and type pip install requirements.txt.
- type python/python3 app.py and look for a page in your browser
- Send a json file using services like https://www.postman.com/ to send post request that is required
- To deploy the app locally using Docker
- Navigate to the directory Dockerfile and type docker build . -t image-name :this will create docker image
- To run a the image in a container type docker run -t image-name :this will run the app in a container
- To deploy the app on Heroku refer to heroku.com
api-deployment-3's People
Contributors