Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def process_image(image, audio_path="musicgen_out.wav"):
|
|
| 44 |
|
| 45 |
|
| 46 |
# Save the generated music to the specified path
|
| 47 |
-
sampling_rate =
|
| 48 |
scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy())
|
| 49 |
|
| 50 |
# Return the country and the path to the generated music
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
# Save the generated music to the specified path
|
| 47 |
+
sampling_rate = musicgen.config.audio_encoder.sampling_rate
|
| 48 |
scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy())
|
| 49 |
|
| 50 |
# Return the country and the path to the generated music
|