reach-vb HF staff commited on
Commit
4b50ebb
·
1 Parent(s): 3918537

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ COLORS = [
22
  def predict(audio_file_pth):
23
 
24
  with torch.inference_mode():
25
- output = pipe(processor(audio_file_pth.name)[:2])
26
  audio = output.audios[0]
27
 
28
  return gr.make_waveform((16000, audio.ravel()), bars_color=random.choice(COLORS), bar_count=75)
@@ -45,7 +45,7 @@ gr.Interface(
45
  gr.File(label="Upload MIDI", file_count="single", file_types=[".mid"]),
46
  ],
47
  outputs=[
48
- gr.Video(label="Synthesised Audio"),
49
  ],
50
  title=title,
51
  description=description,
 
22
  def predict(audio_file_pth):
23
 
24
  with torch.inference_mode():
25
+ output = pipe(processor(audio_file_pth.name)[:5])
26
  audio = output.audios[0]
27
 
28
  return gr.make_waveform((16000, audio.ravel()), bars_color=random.choice(COLORS), bar_count=75)
 
45
  gr.File(label="Upload MIDI", file_count="single", file_types=[".mid"]),
46
  ],
47
  outputs=[
48
+ gr.Video(label="Synthesised Music"),
49
  ],
50
  title=title,
51
  description=description,