Alican commited on
Commit
32b72c5
·
1 Parent(s): 662dec3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -26,7 +26,7 @@ def GIF(fname,pixel_size):
26
  frame = Image.fromarray(frame)
27
  frame = cv2.cvtColor(np.asarray(face2paint(model, frame)), cv2.COLOR_BGR2RGB)
28
  frames = []
29
- <<<<<<< HEAD
30
  for frame in result: #Third Step: Combining the frames into a GIF
31
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
32
  frame = Image.fromarray(frame)
@@ -34,7 +34,7 @@ def GIF(fname,pixel_size):
34
  frames[0].save('cache.gif', append_images=frames, save_all=True, loop=1)
35
  cache = Image.open('cache.gif')
36
  return cache
37
- =======
38
  for frame in result:
39
 
40
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
@@ -43,7 +43,6 @@ def GIF(fname,pixel_size):
43
  print(type(frames), len(frames), type(frames[0]), frames[0].size)
44
  frames[0].save('cache.gif', append_images=frames, save_all=True, loop=1)
45
  return Image.open('cache.gif')
46
- >>>>>>> a2e31df8118400de0782a9feb55255620b93cd83
47
 
48
  def initilize(image,pixel_size,checkbox1):
49
  if image.name.endswith('.gif'):
 
26
  frame = Image.fromarray(frame)
27
  frame = cv2.cvtColor(np.asarray(face2paint(model, frame)), cv2.COLOR_BGR2RGB)
28
  frames = []
29
+
30
  for frame in result: #Third Step: Combining the frames into a GIF
31
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
32
  frame = Image.fromarray(frame)
 
34
  frames[0].save('cache.gif', append_images=frames, save_all=True, loop=1)
35
  cache = Image.open('cache.gif')
36
  return cache
37
+
38
  for frame in result:
39
 
40
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
 
43
  print(type(frames), len(frames), type(frames[0]), frames[0].size)
44
  frames[0].save('cache.gif', append_images=frames, save_all=True, loop=1)
45
  return Image.open('cache.gif')
 
46
 
47
  def initilize(image,pixel_size,checkbox1):
48
  if image.name.endswith('.gif'):