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