Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.69 KB

README.md

File metadata and controls

67 lines (46 loc) · 1.69 KB

Housing Price Prediction

Python Version Django version

About

This is a project to scrape the data of the houses (title, description, region, price, year of construction, area, number of rooms) from https://divar.ir and save them in database (sqlite) after preprocessing.

By using machine learning (Decision Tree), a model is trained to predict house prices.

Getting Started

  1. Clone the Repository

    git clone /~https://github.com/masoudgheisari92/house_price_prediction.git
  2. Make a .env file in house_price_prediction directory containing all the following environment variables:

    DJANGO_SECRET_KEY=""
    DJANGO_DEBUG=True
    DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
  3. Create virtual environment and install required packages:

    # create virtual environment
    python -m venv venv
    # activate virtual environment
    venv/Scripts/activate
    # install required packages
    pip install -r project/requirements.txt
  4. Run the migrations

    cd project
    python manage.py migrate
  5. Create superuser (admin)

    python manage.py createsuperuser
  6. Run server

    python manage.py runserver

APIs

  • /scrape scrape the data of the houses of a selected city.
  • /predict predict the price of a house based of its city, region, year of construction, area and the number of rooms.

Contact

Masoud Gheisari