Update app.py
Browse files
app.py
CHANGED
|
@@ -15,11 +15,11 @@ def generate_music(description):
|
|
| 15 |
# Generate music based on the provided description
|
| 16 |
wav = model.generate([description])
|
| 17 |
|
| 18 |
-
# Save the generated audio as "output.wav" with loudness normalization at -14 dB LUFS.
|
| 19 |
-
audio_write("output.wav", wav[0].cpu(), model.sample_rate, strategy="loudness")
|
| 20 |
|
| 21 |
-
# Return the
|
| 22 |
-
return
|
| 23 |
|
| 24 |
# Define a Gradio interface
|
| 25 |
iface = gr.Interface(
|
|
|
|
| 15 |
# Generate music based on the provided description
|
| 16 |
wav = model.generate([description])
|
| 17 |
|
| 18 |
+
# # Save the generated audio as "output.wav" with loudness normalization at -14 dB LUFS.
|
| 19 |
+
# audio_write("output.wav", wav[0].cpu(), model.sample_rate, strategy="loudness")
|
| 20 |
|
| 21 |
+
# Return the generated audio for playback
|
| 22 |
+
return wav[0].cpu().numpy()
|
| 23 |
|
| 24 |
# Define a Gradio interface
|
| 25 |
iface = gr.Interface(
|