Home

Awesome

tests

FastAPI Model Server Scaffolding

Serving machine learning models production-ready, fast, easy and secure powered by FastAPI by Sebastián Ramírez.

This repository contains a starter app which can be used to speed-up your next machine learning project.

To experiment and get a feeling on how to use this scaffolding, a sample regression model for house price prediction is included in this project. Follow the installation and setup instructions to run the sample model and serve it aso RESTful API.

Requirements

Python 3.8+

Installation/Setup

Makefile provided to get you up and going quickly.

make setup

Run It

  1. Start your app with:
poetry run uvicorn app.main:app
  1. Go to http://localhost:8000/docs.
  2. You can use the sample payload from the docs/sample_payload.json file when trying out the house price prediction model using the API. Prediction with example payload

Testing

Makefile provided to provide test suite.

make test

Linting & Formatting

Makefile provided to provide linting & formatting suite.

make format