This is a python code, so make sure you have python installed on your system.
- Clone the repository then open it using your code editor.
- Supposedly you have trained the model (from the Machine-Learning repository), download the model file with the .h5 file format and name it as desired (to match with the scripts), then move it to the root directory of this project.
- This code is using Google Cloud Storage, so you have to make your own GCS Bucket, make a folder named predict_uploads inside the bucket, get the credentials file (.json file) and name it "mesra-credentials.json" (to match with the scripts) then copy it to the root directory of this project.
- Go to main.py edit the code in line 34, change 'mesra-bucket' with the name of the bucket that you created in the previous step.
- Open terminal in the project root directory, then run
pip install -r requirements.txtto install the dependencies. - Run the app using the command:
python main.py. - By default, the server will run on the localhost with the port 5000, open http://localhost:5000 to view it in your browser.
- If it shows 'OK' then you have successfully run the predict api.
- The next step is to configure the backend service, you can find it in the backend repository.