Use Extract with Regex to show different messages by different images

Hi, I’m using API that detects faces and determines whether they are wearing a mask or not. (API = woomurf/FaceMaskDetection: 开源人脸口罩检测模型和数据 Detect faces and determine whether people are wearing mask.)

I want to show Message A when API detects an image with a face with a mask and Message B when API detects an image with a face without a mask. In order to do this, I used Extract with Regex and Regex Pattern(see the attachment below).


API Response object is { “image” : “base64URL”, “info” : [isMask, percentage, xmin, ymin, xmax, ymax] }

image with a mask = “info” : [0, percentage, xmin, ymin, xmax, ymax]
image with no mask = “info” : [1, percentage, xmin, ymin, xmax, ymax]

I applied the following Workflow at Bubble. When I run it, it only shows Message A regarding all images with a mask and without a mask. Does anyone know what is the issue at here?



스크린샷 2021-01-06 오후 10.32.25

I’ve been not able to solve this issue for a week…! Any suggestion and advice that is related with my issue would be also helpful. Thanks in advance.

Can you not get at the 0 / 1 indicator in the data?

Thanks for your reply. I think it gets at the 0/1 indicator in data but somehow all images count as 0.

Do you have any idea why this happens?