fix row
Browse files
app.py
CHANGED
@@ -29,12 +29,18 @@ interface = Interface(pre_pipe=preprocessing,
|
|
29 |
seg_pipe=seg_net)
|
30 |
|
31 |
|
|
|
|
|
|
|
|
|
32 |
def predict(image):
|
33 |
return interface([image])[0]
|
34 |
|
35 |
|
36 |
footer = r"""
|
37 |
<center>
|
|
|
|
|
38 |
<b>
|
39 |
Demo based on <a href='https://github.com/OPHoperHPO/image-background-remove-tool'>CarveKit</a>
|
40 |
</b>
|
@@ -42,10 +48,11 @@ Demo based on <a href='https://github.com/OPHoperHPO/image-background-remove-too
|
|
42 |
"""
|
43 |
|
44 |
with gr.Blocks(title="CarveKit") as app:
|
45 |
-
gr.
|
46 |
-
gr.HTML(
|
47 |
-
|
48 |
-
|
|
|
49 |
input_img = gr.Image(type="pil", label="Input image")
|
50 |
run_btn = gr.Button(variant="primary")
|
51 |
with gr.Column():
|
|
|
29 |
seg_pipe=seg_net)
|
30 |
|
31 |
|
32 |
+
def generate_trimap(original, mask):
|
33 |
+
trimap(original_image=original, mask=mask)
|
34 |
+
|
35 |
+
|
36 |
def predict(image):
|
37 |
return interface([image])[0]
|
38 |
|
39 |
|
40 |
footer = r"""
|
41 |
<center>
|
42 |
+
<img src='https://raw.githubusercontent.com/leonelhs/image-background-remove-tool/master/docs/imgs/logo.png' alt='CarveKit' width="200" height="80">
|
43 |
+
</br>
|
44 |
<b>
|
45 |
Demo based on <a href='https://github.com/OPHoperHPO/image-background-remove-tool'>CarveKit</a>
|
46 |
</b>
|
|
|
48 |
"""
|
49 |
|
50 |
with gr.Blocks(title="CarveKit") as app:
|
51 |
+
gr.Markdown("<center><h1><b>CarveKit</b></h1></center>")
|
52 |
+
gr.HTML(
|
53 |
+
"<center><h3>Automated high-quality background removal framework for an image using neural networks.</h3></center>")
|
54 |
+
with gr.Row().style(equal_height=False):
|
55 |
+
with gr.Column():
|
56 |
input_img = gr.Image(type="pil", label="Input image")
|
57 |
run_btn = gr.Button(variant="primary")
|
58 |
with gr.Column():
|