amirgame197 commited on
Commit
15a2bfc
1 Parent(s): a63ebbb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -27,11 +27,11 @@ def doo(video, mode, progress=gr.Progress()):
27
  if ret is False:
28
  break
29
 
30
- #if time.time() - start_time >= 55:
31
- # print("GPU Timeout is coming")
32
- # cap.release()
33
- # writer.release()
34
- # return str(tmpname) + '.mp4'
35
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
36
  img = Image.fromarray(frame).convert('RGB')
37
 
 
27
  if ret is False:
28
  break
29
 
30
+ if time.time() - start_time >= 20 * 60 - 5:
31
+ print("GPU Timeout is coming")
32
+ cap.release()
33
+ writer.release()
34
+ return str(tmpname) + '.mp4'
35
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
36
  img = Image.fromarray(frame).convert('RGB')
37