import gradio as gr from PIL import Image # Function to display the image def show_image(): image = Image.open('the_peddlers_magic_seeds.jpg') # Ensure this image is in the repository return image # Gradio interface title_button = gr.Button("The Peddler's Magic Seeds") image_output = gr.Image() def display_image(): return show_image() with gr.Blocks() as demo: gr.Markdown("""

The Peddler's Magic Seeds

Click the title of the story below to look at the image.

""") title_button.render() title_button.click(display_image, inputs=None, outputs=image_output) image_output.render() demo.launch()