def display_image()

in src/co_op_translator/utils/vision/image_utils.py [0:0]


def display_image(image_path, annotated_image_path):
    """
    Display the original image and the annotated image side by side.

    Args:
        image_path (str): Path to the original image file.
        annotated_image (PIL.Image.Image): The image annotated with translated text.
    """
    plt.figure(figsize=(20, 10))

    # Display the annotated image
    annotated_image = Image.open(annotated_image_path)
    plt.subplot(1, 2, 1)
    plt.imshow(annotated_image)
    plt.title("Annotated Image with Translated Text")
    plt.axis("off")

    # Display the original image
    original_image = Image.open(image_path)
    plt.subplot(1, 2, 2)
    plt.imshow(original_image)
    plt.title("Original Image")
    plt.axis("off")

    plt.show()