YAML-based Examples
Simple examples of workflows defined in YAML
Assorted Examples
ASR Sentiment
Automatic Speech Recognition (ASR) sentiment analysis is the process of detecting the emotional tone or sentiment in spoken language by first transcribing speech using an ASR model and then analyzing the resulting text.
workflow:
id: asr-sentiment
nodes:
- id: audio-speech-recognition
model:
model_id: asr-wav2vec2-large-robust-ft-swbd-300h-english
user_id: facebook
app_id: asr
- id: text-sentiment-classification
model:
model_id: sentiment-analysis-twitter-roberta-base
user_id: erfan
app_id: text-classification
node_inputs:
- node_id: audio-speech-recognition
Demographics
This is a multi-model workflow designed to detect faces, crop them, and recognize key demographic characteristics. It visually classifies attributes such as age, gender, and cultural appearance.
workflow:
id: Demographics
nodes:
- id: detect-concept
model:
model_id: face-detection
model_version_id: 45fb9a671625463fa646c3523a3087d5
- id: image-crop
model:
model_id: margin-110-image-crop
model_version_id: b9987421b40a46649566826ef9325303
node_inputs:
- node_id: detect-concept
- id: demographics-race
model:
model_id: ethnicity-demographics-recognition
model_version_id: b2897edbda314615856039fb0c489796
node_inputs:
- node_id: image-crop
- id: demographics-gender
model:
model_id: gender-demographics-recognition
model_version_id: ff83d5baac004aafbe6b372ffa6f8227
node_inputs:
- node_id: image-crop
- id: demographics-age
model:
model_id: age-demographics-recognition
model_version_id: fb9f10339ac14e23b8e960e74984401b
node_inputs:
- node_id: image-crop
Face Search
A workflow that combines face detection, recognition, and embedding to generate facial landmarks and enable visual search based on the embeddings of detected faces.
workflow:
id: Face-Search
nodes:
- id: face-detect
model:
model_id: face-detection
model_version_id: fe995da8cb73490f8556416ecf25cea3
- id: crop
model:
model_id: margin-100-image-crop
model_version_id: 0af5cd8ad40e43ef92154e4f4bc76bef
node_inputs:
- node_id: face-detect
- id: face-landmarks
model:
model_id: face-landmarks
model_version_id: 98ace9ca45e64339be94b06011557e2a
node_inputs:
- node_id: crop
- id: face-alignment
model:
model_id: landmarks-align
model_version_id: 4bc8b83a327247829ec638c78cde5f8b
node_inputs:
- node_id: face-landmarks
- id: face-embed
model:
model_id: face-identification-transfer-learn
model_version_id: fc3b8814fbe54533a3d80a1896dc9884
node_inputs:
- node_id: face-alignment
- id: face-cluster
model:
model_id: face-clustering
model_version_id: 621d74074a5443d7ad9dc1503fba9ff0
node_inputs:
- node_id: face-embed
Face Sentiment
A multi-model workflow that combines face detection with sentiment classification to recognize seven emotional expressions: anger, disgust, fear, neutral, happiness, sadness, and contempt.
workflow:
id: Face-Sentiment
nodes:
- id: face-det
model:
model_id: face-detection
model_version_id: 6dc7e46bc9124c5c8824be4822abe105
- id: margin-110
model:
model_id: margin-110-image-crop
model_version_id: b9987421b40a46649566826ef9325303
node_inputs:
- node_id: face-det
- id: face-sentiment
model:
model_id: face-sentiment-recognition
model_version_id: a5d7776f0c064a41b48c3ce039049f65
node_inputs:
- node_id: margin-110
General
A general-purpose image detection workflow that identifies a wide range of common objects and enables visual search using embeddings generated from the detected regions.
workflow:
id: General
nodes:
- id: general-v1.5-concept
model:
model_id: aaa03c23b3724a16a56b629203edc62c
model_version_id: aa7f35c01e0642fda5cf400f543e7c40
- id: general-v1.5-embed
model:
model_id: bbb5f41425b8468d9b7a554ff10f8581
model_version_id: bb186755eda04f9cbb6fe32e816be104
- id: general-v1.5-cluster
model:
model_id: cccbe437d6e54e2bb911c6aa292fb072
model_version_id: cc2074cff6dc4c02b6f4e1b8606dcb54
node_inputs:
- node_id: general-v1.5-embed
Language Aware OCR
A workflow that performs Optical Character Recognition (OCR) across multiple languages, automatically adapting to the language present in the input text.
workflow:
id: wf-ocr
nodes:
- id: ocr-workflow
model:
model_id: language-aware-multilingual-ocr-multiplex
- id: text-aggregator
model:
model_id: text-aggregation
model_type_id: text-aggregation-operator
output_info:
params:
avg_word_width_window_factor: 2.0
avg_word_height_window_factor: 1.0
node_inputs:
- node_id: ocr-workflow
- id: language-id-operator
model:
model_id: language-id
model_type_id: language-id-operator
output_info:
params:
library: "fasttext"
topk: 1
threshold: 0.1
lowercase: true
node_inputs:
- node_id: text-aggregator
Prompter LLM
A workflow that utilizes a prompt template to interact with a Large Language Model (LLM), enabling dynamic and context-aware text generation based on input data.
workflow:
id: wf-prompter-llm
nodes:
- id: prompter
model:
model_id: prompter
model_type_id: prompter
description: 'Prompter Model'
output_info:
params:
prompt_template: 'Classify sentiment between postive and negative for the text {data.text.raw}'
- id: llm
model:
user_id: mistralai
model_id: mistral-7B-Instruct
app_id: completion
node_inputs:
- node_id: prompter
RAG Prompter LLM
This workflow combines a Large Language Model (LLM) with a Retrieval-Augmented Generation (RAG) prompter template to generate responses informed by relevant external knowledge.
workflow:
id: wf-prompter-llm
nodes:
- id: rag-prompter
model:
model_id: rag-prompter
model_type_id: rag-prompter
description: 'RAG Prompter Model'
- id: llm
model:
user_id: mistralai
model_id: mistral-7B-Instruct
app_id: completion
node_inputs:
- node_id: rag-prompter
Click here to view more YAML-based workflows examples.