1
0
Fork 0
4.2 MiB materialized 4.1 MiB stored

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 6 months ago
models Clean constants and unneeded columns 5 months ago
monitoring Clean constants and unneeded columns 5 months ago
src Clean constants and unneeded columns 5 months ago
.gitattributes Initial commit 79 B 6 months ago
.gitignore fix bugs 3.9 KiB 6 months ago
README.md Clean constants and unneeded columns 696 B 5 months ago
requirements.txt fix bugs 1.2 KiB 6 months ago

Repository Size

Materialized: 4.2 MiB
Stored: 4.1 MiB

Activity 6 commits

File Types