Ivan000 commited on
Commit
d48dfdf
·
verified ·
1 Parent(s): 19b68b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def generate_frequency_visualization(audio_path, fps, num_bars):
54
  for j, height in enumerate(heights):
55
  x = spacing + j * (bar_width + spacing)
56
  y = 720 - height
57
- color = tuple((np.array(plt.cm.viridis(j / num_bars))[:3] * 255).astype(int)) # Use Viridis colormap
58
  cv2.rectangle(img, (x, 720), (x + bar_width, y), color, -1)
59
 
60
  # Save the frame
 
54
  for j, height in enumerate(heights):
55
  x = spacing + j * (bar_width + spacing)
56
  y = 720 - height
57
+ color = tuple(int(c * 255) for c in plt.cm.viridis(j / num_bars)[:3]) # Use Viridis colormap
58
  cv2.rectangle(img, (x, 720), (x + bar_width, y), color, -1)
59
 
60
  # Save the frame