aisuko commited on
Commit
49a3c14
1 Parent(s): 8a226cc

Decrese the sdk version

Browse files

Signed-off-by: Aisuko <[email protected]>

Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +16 -0
  3. requirements.txt +1 -0
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 👁
4
  colorFrom: gray
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 4.7.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: gray
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 3.47.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import imageio
3
+
4
+ def dummy(img):
5
+ imageio.imwrite("output_image.png", img["mask"])
6
+ return img["image"], img["mask"]
7
+
8
+ with gr.Blocks() as demo:
9
+ with gr.Row():
10
+ img = gr.Image(tool="sketch", label="base image", show_label=True)
11
+ img1 = gr.Image()
12
+ img2 = gr.Image(label="mask image", show_label=True)
13
+ btn = gr.Button()
14
+ btn.click(dummy, img, [img1, img2])
15
+
16
+ demo.launch(debug=True)
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ imageio