diff --git a/frontend/src/features/workflowEditor/components/WorkflowExamplesGalleryModal/index.tsx b/frontend/src/features/workflowEditor/components/WorkflowExamplesGalleryModal/index.tsx index b34acc9d..230dc999 100644 --- a/frontend/src/features/workflowEditor/components/WorkflowExamplesGalleryModal/index.tsx +++ b/frontend/src/features/workflowEditor/components/WorkflowExamplesGalleryModal/index.tsx @@ -11,6 +11,7 @@ import { Modal, type ModalRef } from "components/Modal"; import theme from "providers/theme.config"; import { forwardRef, type ForwardedRef, useState } from "react"; +import CloudSegmentationWorkflow from "../../utils/workflows/cloud_segmentation_workflow.json"; import DimensionalityReductionWorkflow from "../../utils/workflows/dimensionality_reduction.json"; import ImageFilterWorkflow from "../../utils/workflows/image_filter_workflow.json"; import NasaImageWorkflow from "../../utils/workflows/nasa_workflow.json"; @@ -64,6 +65,13 @@ const WorkflowExamplesGalleryModal = forwardRef( jsonFile: RandomForestClassifierWorkflow, levelTag: "Intermediate", }, + { + title: "Cloud Segmentation Workflow", + description: + "A workflow that uses OpenCV to create a cloud segmentation over a NASA earth image. To use it, you must use Shared Storage", + jsonFile: CloudSegmentationWorkflow, + levelTag: "Intermediate", + }, ]; const levelTagMap: any = { diff --git a/frontend/src/features/workflowEditor/utils/workflows/cloud_segmentation_workflow.json b/frontend/src/features/workflowEditor/utils/workflows/cloud_segmentation_workflow.json new file mode 100644 index 00000000..f0b0ecc1 --- /dev/null +++ b/frontend/src/features/workflowEditor/utils/workflows/cloud_segmentation_workflow.json @@ -0,0 +1 @@ +{"workflowPieces":{"2569_f896c512-7a37-4f85-a1a6-0e256e77848b":{"id":2569,"name":"NasaEarthImagePiece","description":"This Piece uses the NASA EPIC API to get satellite images of the Earth.\nReferences: \n- https://epic.gsfc.nasa.gov/about/api \n- https://api.nasa.gov/","dependency":{"dockerfile":null,"requirements_file":"requirements.txt"},"source_image":"ghcr.io/tauffer-consulting/data_apis_domino_pieces:0.2.0-group0","input_schema":{"$defs":{"LocationTypes":{"enum":["random","America","Atlantic Ocean","Africa","Asia","Pacific Ocean"],"title":"LocationTypes","type":"string"}},"properties":{"location":{"allOf":[{"$ref":"#/$defs/LocationTypes"}],"default":"random","description":"Retrieve image centered approximately on this location."}},"title":"NasaEarthImagePiece","type":"object"},"output_schema":{"properties":{"image_url":{"default":null,"description":"URL of the image.","title":"Image Url","type":"string"},"image_base64_string":{"default":null,"description":"Output data as base64 encoded string.","title":"Image Base64 String","type":"string"},"image_file_path":{"default":null,"description":"Path to the image file.","title":"Image File Path","type":"string"}},"title":"OutputModel","type":"object"},"secrets_schema":{"properties":{"NASA_API_KEY":{"default":"DEMO_KEY","description":"API key for NASA Earth Image API.","title":"Nasa Api Key","type":"string"}},"title":"SecretsModel","type":"object"},"style":{"module":"NasaEarthImagePiece","label":"NASA Earth Image","nodeType":"default","nodeStyle":{"backgroundColor":"#ebebeb"},"useIcon":true,"iconClassName":"ion:earth-sharp","iconStyle":{"cursor":"pointer"}},"source_url":"https://github.com/Tauffer-Consulting/data_apis_domino_pieces/tree/main/pieces/NasaEarthImagePiece","repository_url":"https://github.com/Tauffer-Consulting/data_apis_domino_pieces","repository_id":569},"2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7":{"id":2577,"name":"OpenCVFilterPiece","description":"Piece that uses OpenCV filter on an Image","dependency":{"dockerfile":"Dockerfile_opencv","requirements_file":null},"source_image":"ghcr.io/tauffer-consulting/ml-domino-pieces:0.2.0-group1","input_schema":{"$defs":{"FilterNaem":{"enum":["canny","binary"],"title":"FilterNaem","type":"string"}},"properties":{"image_path":{"description":"The path to the image to apply filter.","from_upstream":"always","title":"Image Path","type":"string"},"filter_name":{"allOf":[{"$ref":"#/$defs/FilterNaem"}],"default":"canny","description":"The name of the filter to apply.","title":"Filter Name"}},"required":["image_path"],"title":"OpenCVFilterPiece","type":"object"},"output_schema":{"properties":{"image_path":{"description":"The path to the image with the filter applied.","title":"Output image Path","type":"string"}},"required":["image_path"],"title":"OutputModel","type":"object"},"secrets_schema":null,"style":{"module":"OpenCVFilterPiece","label":"OpenCV Filter Piece","nodeType":"default","nodeStyle":{"backgroundColor":"#38b2be"},"useIcon":true,"iconClassName":"material-symbols:image-outline","iconStyle":{"cursor":"pointer"}},"source_url":"https://github.com/Tauffer-Consulting/ml_domino_pieces/tree/main/pieces/OpenCVFilterPiece","repository_url":"https://github.com/Tauffer-Consulting/ml_domino_pieces","repository_id":570}},"workflowPiecesData":{"2569_f896c512-7a37-4f85-a1a6-0e256e77848b":{"storage":{"storageAccessMode":"Read/Write"},"containerResources":{"cpu":{"min":100,"max":100},"memory":{"min":128,"max":128},"useGpu":false},"inputs":{"location":{"fromUpstream":false,"upstreamId":"","upstreamArgument":"","upstreamValue":"","value":"random"}}},"2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7":{"storage":{"storageAccessMode":"Read/Write"},"containerResources":{"cpu":{"min":100,"max":100},"memory":{"min":128,"max":128},"useGpu":false},"inputs":{"image_path":{"fromUpstream":true,"upstreamId":"NasaEarthI_f896c5127a374f85a1a60e256e77848b","upstreamArgument":"image_file_path","upstreamValue":"NasaEarthImagePiece (f896c512) - Image File Path","value":""},"filter_name":{"fromUpstream":false,"upstreamId":"","upstreamArgument":"","upstreamValue":"","value":"binary"}}}},"workflowNodes":[{"id":"2569_f896c512-7a37-4f85-a1a6-0e256e77848b","type":"CustomNode","position":{"x":556,"y":235.5},"data":{"name":"NasaEarthImagePiece","style":{"module":"NasaEarthImagePiece","label":"NASA Earth Image","nodeType":"default","nodeStyle":{"backgroundColor":"#ebebeb"},"useIcon":true,"iconClassName":"ion:earth-sharp","iconStyle":{"cursor":"pointer"}},"validationError":false,"orientation":"horizontal"},"width":150,"height":70},{"id":"2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7","type":"CustomNode","position":{"x":842,"y":269.5},"data":{"name":"OpenCVFilterPiece","style":{"module":"OpenCVFilterPiece","label":"OpenCV Filter Piece","nodeType":"default","nodeStyle":{"backgroundColor":"#38b2be"},"useIcon":true,"iconClassName":"material-symbols:image-outline","iconStyle":{"cursor":"pointer"}},"validationError":false,"orientation":"horizontal"},"width":150,"height":70,"selected":true,"dragging":false}],"workflowEdges":[{"source":"2569_f896c512-7a37-4f85-a1a6-0e256e77848b","sourceHandle":"source-2569_f896c512-7a37-4f85-a1a6-0e256e77848b","target":"2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7","targetHandle":"target-2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7","id":"reactflow__edge-2569_f896c512-7a37-4f85-a1a6-0e256e77848bsource-2569_f896c512-7a37-4f85-a1a6-0e256e77848b-2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7target-2577_8a1d77ee-29a8-45c8-8578-9ca890afe3f7"}]} \ No newline at end of file