Welcome to modelz’s documentation!

modelz is a Python package for calling model prediction and management APIs that are on the modelz platform. We provide both Python SDK and CLI interface.

Installation

pip install modelz-py
pip install git+https://github.com/tensorchord/modelz-py

Examples

Check modelz_docs for more details.

stable diffusion example
1import modelz
2
3
4APIKey = "mzi-abcdefg..."
5
6cli = modelz.ModelzClient(deployment="abcdgefg...", key=APIKey, serde="msgpack")
7cli.inference(params="A dog is running in the grass.").save_to_file("dog.jpg")
image bind example
 1import modelz
 2
 3
 4APIKey = "mzi-abcdefg..."
 5
 6cli = modelz.ModelzClient(deployment="imagebind-XXX", key=APIKey)
 7
 8input = {"model": "imagebind-text", "input": ["A dog", "doggery", "puppy"]},
 9resp = cli.inference(params=data, serde="msgpack")
10embeddings = resp["data"]
11for emb in embeddings:
12   print(emb['embedding'])