harp-dev commited on
Commit
9cd9496
·
verified ·
1 Parent(s): aa97841

Drop the placeholder label output

Browse files

Every result carried a label reading 'short label' with the description 'longer description', left from a template. VampNet has nothing to label, so the output is gone.

Files changed (2) hide show
  1. README.md +0 -1
  2. app.py +1 -5
README.md CHANGED
@@ -15,7 +15,6 @@ tags:
15
  - subcategory:infilling
16
  - input:audio
17
  - output:audio
18
- - output:labels
19
  - sample-rate:44100
20
  - channels:mono
21
  - sound-effects
 
15
  - subcategory:infilling
16
  - input:audio
17
  - output:audio
 
18
  - sample-rate:44100
19
  - channels:mono
20
  - sound-effects
app.py CHANGED
@@ -29,7 +29,6 @@ import shutil
29
  import torch
30
  from datetime import datetime
31
  from pyharp.core import build_endpoint, ModelCard
32
- from pyharp.labels import OutputLabel, LabelList
33
  from pyharp.media.audio import save_audio
34
  from pyharp.tags import Subcategory, SampleRate, Channels
35
 
@@ -360,9 +359,7 @@ def harp_vamp(input_audio, sampletemp, periodic_p, dropout, n_mask_codebooks, mo
360
  if original_channels > 1 and sig.num_channels == 1:
361
  sig.audio_data = sig.audio_data.repeat(1, original_channels, 1)
362
 
363
- ll = LabelList()
364
- ll.append(OutputLabel(label='short label', t=0.0, description='longer description'))
365
- return save_audio(sig), ll
366
 
367
 
368
  if __name__ == "__main__":
@@ -410,7 +407,6 @@ if __name__ == "__main__":
410
  gr.Audio(type="filepath", label="Generated Audio").set_info((
411
  "The reworked audio, at the same sample rate as the input."
412
  )),
413
- gr.JSON(label="Generated Labels"),
414
  ]
415
 
416
  build_endpoint(
 
29
  import torch
30
  from datetime import datetime
31
  from pyharp.core import build_endpoint, ModelCard
 
32
  from pyharp.media.audio import save_audio
33
  from pyharp.tags import Subcategory, SampleRate, Channels
34
 
 
359
  if original_channels > 1 and sig.num_channels == 1:
360
  sig.audio_data = sig.audio_data.repeat(1, original_channels, 1)
361
 
362
+ return save_audio(sig)
 
 
363
 
364
 
365
  if __name__ == "__main__":
 
407
  gr.Audio(type="filepath", label="Generated Audio").set_info((
408
  "The reworked audio, at the same sample rate as the input."
409
  )),
 
410
  ]
411
 
412
  build_endpoint(