No project description provided
Project description
InferIO-X
Inference I/O Extended
Installation
$ pip install inferio-x==0.1.0
Usage
from pydantic import BaseModel
from inferio import Service, Endpoint, Method
class PredictPayload(BaseModel):
name: str
age: int
class Predictor:
def __init__(self, model_f: str) -> None:
self.model_f = model_f
def predict(self, payload: PredictPayload) -> dict: ...
if __name__ == "__main__":
predictor = Predictor(model_f="model.pth")
service = Service(
endpoints=[
Endpoint(path="/", handler=predictor.predict, methods=[Method.POST]),
])
service.run()
Tests
To run the tests, use the following command:
$ poetry run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inferio_x-0.1.1.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for inferio_x-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36b05650a4c3f16e07e77bcb0ca38a0c11150bfe57e076e473d5103baad519bd |
|
MD5 | 2a11b1357bc6f8e7a6f072bb79dc12a2 |
|
BLAKE2b-256 | 64c7b0d3f1fe52fee71c12434c18eeb4e31f272d06cfa5bddf5fcf1d8853d223 |