fffiloni commited on
Commit
9150f85
1 Parent(s): 3e14ea2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,8 +36,8 @@ def classic(prompt, negative_prompt, duration):
36
 
37
  def style_transfer(prompt, negative_prompt, audio_input):
38
  spec = spectro_from_wav(audio_input)
39
- new_spectro = pipe2(prompt=prompt, image=spec, strength=0.5, guidance_scale=7).images[0]
40
- wav = wav_bytes_from_spectrogram_image(spec)
41
  with open("output.wav", "wb") as f:
42
  f.write(wav[0].getbuffer())
43
  return new_spectro, 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
 
36
 
37
  def style_transfer(prompt, negative_prompt, audio_input):
38
  spec = spectro_from_wav(audio_input)
39
+ new_spectro = pipe2(prompt=prompt, image=spec, strength=0.5, guidance_scale=7).images
40
+ wav = wav_bytes_from_spectrogram_image(new_spectro[0])
41
  with open("output.wav", "wb") as f:
42
  f.write(wav[0].getbuffer())
43
  return new_spectro, 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)