bori0824 commited on
Commit
dbdd424
1 Parent(s): 2d0a45c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -7,16 +7,16 @@ def show_image():
7
  return image
8
 
9
  # Gradio interface
10
- iface = gr.Interface(
11
- fn=show_image,
12
- inputs=gr.Button("The Peddler's Magic Seeds", elem_id="title_button"),
13
- outputs="image",
14
- title="",
15
- description="Click the title to reveal the image related to the story."
16
- )
17
 
18
- # Add custom CSS to underline the title
19
- iface.launch(
20
- inline=False,
21
- css=".gr-button { text-decoration: underline; font-size: 20px; font-weight: bold; }"
22
- )
 
 
 
 
 
 
7
  return image
8
 
9
  # Gradio interface
10
+ title_button = gr.Button("The Peddler's Magic Seeds")
11
+ image_output = gr.Image()
 
 
 
 
 
12
 
13
+ def display_image():
14
+ return show_image()
15
+
16
+ with gr.Blocks() as demo:
17
+ gr.Markdown("<h1 style='text-decoration: underline; cursor: pointer;'>The Peddler's Magic Seeds</h1>")
18
+ title_button.render()
19
+ title_button.click(display_image, inputs=None, outputs=image_output)
20
+ image_output.render()
21
+
22
+ demo.launch()