jsd219 commited on
Commit
386b508
·
verified ·
1 Parent(s): 976f96d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ def estimate_genre(filepath):
11
  return {"Error": f"Failed to load audio: {str(e)}"}
12
 
13
  try:
14
- tempo, _ = librosa.beat.beat_track(y, sr=sr)
15
  centroid = np.mean(librosa.feature.spectral_centroid(y=y, sr=sr))
16
  chroma = librosa.feature.chroma_stft(y=y, sr=sr)
17
  chroma_strength = np.mean(np.max(chroma, axis=0))
 
11
  return {"Error": f"Failed to load audio: {str(e)}"}
12
 
13
  try:
14
+ tempo, _ = librosa.beat.beat_track(y=y, sr=sr) # ✅ FIXED here
15
  centroid = np.mean(librosa.feature.spectral_centroid(y=y, sr=sr))
16
  chroma = librosa.feature.chroma_stft(y=y, sr=sr)
17
  chroma_strength = np.mean(np.max(chroma, axis=0))