Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,10 @@ def deepfakespredict(input_video):
|
|
139 |
else:
|
140 |
text = "The video is REAL."
|
141 |
|
142 |
-
|
|
|
|
|
|
|
143 |
face_frames[0].save('results.gif', save_all=True, append_images=face_frames[1:], duration = 250, loop = 100 )
|
144 |
clip = mp.VideoFileClip("results.gif")
|
145 |
clip.write_videofile("video.mp4")
|
|
|
139 |
else:
|
140 |
text = "The video is REAL."
|
141 |
|
142 |
+
for face in faces:
|
143 |
+
face_frame = Image.fromarray(face.astype('uint8'), 'RGB')
|
144 |
+
face_frames.append(face_frame)
|
145 |
+
|
146 |
face_frames[0].save('results.gif', save_all=True, append_images=face_frames[1:], duration = 250, loop = 100 )
|
147 |
clip = mp.VideoFileClip("results.gif")
|
148 |
clip.write_videofile("video.mp4")
|