Images

Hello everyone,
Can help me please?
How i can put an image below the other

Can you explain more of what you’re trying to accomplish? Does this not work for some reason?

st.image('image1.jpeg')
st.image('image2.jpeg')

I’m using this code, but I need the screens to be vertical, one under the other, and so side by side

    # self.path_cam = os.path.join("video", "output_2.mp4")
    # self.run = st.checkbox("Run")
    # col1, col2 = st.columns([2.0, 0.8])
    # with col1:
    #     self.FRAME_WINDOW = col1.image([])
    # with col2:
    #     self.detections_info_placeholder = col2.empty()
    # self.camera = cv2.VideoCapture(self.path_cam)
    # self.detector = ObjectDetectorTemplate()

Then don’t use the columns.

This puts content into two columns, side-by-side:

    col1, col2 = st.columns([2.0, 0.8])
    with col1:
        self.FRAME_WINDOW = col1.image([])
    with col2:
        self.detections_info_placeholder = col2.empty()

If you don’t want side by side, eliminate the columns:

    self.FRAME_WINDOW = st.image([])
    self.detections_info_placeholder = st.empty()

(I’m not sure what the rest of the script is. This part isn’t really showing any images, so take this as an abstract response.)

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.