Ron0420 commited on
Commit
548b88e
1 Parent(s): 5145dd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -139,7 +139,10 @@ def deepfakespredict(input_video):
139
  else:
140
  text = "The video is REAL."
141
 
142
- face_frames = faces.astype(np.uint8)
 
 
 
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")