🧩 Workflow
Workflows allow you to chain multiple visual agents.
Overview
Workflows allow you to sequentially chain agents together to process images. They provide a framework for executing and visualizing a sequence of image processing steps.
Arguments
An immutable list of agents to serially execute
Example
workflow = Workflow([
BoundingBoxSelectAgent(classes=["face"]),
SplitAgent(),
ClassificationAgent(classes=["glasses", "no glasses"]),
JoinAgent()
])
Methods
Executes the workflow on the given input image and returns the final results and the execution graph.
Arguments:
input_image
(PIL.Image.Image
): The input image to be processed by the workflow.
Returns:
result, graph
(Tuple[List[ExecutionNode], ExecutionGraph]
): A tuple containing the final execution nodes and the execution graph.
Visualizes the workflow using the Gradio library, displaying each agent’s inputs and outputs in a structured format.
Arguments:
graph
(ExecutionGraph
): The execution graph of the workflow.
Returns:
- Spawns a Gradio instance that runs until it is closed.
More Examples
To get acquainted with constructing your own Overeasy Workflows, take a look at a few examples we’ve provided. These examples will provide practical insights into the setup, execution, and management of Workflows, helping you to understand how to integrate different Agents effectively.