amirgame197
commited on
Commit
•
dc913e2
1
Parent(s):
85d769e
Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,12 @@ def doo(video, mode):
|
|
32 |
print("GPU Timeout is coming")
|
33 |
cap.release()
|
34 |
writer.release()
|
35 |
-
return tmpname + '.mp4'
|
36 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
37 |
img = Image.fromarray(frame).convert('RGB')
|
38 |
|
39 |
if writer is None:
|
40 |
-
writer = cv2.VideoWriter(tmpname + '.mp4', cv2.VideoWriter_fourcc(*'mp4v'), fps, img.size)
|
41 |
|
42 |
processed_frames += 1
|
43 |
print(f"Processing: {processed_frames}")
|
@@ -46,7 +46,7 @@ def doo(video, mode):
|
|
46 |
|
47 |
cap.release()
|
48 |
writer.release()
|
49 |
-
return tmpname + '.mp4'
|
50 |
|
51 |
title = "🎞️Video Background Removal tool🎥"
|
52 |
|
|
|
32 |
print("GPU Timeout is coming")
|
33 |
cap.release()
|
34 |
writer.release()
|
35 |
+
return str(tmpname) + '.mp4'
|
36 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
37 |
img = Image.fromarray(frame).convert('RGB')
|
38 |
|
39 |
if writer is None:
|
40 |
+
writer = cv2.VideoWriter(str(tmpname) + '.mp4', cv2.VideoWriter_fourcc(*'mp4v'), fps, img.size)
|
41 |
|
42 |
processed_frames += 1
|
43 |
print(f"Processing: {processed_frames}")
|
|
|
46 |
|
47 |
cap.release()
|
48 |
writer.release()
|
49 |
+
return str(tmpname) + '.mp4'
|
50 |
|
51 |
title = "🎞️Video Background Removal tool🎥"
|
52 |
|