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.
-
Clone the Repository
git clone https://github.com/masoudgheisari92/house_price_prediction.git
-
Make a
.env
file inhouse_price_prediction
directory containing all the following environment variables:DJANGO_SECRET_KEY="" DJANGO_DEBUG=True DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
-
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
-
Run the migrations
cd project python manage.py migrate
-
Create superuser (admin)
python manage.py createsuperuser
-
Run server
python manage.py runserver
/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.
- linkedin: https://linkedin.com/in/masoud-gheisari
- email: masoud.gh20@gmail.com