It's a B.Tech Final Year - 2019 Project
-
Install postgres and complete it's configuration
-
Use the package manager pip for installation and python3.6 or above
-
Create a virtual environment (using virtualenv etc.)
pip install virtualenv
# We use virtualenvwrapper for easy management of envs
pip install virtualenvwrapper # for linux
pip install virtualenvwrapper-win # for windows
# Create virtual environment
mkvirtualenv env_name
setprojectdir . # assuming you are in git-directory
- Install the requirements
pip install -r requirements.txt
- To deactivate the env simply quit the terminal or enter
deactivate
- Copy "trained_models" folders to the path "/app/tf_disease_classifier/trained_models"
- Set app settings and environment variables
- rename .env.example to .env and set the values as directed in the file
- Run the following commands to set migrations:
python manage.py db init
python manage.py db migrate -m "Inital commit"
python manage.py db upgrade
- Finally run the flask app
python run.py
- Load 'btp-2019.postman_collection.json' into Postman
- Create an enviroment and set {key:value} as:
- key = url
- value = http://localhost:5000
- Now test the different apis:
- first register admin and user
- use admin to register plants and diseases