Spaces:
Sleeping
Sleeping
File size: 767 Bytes
f70847b 5a1cf50 f70847b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import gradio as gr
# URLs of the images
urls = [
"https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/verb-tense-1.png",
"https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/verb-tense-2.png",
"https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/verb-tense-3.png",
"https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/verb-tense-4.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()
|