Adeal1 commited on
Commit
236619f
·
1 Parent(s): 5a91028

Update Gradio interface to use Ocean theme and remove unnecessary parameters

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -299,9 +299,8 @@ def apply_bg_image(image, background_file=None, background_color=None, bg_type="
299
 
300
 
301
  # Gradio interface
302
- with gr.Blocks() as demo:
303
  gr.Markdown("# Image and Video Background Remover & Changer\n\nRemove or apply background to images and videos.")
304
-
305
  with gr.Tab("Remove Image Background"):
306
  with gr.Row():
307
  image_input = gr.Image(label="Upload Image", interactive=True)
@@ -324,7 +323,6 @@ with gr.Blocks() as demo:
324
  )
325
 
326
  remove_button.click(remove_bg_fn, inputs=image_input, outputs=slider)
327
-
328
  with gr.Tab("Apply Background to Image"):
329
 
330
  with gr.Row():
@@ -398,8 +396,6 @@ with gr.Blocks() as demo:
398
  inputs=[image_input, bg_image, color_picker, bg_type],
399
  outputs= slider,
400
  )
401
-
402
-
403
  with gr.Tab("Remove Video Background"):
404
  with gr.Row():
405
  in_video = gr.Video(label="Input Video", interactive=True)
@@ -535,4 +531,4 @@ with gr.Blocks() as demo:
535
  )
536
 
537
  if __name__ == "__main__":
538
- demo.launch(show_error=True, ssr_mode=False)
 
299
 
300
 
301
  # Gradio interface
302
+ with gr.Blocks(theme=gr.themes.Ocean()) as demo:
303
  gr.Markdown("# Image and Video Background Remover & Changer\n\nRemove or apply background to images and videos.")
 
304
  with gr.Tab("Remove Image Background"):
305
  with gr.Row():
306
  image_input = gr.Image(label="Upload Image", interactive=True)
 
323
  )
324
 
325
  remove_button.click(remove_bg_fn, inputs=image_input, outputs=slider)
 
326
  with gr.Tab("Apply Background to Image"):
327
 
328
  with gr.Row():
 
396
  inputs=[image_input, bg_image, color_picker, bg_type],
397
  outputs= slider,
398
  )
 
 
399
  with gr.Tab("Remove Video Background"):
400
  with gr.Row():
401
  in_video = gr.Video(label="Input Video", interactive=True)
 
531
  )
532
 
533
  if __name__ == "__main__":
534
+ demo.launch(show_error=True)