Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
# URLs of the images
|
4 |
+
urls = [
|
5 |
+
"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",
|
6 |
+
"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",
|
7 |
+
"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",
|
8 |
+
"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"
|
9 |
+
]
|
10 |
+
|
11 |
+
# Function to get the selected image URL
|
12 |
+
def get_image(sid):
|
13 |
+
nid = int(sid) - 1
|
14 |
+
return urls[nid]
|
15 |
+
|
16 |
+
# Create a Gradio interface
|
17 |
+
with gr.Blocks() as demo:
|
18 |
+
sid_input = gr.Radio(choices=["1", "2", "3", "4"], label="Select Image")
|
19 |
+
image_output = gr.Image()
|
20 |
+
|
21 |
+
sid_input.change(fn=get_image, inputs=sid_input, outputs=image_output)
|
22 |
+
|
23 |
+
demo.launch()
|