Wordcloud / app.py
Jayahae's picture
Create app.py
614db74 verified
raw
history blame
496 Bytes
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", "2", "3", "4"], label="Select Image")
image_output = gr.Image()
sid_input.change(fn=get_image, inputs=sid_input, outputs=image_output)
demo.launch()