This repo contains an example FastAPI service that accompanies a blog post available here. The service loads the ResNet18 model from torchhub and serves requests containing a URL of an image, returning a prediction of the type of object in the image (although many are animals). The main branch contains recommended improvements to the FastAPI application. The feature/before branch contains the state before applying improvments.
For development related tasks this repo uses task.
task: Available tasks for this project:
* default: List all tasks
* send-local-request: Send a local inference request to dev server. Usage IMG_URL=https://www.myimg.com task send-request
* start-dev: Start local FastAPI server