asigalov61
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -404,8 +404,8 @@ def CompareMIDIs(input_src_midi, input_trg_midi, input_sampling_resolution, inpu
|
|
404 |
input_src_tokens = src_tokens
|
405 |
input_trg_tokens = trg_tokens
|
406 |
|
407 |
-
sampling_resolution = input_sampling_resolution * 3
|
408 |
-
sampling_overlap = input_sampling_overlap * 3
|
409 |
|
410 |
comp_length = (min(len(input_src_tokens), len(input_trg_tokens)) // sampling_resolution) * sampling_resolution
|
411 |
|
|
|
404 |
input_src_tokens = src_tokens
|
405 |
input_trg_tokens = trg_tokens
|
406 |
|
407 |
+
sampling_resolution = max(40, min(1000, input_sampling_resolution)) * 3
|
408 |
+
sampling_overlap = max(0, min(500, input_sampling_overlap)) * 3
|
409 |
|
410 |
comp_length = (min(len(input_src_tokens), len(input_trg_tokens)) // sampling_resolution) * sampling_resolution
|
411 |
|