Skip to content

Commit

Permalink
Enhance output structure in process_output_images function. Updated…
Browse files Browse the repository at this point in the history
… the success message to return a structured JSON object containing image results. Added debug print statements to track the response before returning it, improving traceability during image processing.
  • Loading branch information
SzabyV committed Dec 23, 2024
1 parent b0cc385 commit 197ecae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rp_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def process_output_images(outputs, job_id):
)
return {
"status": "success",
"message": image_json,
"message": {"results": image_json},
}
else:
# base64 image
Expand Down Expand Up @@ -494,8 +494,10 @@ def handler(job):
print(f"Error while saving list of images: {str(e)}")
# Get the generated image and return it as URL in an AWS bucket or as base64
images_result = process_output_images(history[prompt_id].get("outputs"), job["id"])

print("Just about to print the results (response):")

result = {**images_result, "refresh_worker": REFRESH_WORKER}
print(result)

return result

Expand Down

0 comments on commit 197ecae

Please sign in to comment.