multimodalart HF staff commited on
Commit
3ff5a86
·
1 Parent(s): 929d1f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -14,12 +14,6 @@ device = "cuda"
14
 
15
  spectro_from_wav = gr.Interface.load("spaces/fffiloni/audio-to-spectrogram")
16
 
17
- def predict(prompt, negative_prompt, audio_input, duration):
18
- if audio_input == None :
19
- return classic(prompt, negative_prompt, duration)
20
- else :
21
- return style_transfer(prompt, negative_prompt, audio_input)
22
-
23
  def classic(model_input, prompt, negative_prompt, duration):
24
  pipe = StableDiffusionPipeline.from_pretrained(model_input, torch_dtype=torch.float16)
25
  pipe = pipe.to(device)
@@ -196,7 +190,7 @@ with gr.Blocks(css=css) as demo:
196
 
197
  gr.HTML(article)
198
 
199
- send_btn.click(predict, inputs=[model_input, prompt_input, negative_prompt, audio_input, duration_input], outputs=[spectrogram_output, sound_output, share_button, community_icon, loading_icon])
200
  share_button.click(None, [], [], _js=share_js)
201
 
202
  demo.queue(max_size=250).launch(debug=True)
 
14
 
15
  spectro_from_wav = gr.Interface.load("spaces/fffiloni/audio-to-spectrogram")
16
 
 
 
 
 
 
 
17
  def classic(model_input, prompt, negative_prompt, duration):
18
  pipe = StableDiffusionPipeline.from_pretrained(model_input, torch_dtype=torch.float16)
19
  pipe = pipe.to(device)
 
190
 
191
  gr.HTML(article)
192
 
193
+ send_btn.click(classic, inputs=[model_input, prompt_input, negative_prompt, audio_input, duration_input], outputs=[spectrogram_output, sound_output, share_button, community_icon, loading_icon])
194
  share_button.click(None, [], [], _js=share_js)
195
 
196
  demo.queue(max_size=250).launch(debug=True)