BraUndress commited on
Commit
85f151f
1 Parent(s): 0c4c2e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -5
app.py CHANGED
@@ -12,11 +12,36 @@ def dummy(img):
12
 
13
  return mask
14
 
 
 
 
 
 
 
 
 
 
 
15
  with gr.Blocks() as demo:
 
16
  with gr.Row():
17
- img = gr.ImageMask(sources=["upload"], layers=True, transforms=[], format="png", label="base image", show_label=True)
18
- img2 = gr.Image(label="mask image", show_label=True)
19
- btn = gr.Button("Generate Mask")
20
- btn.click(dummy, inputs=img, outputs=img2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- demo.launch(debug=True)
 
12
 
13
  return mask
14
 
15
+ announcement = """
16
+ ## Backup Inpaint Mask Maker:
17
+ 备用蒙版工具: [Visit Here](https://huggingface.co/spaces/BraUndress/inpaint-mask-maker2)
18
+
19
+ ## How to use:
20
+ 使用方法: [Learn More](https://telegra.ph/HowToUploadMaskOnBraundress-05-01)
21
+
22
+ Source: BraUndress
23
+ """
24
+
25
  with gr.Blocks() as demo:
26
+ # 将公告栏放在一个单独的Column中
27
  with gr.Row():
28
+ with gr.Column():
29
+ announcement = gr.Markdown(announcement)
30
+
31
+ # 创建一个新的Column来放置ImageMask和按钮
32
+ with gr.Column():
33
+ with gr.Row():
34
+ img = gr.ImageMask(
35
+ sources=["upload"],
36
+ layers=True,
37
+ transforms=[],
38
+ format="png",
39
+ label="base image",
40
+ show_label=True
41
+ )
42
+ img2 = gr.Image(label="mask image", show_label=True)
43
+
44
+ btn = gr.Button("Generate Mask")
45
+ btn.click(dummy, inputs=img, outputs=img2)
46
 
47
+ demo.launch(debug=True)