import gradio as gr # URLs of the images urls = [ "https://raw.githubusercontent.com/jhxmluv/For-Memo/main/%ED%94%84%EB%A0%88%EC%A0%A0%ED%85%8C%EC%9D%B4%EC%85%981.png", "https://raw.githubusercontent.com/jhxmluv/For-Memo/main/%ED%94%84%EB%A0%88%EC%A0%A0%ED%85%8C%EC%9D%B4%EC%85%982.png", "https://raw.githubusercontent.com/jhxmluv/For-Memo/main/%ED%94%84%EB%A0%88%EC%A0%A0%ED%85%8C%EC%9D%B4%EC%85%983.png", "https://raw.githubusercontent.com/jhxmluv/For-Memo/main/%ED%94%84%EB%A0%88%EC%A0%A0%ED%85%8C%EC%9D%B4%EC%85%984.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()