KingNish commited on
Commit
9b33e59
·
verified ·
1 Parent(s): 762721e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -119,7 +119,7 @@ def generate_music(
119
  ):
120
  if use_audio_prompt and not audio_prompt_path:
121
  raise FileNotFoundError("Please provide an audio prompt filepath when 'use_audio_prompt' is enabled!")
122
- max_new_tokens = max_new_tokens * 100 # scaling factor
123
 
124
  with tempfile.TemporaryDirectory() as output_dir:
125
  stage1_output_dir = os.path.join(output_dir, "stage1")
@@ -326,7 +326,7 @@ def generate_music(
326
  return None, None, None
327
 
328
  # ------------------ Inference function and Gradio UI ------------------ #
329
- def infer(genre_txt_content, lyrics_txt_content, num_segments=3, max_new_tokens=5):
330
  try:
331
  mixed_audio_data, vocal_audio_data, instrumental_audio_data = generate_music(
332
  genre_txt=genre_txt_content,
 
119
  ):
120
  if use_audio_prompt and not audio_prompt_path:
121
  raise FileNotFoundError("Please provide an audio prompt filepath when 'use_audio_prompt' is enabled!")
122
+ max_new_tokens = max_new_tokens * 50 # scaling factor
123
 
124
  with tempfile.TemporaryDirectory() as output_dir:
125
  stage1_output_dir = os.path.join(output_dir, "stage1")
 
326
  return None, None, None
327
 
328
  # ------------------ Inference function and Gradio UI ------------------ #
329
+ def infer(genre_txt_content, lyrics_txt_content, num_segments=2, max_new_tokens=5):
330
  try:
331
  mixed_audio_data, vocal_audio_data, instrumental_audio_data = generate_music(
332
  genre_txt=genre_txt_content,