Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
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:
|