streamlit-image-comparison
streamlit-image-comparison copied to clipboard
Any way to make width = "wide" or "centered"?
Basically just the title. I would love a way for the width to be detected automatically and centre the image-comparison component.
if which_layout == "centered:
image_comparison(
img1 = image1,
img2 = image2,
label1="Image",
label2="Result",
width = 674,
in_memory = True, show_labels = True, make_responsive = True
)
if which_layout == "wide:
image_comparison(
img1 = image1,
img2 = image2,
label1="Image",
label2="Result",
width = 1169,
in_memory = True, show_labels = True, make_responsive = True
)
I came up with this ad-hoc solution, but is there a way you can implement this in the HTML/CSS block? I have zero knowledge of HTML/CSS, so I am not a 100% sure.