aryrk commited on
Commit
c01448f
·
1 Parent(s): 9489bae

[fix error]

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -64,14 +64,17 @@ sample_images = [
64
 
65
  iface = gr.Interface(
66
  fn=reflection_removal,
67
- inputs=gr.File(file_types=["image"], label="Upload Image (JPG/PNG)", live=True),
68
- outputs=gr.Image(type="pil", label="Processed Image"),
69
- title="Reflection Remover with Pix2Pix",
70
- description="Upload a single image to remove reflections. No GIFs allowed.",
71
  examples=[
72
- os.path.join(SAMPLE_DIR, img) for img in sample_images
73
  ],
 
 
74
  )
75
 
76
  if __name__ == "__main__":
77
  iface.launch()
 
 
64
 
65
  iface = gr.Interface(
66
  fn=reflection_removal,
67
+ inputs=[
68
+ gr.Image(source="upload", type="filepath", label="Upload Image (JPG/PNG)", live=True)
69
+ ],
70
+ outputs=gr.Gallery(label="Results after Reflection Removal"),
71
  examples=[
72
+ os.path.join("sample_images", img) for img in os.listdir("sample_images") if img.endswith((".jpg", ".jpeg", ".png"))
73
  ],
74
+ title="Reflection Remover with Pix2Pix",
75
+ description="Upload images to remove reflections using a Pix2Pix model. You can also try the sample images below."
76
  )
77
 
78
  if __name__ == "__main__":
79
  iface.launch()
80
+