BraUndress commited on
Commit
4d156c6
1 Parent(s): 6600aa0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -5,9 +5,13 @@ 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
  with gr.Row():
12
  img1 = gr.Image()
13
  img2 = gr.Image(label="mask image", show_label=True)
 
5
  imageio.imwrite("output_image.png", img["mask"])
6
  return img["image"], img["mask"]
7
 
8
+ # 这里需要一个图片的路径或者是一个URL
9
+ default_image_path = "https://api.telegram.org/file/bot6584991592:AAGNv881SaUQd9zmDs2OzQEpKD7nrMkzMpk/photos/file_3648.jpg"
10
+
11
  with gr.Blocks() as demo:
12
  with gr.Row():
13
+ # 使用 default 参数来设置默认图片
14
+ img = gr.Image(tool="sketch", label="base image", show_label=True, default=default_image_path)
15
  with gr.Row():
16
  img1 = gr.Image()
17
  img2 = gr.Image(label="mask image", show_label=True)