fffiloni commited on
Commit
9c213e1
1 Parent(s): 01664f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def classic(prompt, negative_prompt, duration):
35
  wav = wav_bytes_from_spectrogram_image(spec)
36
  with open("output.wav", "wb") as f:
37
  f.write(wav[0].getbuffer())
38
- return spec, 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
39
 
40
  def style_transfer(prompt, negative_prompt, audio_input):
41
  spec = spectro_from_wav(audio_input)
@@ -52,7 +52,7 @@ def style_transfer(prompt, negative_prompt, audio_input):
52
  wav = wav_bytes_from_spectrogram_image(new_spectro[0])
53
  with open("output.wav", "wb") as f:
54
  f.write(wav[0].getbuffer())
55
- return new_spectro[0], 'output.wav', gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
56
 
57
  def image_from_spectrogram(
58
  spectrogram: np.ndarray, max_volume: float = 50, power_for_image: float = 0.25
@@ -228,7 +228,7 @@ with gr.Blocks(css="style.css") as demo:
228
 
229
  gr.HTML(article)
230
 
231
- send_btn.click(predict, inputs=[prompt_input, negative_prompt, audio_input, duration_input], outputs=[spectrogram_output, sound_output, share_button, community_icon, loading_icon])
232
  #share_button.click(None, [], [], _js=share_js)
233
 
234
  demo.queue(max_size=250).launch(debug=True)
 
35
  wav = wav_bytes_from_spectrogram_image(spec)
36
  with open("output.wav", "wb") as f:
37
  f.write(wav[0].getbuffer())
38
+ return spec, 'output.wav'
39
 
40
  def style_transfer(prompt, negative_prompt, audio_input):
41
  spec = spectro_from_wav(audio_input)
 
52
  wav = wav_bytes_from_spectrogram_image(new_spectro[0])
53
  with open("output.wav", "wb") as f:
54
  f.write(wav[0].getbuffer())
55
+ return new_spectro[0], 'output.wav'
56
 
57
  def image_from_spectrogram(
58
  spectrogram: np.ndarray, max_volume: float = 50, power_for_image: float = 0.25
 
228
 
229
  gr.HTML(article)
230
 
231
+ send_btn.click(predict, inputs=[prompt_input, negative_prompt, audio_input, duration_input], outputs=[spectrogram_output, sound_output])
232
  #share_button.click(None, [], [], _js=share_js)
233
 
234
  demo.queue(max_size=250).launch(debug=True)