fffiloni commited on
Commit
f4c6646
โ€ข
1 Parent(s): 9021561

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -178,7 +178,7 @@ def call_api(message, openai_api_key):
178
  print(response)
179
 
180
  #return str(response.choices[0].text).split("\n",2)[2]
181
- return str(response.choices[0].text)
182
 
183
 
184
  def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
@@ -222,7 +222,7 @@ def convert_mp3_to_wav(mp3_filepath):
222
 
223
  wave_file="file.wav"
224
 
225
- sound = mp3_filepath
226
  sound.export(wave_file, format="wav")
227
 
228
  return wave_file
 
178
  print(response)
179
 
180
  #return str(response.choices[0].text).split("\n",2)[2]
181
+ return str(response.choices[0].text).lstrip('\n')
182
 
183
 
184
  def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
 
222
 
223
  wave_file="file.wav"
224
 
225
+ sound = AudioSegment.from_mp3(mp3_filepath)
226
  sound.export(wave_file, format="wav")
227
 
228
  return wave_file