Spaces:
Running on Zero
Running on Zero
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 +36 -35
- requirements.txt +2 -2
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🎼
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.24.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -124,7 +124,7 @@ model_card = ModelCard(
|
|
| 124 |
name="Ace Step",
|
| 125 |
description="TODO: describe this model.",
|
| 126 |
author="ACE-Step",
|
| 127 |
-
tags=[],
|
| 128 |
)
|
| 129 |
|
| 130 |
|
|
@@ -176,37 +176,38 @@ def process_fn(audio_duration, prompt, lyrics, infer_step, guidance_scale, omega
|
|
| 176 |
return _out_text2music_generated_audio_1
|
| 177 |
|
| 178 |
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
|
|
|
|
|
| 124 |
name="Ace Step",
|
| 125 |
description="TODO: describe this model.",
|
| 126 |
author="ACE-Step",
|
| 127 |
+
tags=[Subcategory.HOLISTIC],
|
| 128 |
)
|
| 129 |
|
| 130 |
|
|
|
|
| 176 |
return _out_text2music_generated_audio_1
|
| 177 |
|
| 178 |
|
| 179 |
+
if __name__ == "__main__":
|
| 180 |
+
with gr.Blocks() as demo:
|
| 181 |
+
input_components = [
|
| 182 |
+
gr.Slider(minimum=-1, maximum=240.0, step=1e-05, value=-1, label="Audio Duration"),
|
| 183 |
+
gr.Textbox(label="Tags", value="funk, pop, soul, rock, melodic, guitar, drums, bass, keyboard, percussion, 105 BPM, energetic, upbeat, groovy, vibrant, dynamic"),
|
| 184 |
+
gr.Textbox(label="Lyrics", value="[verse]\nNeon lights they flicker bright\nCity hums in dead of night\nRhythms pulse through concrete veins\nLost in echoes of refrains\n\n[verse]\nBassline groovin' in my chest\nHeartbeats match the city's zest\nElectric whispers fill the air\nSynthesized dreams everywhere\n\n[chorus]\nTurn it up and let it flow\nFeel the fire let it grow\nIn this rhythm we belong\nHear the night sing out our song\n\n[verse]\nGuitar strings they start to weep\nWake the soul from silent sleep\nEvery note a story told\nIn this night we\u2019re bold and gold\n\n[bridge]\nVoices blend in harmony\nLost in pure cacophony\nTimeless echoes timeless cries\nSoulful shouts beneath the skies\n\n[verse]\nKeyboard dances on the keys\nMelodies on evening breeze\nCatch the tune and hold it tight\nIn this moment we take flight\n"),
|
| 185 |
+
gr.Slider(minimum=1, maximum=200, step=1, value=60, label="Infer Steps"),
|
| 186 |
+
gr.Slider(minimum=0.0, maximum=30.0, step=0.1, value=15.0, label="Guidance Scale"),
|
| 187 |
+
gr.Slider(minimum=-100.0, maximum=100.0, step=0.1, value=10.0, label="Granularity Scale"),
|
| 188 |
+
gr.Textbox(label="manual seeds (default None)"),
|
| 189 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Guidance Interval"),
|
| 190 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.0, label="Guidance Interval Decay"),
|
| 191 |
+
gr.Slider(minimum=0.0, maximum=200.0, step=0.1, value=3.0, label="Min Guidance Scale"),
|
| 192 |
+
gr.Checkbox(value=True, label="use ERG for tag"),
|
| 193 |
+
gr.Checkbox(value=False, label="use ERG for lyric"),
|
| 194 |
+
gr.Checkbox(value=True, label="use ERG for diffusion"),
|
| 195 |
+
gr.Textbox(label="OSS Steps"),
|
| 196 |
+
gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Text"),
|
| 197 |
+
gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Lyric"),
|
| 198 |
+
gr.Checkbox(value=False, label="Enable Audio2Audio"),
|
| 199 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Refer audio strength"),
|
| 200 |
+
gr.Audio(type="filepath", label="Reference Audio (for Audio2Audio)"),
|
| 201 |
+
gr.Dropdown(choices=["ACE-Step/ACE-Step-v1-chinese-rap-LoRA", "none"], value="none", label="Lora Name or Path"),
|
| 202 |
+
]
|
| 203 |
+
output_components = [
|
| 204 |
+
gr.Audio(type="filepath", label="Text2Music Generated Audio 1"),
|
| 205 |
+
]
|
| 206 |
+
build_endpoint(
|
| 207 |
+
model_card=model_card,
|
| 208 |
+
input_components=input_components,
|
| 209 |
+
output_components=output_components,
|
| 210 |
+
process_fn=process_fn,
|
| 211 |
+
)
|
| 212 |
+
|
| 213 |
+
demo.queue().launch(share=True, show_error=True, pwa=True)
|
requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
git+https://github.com/TEAMuP-dev/pyharp.git@v0.
|
| 2 |
-
gradio>=4.0
|
| 3 |
gradio_client
|
|
|
|
|
|
| 1 |
+
git+https://github.com/TEAMuP-dev/pyharp.git@v0.4.0
|
|
|
|
| 2 |
gradio_client
|
| 3 |
+
spaces>=0.51.1
|