AI Studio

Python Package

The Cameralyze Python package provides an easy-to-use interface through which you can interact with the Cameralyze platform. With the Python package, you can:
  1. 1.
    Run public models
  2. 2.
    Run public workflows.
  3. 3.
    Run private models.
  4. 4.
    Run private workflows.


pip install cameralyze

Run public models

You can run a public model in your code. You can find all public models in the platform and hub.
import cameralyze
# connect to Cameralyze
connector = cameralyze.Model(api_key="YOUR_API_KEY")
# set the model you want to use
# run for image URL
image = "https://"
# run for local file
image = model.read_file(path="")
# run for base64 file
import base64
with open("yourfile.jpg", "rb") as image_file:
image = base64.b64encode("utf8")
# get response
image = model.predict(image=image)
Last modified 1mo ago