Spaces:
Runtime error
Runtime error
praeclarumjj3
commited on
Commit
•
659310d
1
Parent(s):
9e43b47
Add instructions
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def inpaint(input_img, mask, option):
|
|
113 |
|
114 |
gradio_inputs = [gr.inputs.Image(type='pil',
|
115 |
tool=None,
|
116 |
-
label="
|
117 |
# gr.inputs.Image(type='pil',source="canvas", label="Mask", invert_colors=True),
|
118 |
gr.inputs.Image(type='pil',
|
119 |
tool="editor",
|
@@ -136,12 +136,15 @@ examples = [['test_512/person512.png', 'test_512/person512.png', 'Automatic'],
|
|
136 |
['test_512/i_org.png', 'test_512/i_overlay.png', 'Manual']]
|
137 |
|
138 |
title = "FcF-Inpainting"
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
(
|
143 |
-
(
|
144 |
-
|
|
|
|
|
|
|
145 |
|
146 |
css = ".image-preview {height: 32rem; width: auto;} .output-image {height: 32rem; width: auto;} .panel-buttons { display: flex; flex-direction: row;}"
|
147 |
|
@@ -149,6 +152,7 @@ iface = gr.Interface(fn=inpaint, inputs=gradio_inputs,
|
|
149 |
outputs=gradio_outputs,
|
150 |
css=css,
|
151 |
layout="vertical",
|
|
|
152 |
examples_per_page=5,
|
153 |
thumbnail="fcf_gan.png",
|
154 |
allow_flagging="never",
|
|
|
113 |
|
114 |
gradio_inputs = [gr.inputs.Image(type='pil',
|
115 |
tool=None,
|
116 |
+
label="Image"),
|
117 |
# gr.inputs.Image(type='pil',source="canvas", label="Mask", invert_colors=True),
|
118 |
gr.inputs.Image(type='pil',
|
119 |
tool="editor",
|
|
|
136 |
['test_512/i_org.png', 'test_512/i_overlay.png', 'Manual']]
|
137 |
|
138 |
title = "FcF-Inpainting"
|
139 |
+
|
140 |
+
description = "<p style='color:royalblue; font-weight: w300;'> \
|
141 |
+
[Note: Queue time may take upto 20 seconds! The image and mask are resized to 512x512 before inpainting.] To use FcF-Inpainting: <br> \
|
142 |
+
(1) <span style='color:#E0B941;'>Upload </span> an Image to <span style='color:#E0B941;'>both</span> input boxes (Image and Mask) below. <br> \
|
143 |
+
(2a) <span style='color:#E0B941;'>Manual Option:</span> Draw a mask (hole) using the brush (click on the edit button in the top right of the Mask View and select draw option). <br> \
|
144 |
+
(2b) <span style='color:#E0B941;'>Automatic Option:</span> This option will generate a mask using a pretrained U2Net model. <br> \
|
145 |
+
(3) Click on Submit and witness the MAGIC! 🪄 ✨ ✨</p>"
|
146 |
+
|
147 |
+
article = "<p style='color: #E0B941; text-align: center'><a style='color: #E0B941;' href='https://github.com/SHI-Labs/FcF-Inpainting' target='_blank'> Keys to Better Image Inpainting: Structure and Texture Go Hand in Hand</a> | <a style='color: #E0B941;' href='https://github.com/SHI-Labs/FcF-Inpainting' target='_blank'>Github Repo</a></p>"
|
148 |
|
149 |
css = ".image-preview {height: 32rem; width: auto;} .output-image {height: 32rem; width: auto;} .panel-buttons { display: flex; flex-direction: row;}"
|
150 |
|
|
|
152 |
outputs=gradio_outputs,
|
153 |
css=css,
|
154 |
layout="vertical",
|
155 |
+
theme="dark-huggingface",
|
156 |
examples_per_page=5,
|
157 |
thumbnail="fcf_gan.png",
|
158 |
allow_flagging="never",
|