File size: 620 Bytes
40fd9d0
 
 
 
 
 
 
 
 
 
 
2d0a45c
40fd9d0
2d0a45c
40fd9d0
 
 
2d0a45c
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
iface = gr.Interface(
    fn=show_image,
    inputs=gr.Button("The Peddler's Magic Seeds", elem_id="title_button"),
    outputs="image",
    title="",
    description="Click the title to reveal the image related to the story."
)

# Add custom CSS to underline the title
iface.launch(
    inline=False,
    css=".gr-button { text-decoration: underline; font-size: 20px; font-weight: bold; }"
)