GithubHelp home page GithubHelp logo

house-price-prediction-lstm-restapi-in-keras's Introduction

House-Price-Prediction-LSTM-RestAPI-in-Keras

AIM: To predict house price.

Requirements: 
Anaconda 3-5.2.0
Linux-Ubuntu 16.04
Python-3.6.6
keras=2.1.6
Tensorflow=1.9.0
Tensorflowjs=0.5.6
h5py=2.8.0
flask=1.0.2
numpy=1.14.1
pandas=0.23.4
matplotlib=2.2.3
argparse=1.1
seaborn=0.9.0
warnings
sklearn==0.19.2
math
json=2.0.9
requests=2.19.1

Method to execute code :

(1) HS_analysis.py (2) lstm_price.py (3) flask_lstm.py (4) server.py

It is always better to create virtual environment and then execute prototype or any repository so as not to conflict with your system’s package’s configurations etc.

Method of creating Virtual Environment using conda :

conda update conda
conda create -n yourenvname python=x.x 

Then install packages you need to run repository To activate run : source activate yourenvname To deactivate run : source deactivate

(A) -----> To get Analysis of data execute script (1). Type following command on shell:

python HS_price_prediction.py --path /path/to/train.csv --analysis True

path to csv file is required. If you want final data then replace --analysis with --final_data.

(B)-------> To train LSTM model (2) execute following :

python lstm_price.py --path /path/to/trainfile --h5path /path/where/h5/istostore --tfjspath /path/where/tfjstostore

(C) -------> Make REST-API (3), execute following:

python flask_lstm.py --path /path/to h5model

a server would open up like : Serving Flask app "flask_lstm" (lazy loading)

  • Environment: production WARNING: Do not use the development server in a production environment.
  • Debug mode: off
  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

(D)----------> Now run (4) using :

python server.py --path /path/to/test/csvfile Or Use curl along with data in -F flag to get Json prediction.

Note: Issue that I faced while runnning flask app to open server: UnsupportedOperation: not writable

To resolve it : You need to edit the echo function definition at ../site-packages/click/utils.py the default value for the file parameter must be sys.stdout instead of None. Do the same for the secho function definition at ../site-packages/click/termui.py. reference

house-price-prediction-lstm-restapi-in-keras's People

Contributors

aarti-b avatar

Stargazers

 avatar  avatar

Watchers

 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.