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.0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for inferio_x-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29c0c6a0eb0e246407334795ead9a8d09123e3315bb0f80fe15d6d4aee19dcc3 |
|
MD5 | e841498ddc84acb9dc4008d81924f932 |
|
BLAKE2b-256 | 6128c8c240e6095586022d25f964ab5d4d1908170a169e37946ffc56db0b6786 |