marquesafonso commited on
Commit
80a188b
·
verified ·
1 Parent(s): 1720501

re-add frames param in animation

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def extract_waveform_animation(audio_file):
30
  return line,
31
 
32
  # Create the animation
33
- ani = FuncAnimation(fig, update, init_func=init, interval=7, blit=False)
34
 
35
  # Save the animation to a temporary file
36
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile:
 
30
  return line,
31
 
32
  # Create the animation
33
+ ani = FuncAnimation(fig, update, frames=np.arange(0, int(duration)), init_func=init, interval=7, blit=False)
34
 
35
  # Save the animation to a temporary file
36
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile: