szili2011 commited on
Commit
4710acd
·
verified ·
1 Parent(s): 39e2ba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -52,7 +52,8 @@ def extend_music(file, added_minutes):
52
  # Normalize audio to the range of [-1, 1]
53
  extended_audio = extended_audio / np.max(np.abs(extended_audio)) # Avoid overflow
54
 
55
- return extended_audio.astype(np.float32), sr # Return audio and sample rate
 
56
 
57
  # Gradio UI setup
58
  with gr.Blocks() as app:
 
52
  # Normalize audio to the range of [-1, 1]
53
  extended_audio = extended_audio / np.max(np.abs(extended_audio)) # Avoid overflow
54
 
55
+ # Return the audio as a NumPy array and the sample rate as an integer
56
+ return extended_audio.astype(np.float32), sr
57
 
58
  # Gradio UI setup
59
  with gr.Blocks() as app: