Spaces:
Build error
Build error
j
commited on
Commit
·
8aed020
1
Parent(s):
516059f
added missing parameters
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: AudioLDM Style Transfer HARP plugin
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
python_version: 3.8
|
|
|
|
| 1 |
---
|
| 2 |
title: AudioLDM Style Transfer HARP plugin
|
| 3 |
+
emoji: 📠
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
python_version: 3.8
|
app.py
CHANGED
|
@@ -58,6 +58,10 @@ with gr.Blocks() as webapp:
|
|
| 58 |
label="Audio Input",
|
| 59 |
type="filepath"
|
| 60 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
gr.Slider(
|
| 62 |
label="seed",
|
| 63 |
minimum="0",
|
|
@@ -85,6 +89,11 @@ with gr.Blocks() as webapp:
|
|
| 85 |
step=2.5, value=5,
|
| 86 |
label="Duration"
|
| 87 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
]
|
| 89 |
|
| 90 |
output = gr.Audio(label="Audio Output", type="filepath")
|
|
@@ -93,22 +102,4 @@ with gr.Blocks() as webapp:
|
|
| 93 |
|
| 94 |
# queue the webapp: https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
| 95 |
#webapp.queue()
|
| 96 |
-
webapp.launch(share=True)
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
for audio_file in input_files:
|
| 101 |
-
waveform = style_transfer(
|
| 102 |
-
audioldm,
|
| 103 |
-
PROMPT,
|
| 104 |
-
audio_file,
|
| 105 |
-
TRANSFER_STRENGTH,
|
| 106 |
-
SEED,
|
| 107 |
-
duration = DURATION,
|
| 108 |
-
guidance_scale = GUIDANCE_SCALE,
|
| 109 |
-
ddim_steps = STEPS,
|
| 110 |
-
batchsize = N_VARIATIONS,
|
| 111 |
-
config=None,
|
| 112 |
-
)
|
| 113 |
-
waveform = waveform[:,None,:]
|
| 114 |
-
save_wave(waveform, OUTPUT_DIRECTORY, name=f"{os.path.basename(audio_file)}_STYLE_{PROMPT}")
|
|
|
|
| 58 |
label="Audio Input",
|
| 59 |
type="filepath"
|
| 60 |
),
|
| 61 |
+
gr.Text(
|
| 62 |
+
label="Prompt",
|
| 63 |
+
interactive=True
|
| 64 |
+
),
|
| 65 |
gr.Slider(
|
| 66 |
label="seed",
|
| 67 |
minimum="0",
|
|
|
|
| 89 |
step=2.5, value=5,
|
| 90 |
label="Duration"
|
| 91 |
),
|
| 92 |
+
gr.Slider(
|
| 93 |
+
minimum=0, maximum=1.0,
|
| 94 |
+
value=0.5,
|
| 95 |
+
label="Transfer Strength"
|
| 96 |
+
),
|
| 97 |
]
|
| 98 |
|
| 99 |
output = gr.Audio(label="Audio Output", type="filepath")
|
|
|
|
| 102 |
|
| 103 |
# queue the webapp: https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
| 104 |
#webapp.queue()
|
| 105 |
+
webapp.launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|