Skip to main content

Node based workflow orchestration UI for python ML/AI computing

Project description

NozyIO

Python AI/ML pipeline visualization and orchestration UI for your codebase. Add a pipeline workflow GUI demo to your python project effortlessly.

demo: https://www.youtube.com/watch?v=8rvxua4AmAo

  • Workflow nodes editor for your python code
  • Automatically scan your python functions to nodes with params typing
  • Visualize output results of each step/node, including images, charts
  • Export the pipeline graph as Python code
  • Python visual scripting
378056651-d6c5f930-cedc-426a-aaa8-11cdb92c6cd4-min

Install

In your python project root:

pip install nozyio

To start the nozyio UI:

nozyio

Usage

Super easy node define (just write a function with typing) For example:

from PIL.Image import Image

def resize_image(
    image: Image,
    width: int = 512,
    height: int = 768,
    method: Literal["stretch", "fit", "crop"],
    interpolation: str
) -> Image:
    # ...some code here...
    return image.resize((width, height), interp_method)

resize_image.NOZY_NODE_DEF = {
    "node_title": "Resize Image",
}

👇This function will be rendered as below. You can see that all args default values are populated as the input box defaults

Screenshot 2024-10-19 at 9 22 37 PM

👇Export workflow to code, preview any image input/output

378069723-64a69234-5532-43a4-b192-415317be6fcd-min

👇Automatically scan your python functions as nodes with params typing

Screenshot 2024-10-19 at 2 50 02 PM

👇Double-click canvas to search any functions in your project and add nodes

Screenshot 2024-10-19 at 10 42 41 PM

Node input types

Nozyio will automatically scan your python functions and convert them to nodes. You can define the input, output types by adding type annotations to the function parameters and return type. Params with no type annotation will become "any" type.

Python Type UI Element HTML element
int number input box <input type="number">
str text input box <textfield type="text">
Literal["abc", "xyz"] dropdown input box <select>
PIL.Image.Image image preview <img>

Input widgets

You can also add custom UI widgets to the input parameters by adding a widget field to the input definition. In below example, we use server_file_picker widget to let user select an image file from the files on the server:

from PIL import Image.Image
def load_image(image_path: str) -> Image.Image:
    return Image.open(image_path)
load_image.NOZY_NODE_DEF = {
    "node_title": "Load Image",
    "description": "Load image from path",
    "inputs": {
        "image_path": {
            "type": "filepath",
            "widget": {
                'type': 'server_file_picker',
                'options': {
                    'extensions': ['.png', '.jpg', '.jpeg', '.bmp', '.tiff', '.webp']
                }
            },
            "hide_handle": True,
            "description": "Path to image"
        }
    },
    "outputs": [{"name": "image", "type": "Image", "description": "Loaded image"}]
}
Screenshot 2024-10-19 at 9 37 21 PM

Future Plans

  • Visualize your python code to graph flow
  • AI image nodes packages

Development

install pip package in editable mode

pip install -e .

start nozyio server

nozyio --allow-cors

Start web dev server with hot reload

cd nozyio/web && npm run dev

Go to the web server url

Build and publish to pypi

if you haven't installed twine: python -m pip install --upgrade twine if you haven't installed build: python -m pip install --upgrade build

To build and publish to pypi:

chmod +x build.sh

./build.sh

Credits

Lots of code are referenced from ComfyUI (https://github.com/comfyanonymous/ComfyUI)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nozyio-0.1.13.tar.gz (6.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nozyio-0.1.13-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

File details

Details for the file nozyio-0.1.13.tar.gz.

File metadata

  • Download URL: nozyio-0.1.13.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nozyio-0.1.13.tar.gz
Algorithm Hash digest
SHA256 10fe6b8cc0b86d88a16e6596d49440b7a4dbf8474803c6989ca67a1c65bc7dbc
MD5 2682f9c9d85423ace86b6fd52e77d04d
BLAKE2b-256 cb18f3a5d0dbb07874f0f39b0783f269bc35cb310c5fbcd646f6f7b0c8515a92

See more details on using hashes here.

File details

Details for the file nozyio-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: nozyio-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nozyio-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4a09933f1efab2a3848c28af74982d45ca56acc01a02bd514879e6c5becbac
MD5 4492358984913f5ad7b3595e97a12945
BLAKE2b-256 b3bdf03a1efb9c03c91c3e0cd91f28616a9e72b96b3fab506b2c524634059395

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page