Modelz Python SDK
pip install modelz-py
CLI
modelz --help
Stable Diffusion
echo "cute cat" | modelz inference $PROJECT --serde msgpack --write-file cat.jpg --read-stdin
Gradio Client on Modelz Endpoints
We provide a lightweight Python library that makes it very easy to use any Gradio app served on modelz as an API. The functionalities of GradioClient are completely identical to Client in gradio_client library provided by Gradio. The only difference is that when initializing the client, you should enter your Modelz serving endpoint URL instead of a Hugging Face space.
Example Usage
from modelz import GradioClient as Client
# Parameter here is the endpoint of your Modelz deployment
# The format is like https://${DEPOLOYMENT_KEY}.modelz.io/
cli = Client("https://translator-th85ze61tj4n3klc.modelz.io/")
cli.view_api()
# >> Client.predict() Usage Info
# ---------------------------
# Named API endpoints: 1
# - predict(text, api_name="/predict") -> output
# Parameters:
# - [Textbox] text: str
# Returns:
# - [Textbox] output: str
cli.predict("hallo", api_name="/predict")
# >> "Bonjour."
Metadata
Release files for modelz-py 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| modelz-py-0.3.3.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modelz_py-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / modelz-py-0.3.3.tar.gz
| Download URL | modelz-py-0.3.3.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8c7988e30af5b3c41543e3367e2c79662e75552de48844bf000d068bb0bd33d
|
|
BLAKE2b-256 checksum How to use checksums |
10251bf603c22c0bceeb03fdcebfeb5fe57db3ae2453edd41304b13ad8b44675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / modelz_py-0.3.3-py3-none-any.whl
| Download URL | modelz_py-0.3.3-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1b580a7bd6194f5ac0cef920b82cebad563aee289cc53663e889a05a27ac304
|
|
BLAKE2b-256 checksum How to use checksums |
eb518ef0ffe40cc0c179602f818144880c92e25987b827cd8cf157116fef90c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|