xscdvfaaqqq commited on
Commit
a64fad6
·
verified ·
1 Parent(s): 01f9249

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def infer_music(lrc, ref_audio_path, text_prompt, current_prompt_type, seed=42,
43
  vocal_flag = False
44
  try:
45
  lrc_prompt, start_time, end_frame, song_duration = get_lrc_token(max_frames, lrc, tokenizer, Music_Duration, device)
46
- if current_prompt_type == 'audio':
47
  style_prompt, vocal_flag = get_audio_style_prompt(muq, ref_audio_path)
48
  else:
49
  style_prompt = get_text_style_prompt(muq, text_prompt)
 
43
  vocal_flag = False
44
  try:
45
  lrc_prompt, start_time, end_frame, song_duration = get_lrc_token(max_frames, lrc, tokenizer, Music_Duration, device)
46
+ if ref_audio_path is not None:
47
  style_prompt, vocal_flag = get_audio_style_prompt(muq, ref_audio_path)
48
  else:
49
  style_prompt = get_text_style_prompt(muq, text_prompt)