TSC4 commited on
Commit
5a13fae
·
verified ·
1 Parent(s): 1ba86f9

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -71,21 +71,21 @@ iface = gr.Interface(
71
  fn=color_remover_interface,
72
  inputs=[
73
  gr.Image(type="numpy", label="Upload Image"),
74
- gr.Textbox(label="Hex Color to Remove", placeholder="#FFFFFF"),
75
- gr.Slider(minimum=0, maximum=255, value=40, step=1, label="Color Tolerance"),
76
- gr.ColorPicker(label="Pick a Color") # Color picker remains
77
  ],
78
  outputs=[
79
- gr.Image(type="numpy", label="Processed Image") # Removed output textbox
80
  ],
81
- title="Image Colour Remover",
82
  description="""
83
  Remove a specific colour from your image with precision!
84
 
85
  ### How to Use:
86
  1. Upload an image
87
- 2. Choose the colour to remove
88
- 3. Adjust the colour tolerance (higher numbers will remove similair colours to hex code entered)
89
  4. See the magic happen!
90
  """,
91
  )
 
71
  fn=color_remover_interface,
72
  inputs=[
73
  gr.Image(type="numpy", label="Upload Image"),
74
+ gr.Textbox(label="Enter the hex code of the colour you want to remove", placeholder="#FFFFFF"),
75
+ gr.Slider(minimum=0, maximum=255, value=40, step=1, label="Colour Tolerance, adjust this to be higher if background doesn't remove"),
76
+ gr.ColorPicker(label="Pick a Colour to find its hex value") # Color picker remains
77
  ],
78
  outputs=[
79
+ gr.Image(type="pil", image_mode="RGBA", label="Processed Image", format='png')
80
  ],
81
+ title="Background remover for any image",
82
  description="""
83
  Remove a specific colour from your image with precision!
84
 
85
  ### How to Use:
86
  1. Upload an image
87
+ 2. Choose the colour to remove (Enter the hex code, the colour picker at the bottom of the page will help find this hex code)
88
+ 3. Adjust the colour tolerance (higher numbers will remove more)
89
  4. See the magic happen!
90
  """,
91
  )