Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,9 +71,10 @@ def capture_function(vid=None):
|
|
71 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
72 |
cv2.imwrite(f'{uid}-frames/{i}.png',frame_f)
|
73 |
fbox.append(f'{uid}-frames/{i}.png')
|
74 |
-
frame_num=f'Working on {i+1} of {frame_count1
|
75 |
|
76 |
yield fbox,fbox,frame_num
|
|
|
77 |
|
78 |
def im_2_vid(images,fps):
|
79 |
#width, height = Image.open(images[0]).size
|
@@ -109,7 +110,7 @@ def rem_bg(vid):
|
|
109 |
fbox2.append(f'{uid}-rembg/{i}.png')
|
110 |
frame_num=f'Working on {i+1} of {frame_count1-1}'
|
111 |
yield fbox2,frame_num,None
|
112 |
-
frame_num=f'Done: {i+1} of {frame_count1
|
113 |
out_vid,_file = im_2_vid(fbox2, fps)
|
114 |
yield (fbox2,frame_num,out_vid)
|
115 |
|
|
|
71 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
72 |
cv2.imwrite(f'{uid}-frames/{i}.png',frame_f)
|
73 |
fbox.append(f'{uid}-frames/{i}.png')
|
74 |
+
frame_num=f'Working on {i+1} of {frame_count1}'
|
75 |
|
76 |
yield fbox,fbox,frame_num
|
77 |
+
yield fbox,fbox,frame_num
|
78 |
|
79 |
def im_2_vid(images,fps):
|
80 |
#width, height = Image.open(images[0]).size
|
|
|
110 |
fbox2.append(f'{uid}-rembg/{i}.png')
|
111 |
frame_num=f'Working on {i+1} of {frame_count1-1}'
|
112 |
yield fbox2,frame_num,None
|
113 |
+
frame_num=f'Done: {i+1} of {frame_count1}'
|
114 |
out_vid,_file = im_2_vid(fbox2, fps)
|
115 |
yield (fbox2,frame_num,out_vid)
|
116 |
|