Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def predict(prompt, duration):
|
|
15 |
if duration == 5:
|
16 |
width_duration=512
|
17 |
else :
|
18 |
-
width_duration =
|
19 |
spec = pipe(prompt, height=512, width=width_duration).images[0]
|
20 |
print(spec)
|
21 |
wav = wav_bytes_from_spectrogram_image(spec)
|
|
|
15 |
if duration == 5:
|
16 |
width_duration=512
|
17 |
else :
|
18 |
+
width_duration = 512 + ((int(duration)-5) * 128)
|
19 |
spec = pipe(prompt, height=512, width=width_duration).images[0]
|
20 |
print(spec)
|
21 |
wav = wav_bytes_from_spectrogram_image(spec)
|