In this repository you'll find:
- My Jupyter Notebook file for the training of a ResNet-50 based CNN using FastAI
- A ready to use REST-API in Flask, which returns predictions for any given image
You need to have fastai>=1.0.0
installed.
Please note, that i put my weights.pkl
file in the rest-api
folder. If you modified the model, you have to export your weights and replace the file.
Install requirements
pip install -r requirements.txt
Start server
FLASK_APP=rest-api/server.py flask run
Make a demo request
python request.py --file example.jpg
# Returns: {'result': 'desert'}