Spaces:
Runtime error
Runtime error
juancopi81
commited on
Commit
•
8a00b4b
1
Parent(s):
8a2ae69
Change width duration to 15
Browse files
app.py
CHANGED
@@ -39,7 +39,12 @@ def get_bg_image(prompt):
|
|
39 |
return "img.png"
|
40 |
|
41 |
def get_music(prompt):
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
print(spec)
|
44 |
wav = wav_bytes_from_spectrogram_image(spec)
|
45 |
with open("output.wav", "wb") as f:
|
|
|
39 |
return "img.png"
|
40 |
|
41 |
def get_music(prompt):
|
42 |
+
duration = 15
|
43 |
+
if duration == 5:
|
44 |
+
width_duration=512
|
45 |
+
else :
|
46 |
+
width_duration = 512 + ((int(duration)-5) * 128)
|
47 |
+
spec = pipe2(prompt, height=512, width=width_duration).images[0]
|
48 |
print(spec)
|
49 |
wav = wav_bytes_from_spectrogram_image(spec)
|
50 |
with open("output.wav", "wb") as f:
|