abdullahalioo commited on
Commit
ee81506
·
verified ·
1 Parent(s): db67721

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -8,24 +8,22 @@ def remove_background(image):
8
  pillow_image = pipe(image)
9
  return pillow_image
10
 
11
- # Custom CSS to hide Gradio branding and adjust margins
12
  app = gr.Interface(
13
  fn=remove_background,
14
- inputs=gr.components.Image(type='pil'),
15
- outputs=gr.components.Image(type='pil', format='png'),
16
  title='Remove image background',
17
  description='Remove backgrounds from photos automatically in seconds - 100% free, no watermarks, works on any device!'
18
  )
19
 
20
- # Remove Gradio footer and API options
21
  app.css = """
22
- footer {display: none !important;}
 
23
  .gradio-container {margin-bottom: 0 !important;}
24
  """
25
 
 
26
  if __name__ == "__main__":
27
- app.launch(
28
- share=True, # Optional: Remove if you don't need sharing
29
- show_api=False, # Hides the "Use via API" option
30
- show_tips=False # Disables Gradio tips for cleaner UI
31
- )
 
8
  pillow_image = pipe(image)
9
  return pillow_image
10
 
11
+ # Create interface
12
  app = gr.Interface(
13
  fn=remove_background,
14
+ inputs=gr.Image(type='pil'),
15
+ outputs=gr.Image(type='pil', format='png'),
16
  title='Remove image background',
17
  description='Remove backgrounds from photos automatically in seconds - 100% free, no watermarks, works on any device!'
18
  )
19
 
20
+ # CSS to hide footer and adjust margins
21
  app.css = """
22
+ footer {visibility: hidden !important;}
23
+ .gr-footer {display: none !important;}
24
  .gradio-container {margin-bottom: 0 !important;}
25
  """
26
 
27
+ # Launch with minimal options
28
  if __name__ == "__main__":
29
+ app.launch(share=True)