Omnibus commited on
Commit
67462d9
·
verified ·
1 Parent(s): 6b9f87a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -127,19 +127,20 @@ def make_animation():
127
  print("############")
128
  print(ea)
129
  urllib.request.urlretrieve(ea,f'tmp{i}.png')
130
- frames.append(Image.open(f'tmp{i}.png'))
131
- frame_one = frames[0]
132
- filename1=f'{uuid.uuid4()}.gif'
133
- filename=os.path.abspath(filename1)
 
134
  print("**************")
135
- print(filename)
136
  fps=10
137
  clip = ic.ImageSequenceClip(frames, fps = fps)
138
  clip.to_gif(f"{uid}.gif",fps=fps)
139
 
140
 
141
  #frame_one.save(filename, format="GIF", append_images=frames, save_all=True, duration=100, loop=0)
142
- html_out+=f'<div class="img_class"><img src="{filename}"></div>'
143
  except Exception as e:
144
  print(e)
145
  html_out+='</div>'
 
127
  print("############")
128
  print(ea)
129
  urllib.request.urlretrieve(ea,f'tmp{i}.png')
130
+ frames.append(f'tmp{i}.png')
131
+ #frames.append(Image.open(f'tmp{i}.png'))
132
+ #frame_one = frames[0]
133
+ #filename1=f'{uuid.uuid4()}.gif'
134
+ #filename=os.path.abspath(filename1)
135
  print("**************")
136
+ #print(filename)
137
  fps=10
138
  clip = ic.ImageSequenceClip(frames, fps = fps)
139
  clip.to_gif(f"{uid}.gif",fps=fps)
140
 
141
 
142
  #frame_one.save(filename, format="GIF", append_images=frames, save_all=True, duration=100, loop=0)
143
+ html_out+=f'<div class="img_class"><img src="{uid}.gif"></div>'
144
  except Exception as e:
145
  print(e)
146
  html_out+='</div>'