Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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((
|
| 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
|