Kvikontent commited on
Commit
f0f5cb9
·
verified ·
1 Parent(s): f155350

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,7 +2,9 @@ import gradio as gr
2
  from rembg import remove
3
  from PIL import Image
4
  import io
 
5
 
 
6
  def background_remover(input_image):
7
  output_img = remove(input_image) # Remove the background using the rembg library
8
  # No need to convert to BytesIO, just return the PIL Image object
 
2
  from rembg import remove
3
  from PIL import Image
4
  import io
5
+ import spaces
6
 
7
+ @spaces.GPU(duration=20)
8
  def background_remover(input_image):
9
  output_img = remove(input_image) # Remove the background using the rembg library
10
  # No need to convert to BytesIO, just return the PIL Image object