update app [check✅]
Browse files
app.py
CHANGED
|
@@ -200,7 +200,7 @@ css = """
|
|
| 200 |
|
| 201 |
with gr.Blocks() as demo:
|
| 202 |
gr.Markdown("# **SAM-Audio-Demo**", elem_id="main-title")
|
| 203 |
-
gr.Markdown("Segment and isolate specific sounds from audio
|
| 204 |
|
| 205 |
with gr.Column(elem_id="col-container"):
|
| 206 |
with gr.Row():
|
|
@@ -208,7 +208,7 @@ with gr.Blocks() as demo:
|
|
| 208 |
input_file = gr.Audio(label="Input Audio", type="filepath")
|
| 209 |
text_prompt = gr.Textbox(label="Sound to Isolate", placeholder="e.g., 'A man speaking', 'Bird chirping'")
|
| 210 |
|
| 211 |
-
with gr.Accordion("Advanced Settings", open=
|
| 212 |
chunk_duration_slider = gr.Slider(
|
| 213 |
minimum=10, maximum=60, value=30, step=5,
|
| 214 |
label="Chunk Duration (seconds)",
|
|
@@ -220,12 +220,13 @@ with gr.Blocks() as demo:
|
|
| 220 |
with gr.Column(scale=1):
|
| 221 |
output_target = gr.Audio(label="Isolated Sound (Target)", type="filepath")
|
| 222 |
output_residual = gr.Audio(label="Background (Residual)", type="filepath")
|
| 223 |
-
status_out = gr.Textbox(label="Status", interactive=False, show_label=True, lines=
|
| 224 |
|
| 225 |
gr.Examples(
|
| 226 |
examples=[
|
| 227 |
-
["example_audio/speech.
|
| 228 |
-
["example_audio/
|
|
|
|
| 229 |
],
|
| 230 |
inputs=[input_file, text_prompt, chunk_duration_slider],
|
| 231 |
label="Audio Examples"
|
|
|
|
| 200 |
|
| 201 |
with gr.Blocks() as demo:
|
| 202 |
gr.Markdown("# **SAM-Audio-Demo**", elem_id="main-title")
|
| 203 |
+
gr.Markdown("Segment and isolate specific sounds from audio files using natural language descriptions, powered by [SAM-Audio-Large](https://huggingface.co/facebook/sam-audio-large).")
|
| 204 |
|
| 205 |
with gr.Column(elem_id="col-container"):
|
| 206 |
with gr.Row():
|
|
|
|
| 208 |
input_file = gr.Audio(label="Input Audio", type="filepath")
|
| 209 |
text_prompt = gr.Textbox(label="Sound to Isolate", placeholder="e.g., 'A man speaking', 'Bird chirping'")
|
| 210 |
|
| 211 |
+
with gr.Accordion("Advanced Settings", open=True):
|
| 212 |
chunk_duration_slider = gr.Slider(
|
| 213 |
minimum=10, maximum=60, value=30, step=5,
|
| 214 |
label="Chunk Duration (seconds)",
|
|
|
|
| 220 |
with gr.Column(scale=1):
|
| 221 |
output_target = gr.Audio(label="Isolated Sound (Target)", type="filepath")
|
| 222 |
output_residual = gr.Audio(label="Background (Residual)", type="filepath")
|
| 223 |
+
status_out = gr.Textbox(label="Status", interactive=False, show_label=True, lines=6)
|
| 224 |
|
| 225 |
gr.Examples(
|
| 226 |
examples=[
|
| 227 |
+
["example_audio/speech.mp3", "Vocal", 30],
|
| 228 |
+
["example_audio/song.mp3", "Drum", 30],
|
| 229 |
+
["example_audio/song2.mp3", "Vocal", 30],
|
| 230 |
],
|
| 231 |
inputs=[input_file, text_prompt, chunk_duration_slider],
|
| 232 |
label="Audio Examples"
|