README.md

Titanic inference example

A FastAPI inference server.

Pre-requisites

  • pip install -r requirements.txt

Usage

Train

python src/train.py

Serve

uvicorn src.serve:app --reload

Serve mounted

git xet mount https://xethub.com/xdssio/titanic-server-example.git server
uvicorn server.src.serve:app --reload
# Checkout http://127.0.0.1:8000/docs or run: 
curl -X 'POST' \
  'http://127.0.0.1:8000/predict' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "Sex": "male",
  "Age": 22,
  "Fare": 7.25,
  "Embarked": "S"
}'
umount server
File List Total items: 8
Name Last Commit Size Last Modified
data fastapi titanic server app 1 year ago
models Clean constants and unneeded columns 1 year ago
monitoring Clean constants and unneeded columns 1 year ago
src Clean constants and unneeded columns 1 year ago
.gitattributes Initial commit 79 B 1 year ago
.gitignore fix bugs 3.9 KiB 1 year ago
README.md Clean constants and unneeded columns 696 B 1 year ago
requirements.txt fix bugs 1.2 KiB 1 year ago

Repository Size

Loading repo size...

Commits 6 commits

File Types