aryrk
commited on
Commit
·
3d681f3
1
Parent(s):
de376fd
[feat] make a preprocess an option
Browse files
app.py
CHANGED
|
@@ -88,15 +88,17 @@ iface = gr.Interface(
|
|
| 88 |
fn=reflection_removal,
|
| 89 |
inputs=[
|
| 90 |
gr.Image(type="filepath", label="Upload Image (JPG/PNG)"),
|
| 91 |
-
gr.Dropdown(choices=preprocess_options, label="Preprocessing Type")
|
| 92 |
],
|
| 93 |
outputs=gr.Gallery(label="Results after Reflection Removal"),
|
| 94 |
examples=[
|
| 95 |
-
os.path.join("sample_images", img)
|
|
|
|
| 96 |
],
|
| 97 |
title="Reflection Remover with Pix2Pix",
|
| 98 |
description="Upload images to remove reflections using a Pix2Pix model. You can also try the sample images below."
|
| 99 |
)
|
| 100 |
|
|
|
|
| 101 |
if __name__ == "__main__":
|
| 102 |
iface.launch()
|
|
|
|
| 88 |
fn=reflection_removal,
|
| 89 |
inputs=[
|
| 90 |
gr.Image(type="filepath", label="Upload Image (JPG/PNG)"),
|
| 91 |
+
gr.Dropdown(choices=preprocess_options, label="Preprocessing Type", value="resize_and_crop")
|
| 92 |
],
|
| 93 |
outputs=gr.Gallery(label="Results after Reflection Removal"),
|
| 94 |
examples=[
|
| 95 |
+
[os.path.join("sample_images", img), "resize_and_crop"]
|
| 96 |
+
for img in os.listdir("sample_images") if img.endswith((".jpg", ".jpeg", ".png"))
|
| 97 |
],
|
| 98 |
title="Reflection Remover with Pix2Pix",
|
| 99 |
description="Upload images to remove reflections using a Pix2Pix model. You can also try the sample images below."
|
| 100 |
)
|
| 101 |
|
| 102 |
+
|
| 103 |
if __name__ == "__main__":
|
| 104 |
iface.launch()
|