Spaces:
Runtime error
Runtime error
Commit
Β·
73ff61b
1
Parent(s):
7027ad9
Update app.py (#9)
Browse files- Update app.py (04850d2fd81da8bcc056d14ab98908b27513582c)
Co-authored-by: oat <[email protected]>
app.py
CHANGED
@@ -35,7 +35,8 @@ def classic(prompt, negative_prompt, duration):
|
|
35 |
# spec = pipe(prompt, negative_prompt=negative_prompt, height=512, width=512).images[0]
|
36 |
spec = pipe2(prompt=prompt, negative_prompt=negative_prompt, image=im, strength=0.5, guidance_scale=7).images
|
37 |
print(spec)
|
38 |
-
wav = wav_bytes_from_spectrogram_image(spec)
|
|
|
39 |
with open("output.wav", "wb") as f:
|
40 |
f.write(wav[0].getbuffer())
|
41 |
return spec, 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
|
|
35 |
# spec = pipe(prompt, negative_prompt=negative_prompt, height=512, width=512).images[0]
|
36 |
spec = pipe2(prompt=prompt, negative_prompt=negative_prompt, image=im, strength=0.5, guidance_scale=7).images
|
37 |
print(spec)
|
38 |
+
# wav = wav_bytes_from_spectrogram_image(spec)
|
39 |
+
wav = wav_bytes_from_spectrogram_image(spec[0])
|
40 |
with open("output.wav", "wb") as f:
|
41 |
f.write(wav[0].getbuffer())
|
42 |
return spec, 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|