asigalov61 commited on
Commit
d2cf9af
·
verified ·
1 Parent(s): 24695c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -208,13 +208,13 @@ def Mix_Loops(max_num_loops,
208
 
209
  midxs = find_matches(np.array(song_chords[-1]), all_chords_chunks)
210
  midxs = [midx for midx in midxs if midx != song_midxs[-1]]
 
 
 
211
 
212
  song_loops_counter = 1
213
  rtries = 0
214
  end = False
215
-
216
- if stries > 5000:
217
- break
218
 
219
  while song_loops_counter < max_num_loops and not end:
220
 
@@ -450,7 +450,7 @@ with gr.Blocks() as demo:
450
 
451
  gr.Markdown("## Mixing options")
452
 
453
- max_num_loops = gr.Slider(2, 8, value=4, step=1, label="Maximum number of loops to mix")
454
  comp_loops_mult = gr.Slider(2, 4, value=2, step=1, label="Number of loops repetitions")
455
  chords_chunks_len = gr.Slider(4, 8, value=5, step=1, label="Number of loops chords to match")
456
  chords_chunks_set_len = gr.Slider(10, 20, value=13, step=1, label="Number of unique chords in each chord chunk")
 
208
 
209
  midxs = find_matches(np.array(song_chords[-1]), all_chords_chunks)
210
  midxs = [midx for midx in midxs if midx != song_midxs[-1]]
211
+
212
+ if stries > 2000:
213
+ break
214
 
215
  song_loops_counter = 1
216
  rtries = 0
217
  end = False
 
 
 
218
 
219
  while song_loops_counter < max_num_loops and not end:
220
 
 
450
 
451
  gr.Markdown("## Mixing options")
452
 
453
+ max_num_loops = gr.Slider(2, 6, value=4, step=1, label="Maximum number of loops to mix")
454
  comp_loops_mult = gr.Slider(2, 4, value=2, step=1, label="Number of loops repetitions")
455
  chords_chunks_len = gr.Slider(4, 8, value=5, step=1, label="Number of loops chords to match")
456
  chords_chunks_set_len = gr.Slider(10, 20, value=13, step=1, label="Number of unique chords in each chord chunk")