Spaces:
Paused
Paused
Update app.py
Browse files
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.
|
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.
|
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):
|