This examples shows how to create and connect adora operators and custom nodes in Python.
The dataflow.yml defines a simple dataflow graph with the following three nodes:
- a webcam node, that connects to your webcam and feeds the dataflow with raw webcam frames as flattened numpy arrays.
- an object detection node, that applies YOLOv8 (via the
ultralyticspackage) on the webcam image. The output is the bounding box of each object detected, the confidence and the class. - a window plotting node, that will retrieve the webcam image and the Yolov5 bounding box and join the two together.
pip install -r requirements.txt
cargo run --example python-operator-dataflowconda create -n example_env python=3.11
conda activate example_env
pip install -r requirements.txt
pip install -r requirements_llm.txt- Start the object detection dataflow alone:
adora run dataflow.yml- Start the llm dataflow (Only works on Windows and Linux):
adora run dataflow_llm.ymlWithin the window you can ask question such as:
ask how are you
change bounding box plot to red
change confidence value to percentage
change object detection to only detect person
send 200 200 200 400 to topic line
recordThe keyboard, microphone, whisper node, works in a very similar fashion as the object detection dataflow and I'll let you check it out by yourself.
The code modification flow works by first comparing an instruction with a vectordb of operators source code and then feeding the most similar operator to an llm with the instruction for code modification.
The end result is then saved using a file saver.