amirgame197 commited on
Commit
caa1229
1 Parent(s): 7e20121

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,11 +2,12 @@ import spaces
2
  import gradio as gr
3
  import cv2
4
  import numpy as np
 
5
 
6
  from PIL import Image
7
  from transparent_background import Remover
8
 
9
- remover = Remover(mode='fast')
10
 
11
  @spaces.GPU
12
  def doo(video):
@@ -31,7 +32,7 @@ def doo(video):
31
 
32
  processed_frames += 1
33
  print(f"Processing: {processed_frames}")
34
-
35
  out = remover.process(img, type='green')
36
  writer.write(cv2.cvtColor(np.array(out), cv2.COLOR_BGR2RGB))
37
 
 
2
  import gradio as gr
3
  import cv2
4
  import numpy as np
5
+ import time
6
 
7
  from PIL import Image
8
  from transparent_background import Remover
9
 
10
+ remover = Remover()
11
 
12
  @spaces.GPU
13
  def doo(video):
 
32
 
33
  processed_frames += 1
34
  print(f"Processing: {processed_frames}")
35
+ time.sleep(1)
36
  out = remover.process(img, type='green')
37
  writer.write(cv2.cvtColor(np.array(out), cv2.COLOR_BGR2RGB))
38