qichenhuang commited on
Commit
d7a040f
1 Parent(s): bae1a10

change file path

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -20,10 +20,7 @@ def generate_music(text):
20
  scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy())
21
  file_path= "musicgen_out.wav"
22
  try:
23
- with wave.open(file_path, 'rb') as wav_file:
24
- # Read all frames
25
- frames = wav_file.readframes(wav_file.getnframes())
26
- return frames
27
  except Exception as e:
28
  return str(e)
29
 
 
20
  scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy())
21
  file_path= "musicgen_out.wav"
22
  try:
23
+ return file_path
 
 
 
24
  except Exception as e:
25
  return str(e)
26