def assemble_message_body()

in src/post_comment/app.py [0:0]


def assemble_message_body(output):

  if output['image_labels_detected'] == True:
    images_detected_body = f"Main images detected: {output['attachment_images']}"
  else: 
    images_detected_body = "No images detected"
  
  if output['text_detected'] == True: 
    text_detected_body = f"Text detected: {output['attachment_text']}"
  else:
    text_detected_body = "No text detected"

  return text_detected_body, images_detected_body