Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def get_image_enhancer(scale = 2, device='cuda:0'):
|
|
79 |
device=device
|
80 |
)
|
81 |
|
82 |
-
model_GFPGAN = 'https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.
|
83 |
img_enhancer = GFPGANer(
|
84 |
model_path=model_GFPGAN,
|
85 |
upscale=scale,
|
@@ -204,7 +204,7 @@ def predict(input, platform_radio, img_enhancer):
|
|
204 |
else:
|
205 |
return output, [resize_image(ori_image, new_width=400), resize_image(output, new_width=400)], gr.update(visible=True)
|
206 |
|
207 |
-
image_blocks = gr.Blocks(css=
|
208 |
with image_blocks as demo:
|
209 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
210 |
with gr.Box():
|
@@ -218,15 +218,7 @@ with image_blocks as demo:
|
|
218 |
with gr.Row():
|
219 |
with gr.Column():
|
220 |
gr.HTML("""
|
221 |
-
|
222 |
-
<p>
|
223 |
-
Solemnly promise: this application will not collect any user information and image resources.
|
224 |
-
</p>
|
225 |
-
</div>
|
226 |
-
<div style='margin: 0 auto; text-align: center'>
|
227 |
-
The model comes from <a href='https://github.com/Sanster/lama-cleaner' target=_blank>[<font style='color:blue;'>Lama</font>]</a>. Thanks! ❤️<br>
|
228 |
-
<a href='https://huggingface.co' target=_blank>[<font style='color:blue;'>huggingface.co</font>]</a> provides code hosting. Thanks! ❤️
|
229 |
-
</div>
|
230 |
"""
|
231 |
)
|
232 |
|
@@ -266,9 +258,9 @@ with image_blocks as demo:
|
|
266 |
download_button = gr.Button(elem_id="download-btn", value="Save(⏩)")
|
267 |
with gr.Column(elem_id="share-container") as share_container:
|
268 |
with gr.Group(elem_id="share-btn-container"):
|
269 |
-
community_icon = gr.HTML(community_icon_html, elem_id="community-icon", visible=True)
|
270 |
-
loading_icon = gr.HTML(loading_icon_html, elem_id="loading-icon", visible=True)
|
271 |
-
share_button = gr.Button("Share to community", elem_id="share-btn", visible=True)
|
272 |
|
273 |
with gr.Row(elem_id="log_row"):
|
274 |
with gr.Column(id="log_col"):
|
|
|
79 |
device=device
|
80 |
)
|
81 |
|
82 |
+
model_GFPGAN = 'https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth'
|
83 |
img_enhancer = GFPGANer(
|
84 |
model_path=model_GFPGAN,
|
85 |
upscale=scale,
|
|
|
204 |
else:
|
205 |
return output, [resize_image(ori_image, new_width=400), resize_image(output, new_width=400)], gr.update(visible=True)
|
206 |
|
207 |
+
image_blocks = gr.Blocks(css="footer:{visibility:hidden}", title='AI Image Cleaner')
|
208 |
with image_blocks as demo:
|
209 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
210 |
with gr.Box():
|
|
|
218 |
with gr.Row():
|
219 |
with gr.Column():
|
220 |
gr.HTML("""
|
221 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
"""
|
223 |
)
|
224 |
|
|
|
258 |
download_button = gr.Button(elem_id="download-btn", value="Save(⏩)")
|
259 |
with gr.Column(elem_id="share-container") as share_container:
|
260 |
with gr.Group(elem_id="share-btn-container"):
|
261 |
+
#community_icon = gr.HTML(community_icon_html, elem_id="community-icon", visible=True)
|
262 |
+
#loading_icon = gr.HTML(loading_icon_html, elem_id="loading-icon", visible=True)
|
263 |
+
#share_button = gr.Button("Share to community", elem_id="share-btn", visible=True)
|
264 |
|
265 |
with gr.Row(elem_id="log_row"):
|
266 |
with gr.Column(id="log_col"):
|