kavisek / demo-predictive-model-apis

ML Inference Pipeline with FastAPI, Postgres, and Redis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo-predictive-model-apis

Serving a classification model via FastAPI.

Quick Start

make start

Once the docker finishes setting up database, cache, and api in the compose file. You can access the API at http://localhost:8080 and the documentation can be accessed at http://localhost:8080/docs.

Local Development

make startup_db

cd app
poetry shell
make uvicorn

Sample Request

The documentation will provide your example curl request to interact with your api.

# Post data to the api.
curl -X 'POST' \
  'http://localhost/users/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "string",
  "password": "string"
}'

And to fetch results back.

# Fetch results from the API.
curl -X 'GET' \
  'http://localhost/users/?skip=0&limit=100' \
  -H 'accept: application/json'

About

ML Inference Pipeline with FastAPI, Postgres, and Redis.

License:MIT License


Languages

Language:Python 78.3%Language:Makefile 11.8%Language:Mako 4.8%Language:Shell 3.0%Language:Dockerfile 2.1%