harp-dev commited on
Commit
0fd0c69
·
verified ·
1 Parent(s): 4977385

Bring the Space up to the pyharp example standard (taxonomy tags, __main__ guard, show_error, v0.4.0)

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +28 -34
  3. requirements.txt +3 -3
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🎛️
4
  colorFrom: gray
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 5.28.0
8
  python_version: '3.12'
9
  app_file: app.py
10
  pinned: false
 
4
  colorFrom: gray
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 6.24.0
8
  python_version: '3.12'
9
  app_file: app.py
10
  pinned: false
app.py CHANGED
@@ -21,7 +21,7 @@ except ImportError:
21
  return self.func(*args, **kwargs)
22
  return args[0]
23
 
24
- from pyharp import ModelCard, build_endpoint
25
 
26
  from deepafx_st_runtime import style_transfer
27
 
@@ -36,13 +36,7 @@ model_card = ModelCard(
36
  "of a reference recording onto your audio."
37
  ),
38
  author="Adobe Research",
39
- tags=[
40
- "audio-effects",
41
- "style-transfer",
42
- "mixing",
43
- "mastering",
44
- "production",
45
- ],
46
  )
47
 
48
 
@@ -97,31 +91,31 @@ def process_fn(
97
  return str(audio_path), str(params_path)
98
 
99
 
100
- with gr.Blocks(title="DeepAFx-ST") as demo:
101
- input_components = [
102
- gr.Audio(type="filepath", label="Input Audio")
103
- .harp_required(True)
104
- .set_info("Audio to process, 1 to 30 seconds."),
105
- gr.Audio(type="filepath", label="Reference Audio")
106
- .harp_required(True)
107
- .set_info("Target style — your input will be EQ'd and compressed to match this recording."),
108
- ]
109
- output_components = [
110
- gr.Audio(type="filepath", label="Styled Output")
111
- .set_info("Processed audio with the reference's production style."),
112
- gr.File(
113
- type="filepath",
114
- file_types=[".json"],
115
- label="DSP Parameters",
116
- ).set_info("Predicted EQ and compressor parameters."),
117
- ]
118
- build_endpoint(
119
- model_card=model_card,
120
- input_components=input_components,
121
- output_components=output_components,
122
- process_fn=process_fn,
123
- )
 
124
 
125
 
126
- if __name__ == "__main__":
127
- demo.queue(default_concurrency_limit=1).launch(show_error=True, pwa=True)
 
21
  return self.func(*args, **kwargs)
22
  return args[0]
23
 
24
+ from pyharp import ModelCard, build_endpoint, Subcategory
25
 
26
  from deepafx_st_runtime import style_transfer
27
 
 
36
  "of a reference recording onto your audio."
37
  ),
38
  author="Adobe Research",
39
+ tags=[Subcategory.MIXING_STYLE_TRANSFER, 'audio-effects', 'style-transfer', 'mixing', 'mastering', 'production'],
 
 
 
 
 
 
40
  )
41
 
42
 
 
91
  return str(audio_path), str(params_path)
92
 
93
 
94
+ if __name__ == "__main__":
95
+ with gr.Blocks(title="DeepAFx-ST") as demo:
96
+ input_components = [
97
+ gr.Audio(type="filepath", label="Input Audio")
98
+ .harp_required(True)
99
+ .set_info("Audio to process, 1 to 30 seconds."),
100
+ gr.Audio(type="filepath", label="Reference Audio")
101
+ .harp_required(True)
102
+ .set_info("Target style — your input will be EQ'd and compressed to match this recording."),
103
+ ]
104
+ output_components = [
105
+ gr.Audio(type="filepath", label="Styled Output")
106
+ .set_info("Processed audio with the reference's production style."),
107
+ gr.File(
108
+ type="filepath",
109
+ file_types=[".json"],
110
+ label="DSP Parameters",
111
+ ).set_info("Predicted EQ and compressor parameters."),
112
+ ]
113
+ build_endpoint(
114
+ model_card=model_card,
115
+ input_components=input_components,
116
+ output_components=output_components,
117
+ process_fn=process_fn,
118
+ )
119
 
120
 
121
+ demo.queue(default_concurrency_limit=1).launch(share=True, show_error=True, pwa=True)
 
requirements.txt CHANGED
@@ -1,4 +1,3 @@
1
- gradio==5.28.0
2
  torch==2.8.0
3
  torchaudio==2.8.0
4
  lightning==2.6.1
@@ -6,7 +5,8 @@ auraloss>=0.2.1
6
  julius>=0.2.6
7
  pyloudnorm>=0.1.0
8
  soundfile>=0.12.1,<1
9
- huggingface-hub>=0.33,<1
10
  numpy==1.26.4
11
  scipy>=1.10,<1.18
12
- git+https://github.com/TEAMuP-dev/pyharp.git@d65c4f7
 
 
 
1
  torch==2.8.0
2
  torchaudio==2.8.0
3
  lightning==2.6.1
 
5
  julius>=0.2.6
6
  pyloudnorm>=0.1.0
7
  soundfile>=0.12.1,<1
8
+ huggingface-hub
9
  numpy==1.26.4
10
  scipy>=1.10,<1.18
11
+ git+https://github.com/TEAMuP-dev/pyharp.git@v0.4.0
12
+ spaces>=0.51.1