This is a Python project designed for Python version >=3.6.
The following commands install the necessary tools:
pip install -r requirements.txt
To run the FastAPI server:
python api.py
You can now use curl to send requests:
curl -X 'POST' \
'http://127.0.0.1:8000/predict' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"image": "images/dog.jpg"
}'
You should get a response with response code 200 and 'standard poodle' message.
To run the tests:
pytest