fffiloni commited on
Commit
fef57d1
1 Parent(s): f5369e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -41,8 +41,14 @@ def style_transfer(prompt, negative_prompt, audio_input):
41
  spec = spectro_from_wav(audio_input)
42
  print(spec)
43
  # Open the image
44
- im = image_from_spectrogram(spec)
45
-
 
 
 
 
 
 
46
  new_spectro = pipe2(prompt=prompt, image=im, strength=0.5, guidance_scale=7).images
47
  wav = wav_bytes_from_spectrogram_image(new_spectro[0])
48
  with open("output.wav", "wb") as f:
 
41
  spec = spectro_from_wav(audio_input)
42
  print(spec)
43
  # Open the image
44
+ im = Image.open(spec)
45
+
46
+ # Convert the image to a NumPy array
47
+ im = np.array(im)
48
+ # Open the image
49
+ im = image_from_spectrogram(im)
50
+ # Convert the image to a NumPy array
51
+
52
  new_spectro = pipe2(prompt=prompt, image=im, strength=0.5, guidance_scale=7).images
53
  wav = wav_bytes_from_spectrogram_image(new_spectro[0])
54
  with open("output.wav", "wb") as f: