jacob-c commited on
Commit
c61f3e3
·
1 Parent(s): 4c87bcd
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -215,6 +215,9 @@ def generate_lyrics(music_analysis, genre, duration):
215
  # Get beat analysis and templates
216
  lyric_templates = music_analysis.get("lyric_templates", [])
217
 
 
 
 
218
  # Verify LLM is loaded
219
  if llm_model is None or llm_tokenizer is None:
220
  return "Error: LLM model not properly loaded"
 
215
  # Get beat analysis and templates
216
  lyric_templates = music_analysis.get("lyric_templates", [])
217
 
218
+ # Define num_phrases here to ensure it's available in all code paths
219
+ num_phrases = len(lyric_templates) if lyric_templates else 4
220
+
221
  # Verify LLM is loaded
222
  if llm_model is None or llm_tokenizer is None:
223
  return "Error: LLM model not properly loaded"