Hjgugugjhuhjggg commited on
Commit
6cc672e
·
verified ·
1 Parent(s): d36caa6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def generate_music(text_prompt, audio_file=None, audio_mic=None, tts_text=None):
18
  min_duration_sec = 30
19
  max_new_tokens = int(max_duration_sec * model_musicgen.config.min_length)
20
  min_new_tokens = int(min_duration_sec * model_musicgen.config.min_length)
21
- audio_values = model_musicgen.generate(**inputs.to("cpu"), max_new_tokens="1024", min_new_tokens=min_new_tokens)
22
  music = audio_values.cpu().numpy()[0]
23
 
24
  audio_prompt = audio_file or audio_mic
 
18
  min_duration_sec = 30
19
  max_new_tokens = int(max_duration_sec * model_musicgen.config.min_length)
20
  min_new_tokens = int(min_duration_sec * model_musicgen.config.min_length)
21
+ audio_values = model_musicgen.generate(**inputs.to("cpu"))
22
  music = audio_values.cpu().numpy()[0]
23
 
24
  audio_prompt = audio_file or audio_mic