Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,8 +26,8 @@ def compare_tempos(audio_file1, audio_file2):
|
|
| 26 |
tempo1 = classifier.estimate_tempo(features1, interpolate=True)
|
| 27 |
tempo2 = classifier.estimate_tempo(features2, interpolate=True)
|
| 28 |
|
| 29 |
-
ratio1 =
|
| 30 |
-
ratio2 =
|
| 31 |
|
| 32 |
return f"Tempo 1: {tempo1} BPM\nTempo 2: {tempo2} BPM\nRatio 1/2: {ratio1}\nRatio 2/1: {ratio2}"
|
| 33 |
|
|
|
|
| 26 |
tempo1 = classifier.estimate_tempo(features1, interpolate=True)
|
| 27 |
tempo2 = classifier.estimate_tempo(features2, interpolate=True)
|
| 28 |
|
| 29 |
+
ratio1 = tempo1 / tempo2
|
| 30 |
+
ratio2 = tempo2 / tempo1
|
| 31 |
|
| 32 |
return f"Tempo 1: {tempo1} BPM\nTempo 2: {tempo2} BPM\nRatio 1/2: {ratio1}\nRatio 2/1: {ratio2}"
|
| 33 |
|