PRANJAL KAR commited on
Commit
d83db4e
·
1 Parent(s): cf93b82

Update progress messages in app.py and utils.py for clarity during section variant generation

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. utils.py +4 -3
app.py CHANGED
@@ -92,7 +92,7 @@ def generate_section_variants_handler(
92
  )
93
 
94
  try:
95
- progress(0.1, desc=f"Generating {section_type} variants...")
96
 
97
  # Generate variants
98
  variants = generate_section_variants(
 
92
  )
93
 
94
  try:
95
+ progress(0.1, desc=f"Getting arrangements for {section_type}...")
96
 
97
  # Generate variants
98
  variants = generate_section_variants(
utils.py CHANGED
@@ -270,7 +270,7 @@ def create_section_from_json(section_config, stems):
270
 
271
 
272
  def generate_section_variants(
273
- stems_folder, audio_stems, section_type, bpm, bars, p=0.5, progress=None
274
  ):
275
  """
276
  Generate multiple variants for a specific section
@@ -304,9 +304,10 @@ def generate_section_variants(
304
  print("No stems loaded.")
305
  return {}
306
 
 
307
  # Create each variant
308
  variants = {}
309
- for variant_key in llm_response:
310
  if variant_key.startswith("variant"):
311
  variant_config = llm_response[variant_key]
312
  audio = create_section_from_json(variant_config, audio_stems)
@@ -319,7 +320,7 @@ def generate_section_variants(
319
  "config": variant_config,
320
  }
321
 
322
- progress(0.2, desc="Generating structure and effects for variants...")
323
 
324
  return variants
325
 
 
270
 
271
 
272
  def generate_section_variants(
273
+ stems_folder, audio_stems, section_type, bpm, bars,progress, p=0.5
274
  ):
275
  """
276
  Generate multiple variants for a specific section
 
304
  print("No stems loaded.")
305
  return {}
306
 
307
+ progress(0.2, desc=f"Generating structure and effects for variants of {section_type}...")
308
  # Create each variant
309
  variants = {}
310
+ for variant_key in progress.tqdm(llm_response, desc="Getting variants as per AI arranegments..."):
311
  if variant_key.startswith("variant"):
312
  variant_config = llm_response[variant_key]
313
  audio = create_section_from_json(variant_config, audio_stems)
 
320
  "config": variant_config,
321
  }
322
 
323
+
324
 
325
  return variants
326