fffiloni commited on
Commit
5ce2521
โ€ข
1 Parent(s): 7401c2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -67,7 +67,8 @@ def get_music(pat, prompt, track_duration, gen_intensity, gen_mode):
67
  "pat": pat,
68
  "mode":gen_mode,
69
  "duration":track_duration,
70
- "intensity": gen_intensity
 
71
  }
72
  })
73
 
@@ -78,7 +79,7 @@ def get_music(pat, prompt, track_duration, gen_intensity, gen_mode):
78
  track = rdata['data']['tasks'][0]['download_link']
79
  print(track)
80
 
81
- local_file_path = "sample.mp3"
82
 
83
  # Download the MP3 file from the URL
84
  headers = {
@@ -97,7 +98,7 @@ def get_music(pat, prompt, track_duration, gen_intensity, gen_mode):
97
  # Save the downloaded content to a local file
98
  with open(local_file_path, 'wb') as f:
99
  f.write(response.content)
100
- return "sample.mp3", track
101
 
102
 
103
  def get_results(text_prompt,track_duration,gen_intensity,gen_mode):
 
67
  "pat": pat,
68
  "mode":gen_mode,
69
  "duration":track_duration,
70
+ "intensity": gen_intensity,
71
+ "format": "wav"
72
  }
73
  })
74
 
 
79
  track = rdata['data']['tasks'][0]['download_link']
80
  print(track)
81
 
82
+ local_file_path = "sample.wav"
83
 
84
  # Download the MP3 file from the URL
85
  headers = {
 
98
  # Save the downloaded content to a local file
99
  with open(local_file_path, 'wb') as f:
100
  f.write(response.content)
101
+ return "sample.wav", track
102
 
103
 
104
  def get_results(text_prompt,track_duration,gen_intensity,gen_mode):