File size: 663 Bytes
0bbc70a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from musicnn_torch import top_tags
import os
# Use the absolute paths you provided
files = [
'/Users/oriyonay/Desktop/CRAZY BEAT.mp3',
'/Users/oriyonay/Desktop/burn the stage/bounces/02 the type of girl.mp3',
'/Users/oriyonay/Desktop/burn the stage/extras/jazzy red roses.mp3'
]
for f in files:
if os.path.exists(f):
print(f"\n--- Predicting top tags for {os.path.basename(f)} ---")
try:
tags = top_tags(f, model='MTT_musicnn', topN=5)
print(f"Top 5 tags: {tags}")
except Exception as e:
print(f"Error processing {f}: {e}")
else:
print(f"\nWarning: File not found at {f}")
|