Giter Club home page Giter Club logo

tokyo-housing-prices's Introduction

Tokyo Housing Prices

This project is a REST API application that estimates housing prices in Tokyo.

How to use

Execute application on local

  1. Set environment variables by local.sh
$ cd tokyo-housing-prices
$ cp init.sh local.sh
$ vim local.sh
$ source local.sh
  1. Run Python script
$ cd tokyo-housing-prices
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install --upgrade pip
$ pip install --upgrade setuptools
$ pip install -r requirements.txt
$ python main.py

Execute application on Azure Container Registry

  1. Set environment variables
$ cd tokyo-housing-prices
$ cp init.sh local.sh
$ vim local.sh
$ source local.sh
  1. Build Docker image & test run on local docker environment
    if your execution is finished successful, you can see new records in cosmos-db.
$ cd tokyo-housing-prices
$ docker build -t tokyo-housing-prices .
$ docker run --rm -e ${ACCOUNT_URI} -e ${ACCOUNT_KEY} -it tokyo-housing-prices
  1. Push Image to Azure Container Registry You can see pushed contaier image on Azure Container Registry > Repository after below commands.
$ docker login -u ${USERNAME} -p ${PASSWORD} ${REGISTRY}.azurecr.io
$ docker tag tokyo-housing-prices ${REGISTRY}.azurecr.io/tokyo-housing-prices
$ docker push ${REGISTRY}.azurecr.io/tokyo-housing-prices
  1. Deploy Web Application Select Repository > tokyo-housing-prices > latest and select deploy webapps
    You can see deployed application in App Service page.

  2. Set Environment Variables Select App Service > Configuration > New Application Setting.
    Then you have to set ACCOUNT_URI/ACCOUNT_KEY environment variables and Save configuration.

Note

$ curl -X POST -H "Content-Type: application/json" -d '{"file_name":"13_Tokyo_20201_20212.csv"}' http://127.0.0.1:8000/trades/
$ curl http://127.0.0.1:8000/status/{process_id}

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.