Giter VIP home page Giter VIP logo

need-taxi-backend's Introduction

The Need Taxi Backend API

Predict taxi fares through machine learning using random forest and linear_regression.

Installation On OSX

- pip install virtualenv
- virtualenv venv 
- source <desired-path>/bin/activate - OSX
- pip install -r requirements.txt
- export FLASK_APP=app/hello.py - OSX
- flask run

Installation On Windows

- pip install virtualenv
- virtualenv venv
- venv\Scripts\activate.bat - Windows
- pip install -r requirements.txt
- set FLASK_APP=app\app.py - Windows
- flask run

Running on http://127.0.0.1:5000/

Docker

docker build -t need-taxi-backend .
docker-compose up -d
docker build -t  need-taxi-backend_app . && docker run -it  need-taxi-backend_app

Endpoints

HEAD | POST predict-fares
HEAD | POST calculation-duration-distances

You can see endpoint details in the postman collection.

Sample Request:

HEAD | POST http://127.0.0.1:5000/api/v1/predict-fares

Request Payload:
{
   "pickup_latitude" : 41.05,
   "pickup_longitude" : 28.98,
   "drop_off_latitude" : 41.14,
   "drop_off_longitude" : 28.46,
   "taxi_type" : 0
}

Response:
{
  "linear_regression_prediction": 186.66,
  "random_forest_prediction": 184.4
}

need-taxi-backend's People

Contributors

dependabot[bot] avatar mustafatoker avatar

Stargazers

 avatar

Watchers

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