Spaces:
Running
on
Zero
Running
on
Zero
amirgame197
commited on
Commit
•
15a2bfc
1
Parent(s):
a63ebbb
Update app.py
Browse files
app.py
CHANGED
@@ -27,11 +27,11 @@ def doo(video, mode, progress=gr.Progress()):
|
|
27 |
if ret is False:
|
28 |
break
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
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 |
|