Spaces:
Running
Running
Bring the Space up to the pyharp example standard (taxonomy tags, __main__ guard, show_error, v0.4.0)
Browse files- README.md +1 -1
- app.py +35 -34
- requirements.txt +2 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: ✂️
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: isc
|
|
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.24.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: isc
|
app.py
CHANGED
|
@@ -20,7 +20,7 @@ model_card = ModelCard(
|
|
| 20 |
"Output: A single remixed audio file with adjustable harmonic & percussive balance, based on the selected parameters."
|
| 21 |
),
|
| 22 |
author="Hugo Flores Garcia",
|
| 23 |
-
tags=[
|
| 24 |
)
|
| 25 |
|
| 26 |
|
|
@@ -111,36 +111,37 @@ output_labels = gr.JSON(label="Labels")
|
|
| 111 |
|
| 112 |
|
| 113 |
# Launch the App
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
demo.
|
|
|
|
|
|
| 20 |
"Output: A single remixed audio file with adjustable harmonic & percussive balance, based on the selected parameters."
|
| 21 |
),
|
| 22 |
author="Hugo Flores Garcia",
|
| 23 |
+
tags=[Subcategory.STEM_SEPARATION, 'example', 'separator', 'hpss']
|
| 24 |
)
|
| 25 |
|
| 26 |
|
|
|
|
| 111 |
|
| 112 |
|
| 113 |
# Launch the App
|
| 114 |
+
if __name__ == "__main__":
|
| 115 |
+
with gr.Blocks() as demo:
|
| 116 |
+
# Build endpoint inside Blocks context
|
| 117 |
+
endpoint = build_endpoint(
|
| 118 |
+
model_card=model_card,
|
| 119 |
+
input_components=[
|
| 120 |
+
input_audio,
|
| 121 |
+
harmonic_slider,
|
| 122 |
+
percussive_slider,
|
| 123 |
+
kernel_slider,
|
| 124 |
+
margin_slider
|
| 125 |
+
],
|
| 126 |
+
output_components=[
|
| 127 |
+
output_audio,
|
| 128 |
+
output_labels
|
| 129 |
+
],
|
| 130 |
+
process_fn=process_fn
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
# Layout
|
| 134 |
+
endpoint["controls_button"]
|
| 135 |
+
endpoint["controls_data"]
|
| 136 |
+
input_audio.render()
|
| 137 |
+
harmonic_slider.render()
|
| 138 |
+
percussive_slider.render()
|
| 139 |
+
kernel_slider.render()
|
| 140 |
+
margin_slider.render()
|
| 141 |
+
output_audio.render()
|
| 142 |
+
output_labels.render()
|
| 143 |
+
endpoint["process_button"]
|
| 144 |
+
endpoint["cancel_button"]
|
| 145 |
+
|
| 146 |
+
demo.queue()
|
| 147 |
+
demo.launch(pwa=True, share=True, show_error=True)
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# PyHARP from correct branch
|
| 2 |
-
git+https://github.com/
|
| 3 |
|
| 4 |
# Descript audiotools
|
| 5 |
git+https://github.com/descriptinc/audiotools.git
|
|
@@ -7,3 +7,4 @@ git+https://github.com/descriptinc/audiotools.git
|
|
| 7 |
torch
|
| 8 |
torchaudio
|
| 9 |
librosa
|
|
|
|
|
|
| 1 |
# PyHARP from correct branch
|
| 2 |
+
git+https://github.com/TEAMuP-dev/pyharp.git@v0.4.0
|
| 3 |
|
| 4 |
# Descript audiotools
|
| 5 |
git+https://github.com/descriptinc/audiotools.git
|
|
|
|
| 7 |
torch
|
| 8 |
torchaudio
|
| 9 |
librosa
|
| 10 |
+
spaces>=0.51.1
|