import numpy as np import gradio as gr urls = [ "https://via.placeholder.com/150/1", "https://via.placeholder.com/150/2", "https://via.placeholder.com/150/3", "https://via.placeholder.com/150/4", "https://via.placeholder.com/150/5", ] # Add your image files here img1 = urls[0] img2 = urls[1] img3 = urls[2] img4 = urls[3] img5 = urls[4] with gr.Blocks() as demo: gr.Markdown("Select a tab to display a corresponding image.") with gr.Tabs() as tabs: with gr.Tab("Image 1"): image1 = gr.Image(value=img1) with gr.Tab("Image 2"): image2 = gr.Image(value=img2) with gr.Tab("Image 3"): image3 = gr.Image(value=img3) with gr.Tab("Image 4"): image4 = gr.Image(value=img4) with gr.Tab("Image 5"): image5 = gr.Image(value=img5) demo.launch()