-
Install Python (Setup instructions)
-
Install Python packages
pip3 install -r training/requirements.txt
pip3 install -r api/requirements.txt
- Install Tensorflow Serving (Setup instructions)
- Install Nodejs (Setup instructions)
- Install NPM (Setup instructions)
- Install dependencies
cd frontend
npm install
npm audit fix
-
Copy
.env.example
as.env
. -
Change API url in
.env
.
- Download the data from kaggle.
- Only keep folders related to Potatoes.
- Run Jupyter Notebook in Browser.
jupyter notebook
- Open
training/potato-disease-training.ipynb
in Jupyter Notebook. - In cell #2, update the path to dataset.
- Run all the Cells one by one.
- Copy the model generated and save it with the version number in the
models
folder.
- Get inside
api
folder
cd api
- Run the FastAPI Server using uvicorn
uvicorn main:app --reload --host 0.0.0.0
- Your API is now running at
0.0.0.0:8000
- Get inside
api
folder
cd api
- Copy the
models.config.example
asmodels.config
and update the paths in file. - Run the TF Serve (Update config file path below)
tensorflow_model_server --port=8500 --rest_api_port=8501 \
--model_config_file=/workspace/local-files/projects/codebasics/plants-detection/potato-disease-classification/models.config
- Run the FastAPI Server using uvicorn
uvicorn main-tf-serving:app --reload --host 0.0.0.0
- Your API is now running at
0.0.0.0:8000
- Get inside
api
folder
cd frontend
- Copy the
.env.example
as.env
and updateREACT_APP_API_URL
to API URL if needed. - Run the frontend
npm start