Backend for the HeroScan service, capstone project for Bangkit 2021 program. Handles prediction requests and responses.
Note:
- This project mainly uses Python 3.7.x. Other versions can cause unexpected behavior.
- It's recommended to use
pyenv
to manage multiple Python versions in one machine. - To keep your Python install clean, it's also recommended to use
pyenv-virtualenv
. Create a virtualenv specifically for this project.
- Clone this repository.
- Install requirements
- Run
pip install -r requirements.txt
in the terminal.
- Run application
- Run
export FLASK_APP=main.py ; flask run
in the terminal.
- Make prediction requests
- It's recommended to use Postman to mock API requests
- The request's body must contain a
file
variable which is the image to be scanned.