File size: 481 Bytes
614db74 b144a7f 614db74 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
# URLs of the images
urls = [
"https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/wordcloud.png"
]
# Function to get the selected image URL
def get_image(sid):
nid = int(sid) - 1
return urls[nid]
# Create a Gradio interface
with gr.Blocks() as demo:
sid_input = gr.Radio(choices=["1"], label="Select Image")
image_output = gr.Image()
sid_input.change(fn=get_image, inputs=sid_input, outputs=image_output)
demo.launch() |