amirgame197
commited on
Commit
•
23895f6
1
Parent(s):
dded11c
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ def doo(video):
|
|
18 |
|
19 |
processed_frames = 0
|
20 |
start_time = time.time()
|
|
|
21 |
|
22 |
while cap.isOpened():
|
23 |
ret, frame = cap.read()
|
@@ -27,6 +28,8 @@ def doo(video):
|
|
27 |
|
28 |
if time.time() - start_time >= 60:
|
29 |
print("GPU Timeout is coming")
|
|
|
|
|
30 |
return 'output.mp4'
|
31 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
32 |
img = Image.fromarray(frame).convert('RGB')
|
|
|
18 |
|
19 |
processed_frames = 0
|
20 |
start_time = time.time()
|
21 |
+
print(start_time)
|
22 |
|
23 |
while cap.isOpened():
|
24 |
ret, frame = cap.read()
|
|
|
28 |
|
29 |
if time.time() - start_time >= 60:
|
30 |
print("GPU Timeout is coming")
|
31 |
+
cap.release()
|
32 |
+
writer.release()
|
33 |
return 'output.mp4'
|
34 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
35 |
img = Image.fromarray(frame).convert('RGB')
|