amirgame197 commited on
Commit
27202f7
1 Parent(s): 80a5737

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -7,7 +7,7 @@ import time
7
  from PIL import Image
8
  from transparent_background import Remover
9
 
10
- @spaces.GPU(enable_queue=True)
11
  def doo(video, mode):
12
  if(mode == 'Normal'):
13
  remover = Remover()
@@ -28,11 +28,11 @@ def doo(video, mode):
28
  if ret is False:
29
  break
30
 
31
- #if time.time() - start_time >= 55:
32
- # print("GPU Timeout is coming")
33
- # cap.release()
34
- # writer.release()
35
- # return 'output.mp4'testing something
36
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
37
  img = Image.fromarray(frame).convert('RGB')
38
 
 
7
  from PIL import Image
8
  from transparent_background import Remover
9
 
10
+ @spaces.GPU()
11
  def doo(video, mode):
12
  if(mode == 'Normal'):
13
  remover = Remover()
 
28
  if ret is False:
29
  break
30
 
31
+ if time.time() - start_time >= 55:
32
+ print("GPU Timeout is coming")
33
+ cap.release()
34
+ writer.release()
35
+ return 'output.mp4'
36
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
37
  img = Image.fromarray(frame).convert('RGB')
38