Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -262,29 +262,30 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 262 |
|
| 263 |
with gr.Tab("Audio Editing and Inpainting"):
|
| 264 |
# Input: Upload audio file
|
|
|
|
|
|
|
|
|
|
| 265 |
with gr.Row():
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
# Mask settings
|
| 280 |
mask_start = gr.Number(label="Edit Start (seconds)", value=2.0)
|
| 281 |
mask_length = gr.Slider(minimum=0.5, maximum=10, step=0.5, value=3, label="Edit Length (seconds)")
|
| 282 |
|
| 283 |
-
edit_explanation = gr.Markdown(value="**Edit Start**: The time when the edit begins. \n\n**Edit Length**: The duration of the segment to be edited. \n\n**Outpainting**: If the edit extends beyond the audio's length, Outpainting Mode will automatically activate.")
|
| 284 |
-
|
| 285 |
-
# Run button for editing
|
| 286 |
-
edit_button = gr.Button("Generate", scale=1)
|
| 287 |
-
|
| 288 |
# Output Component for edited audio
|
| 289 |
edited_result = gr.Audio(label="Edited Audio", type="numpy")
|
| 290 |
|
|
|
|
| 262 |
|
| 263 |
with gr.Tab("Audio Editing and Inpainting"):
|
| 264 |
# Input: Upload audio file
|
| 265 |
+
|
| 266 |
+
gt_file_input = gr.Audio(label="Upload Audio to Edit", type="filepath", value="edit_example.wav")
|
| 267 |
+
|
| 268 |
with gr.Row():
|
| 269 |
+
# Text prompt for editing
|
| 270 |
+
text_edit_input = gr.Textbox(
|
| 271 |
+
label="Edit Prompt",
|
| 272 |
+
show_label=True,
|
| 273 |
+
max_lines=2,
|
| 274 |
+
placeholder="Describe the edit you wat",
|
| 275 |
+
container=True,
|
| 276 |
+
value="a dog barking in the background",
|
| 277 |
+
scale=4
|
| 278 |
+
)
|
| 279 |
+
|
| 280 |
+
# Run button for editing
|
| 281 |
+
edit_button = gr.Button("Generate", scale=1)
|
| 282 |
+
|
| 283 |
+
edit_explanation = gr.Markdown(value="**Edit Start**: The time when the edit begins. \n\n**Edit Length**: The duration of the segment to be edited. \n\n**Outpainting**: If the edit extends beyond the audio's length, Outpainting Mode will automatically activate.")
|
| 284 |
|
| 285 |
# Mask settings
|
| 286 |
mask_start = gr.Number(label="Edit Start (seconds)", value=2.0)
|
| 287 |
mask_length = gr.Slider(minimum=0.5, maximum=10, step=0.5, value=3, label="Edit Length (seconds)")
|
| 288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
# Output Component for edited audio
|
| 290 |
edited_result = gr.Audio(label="Edited Audio", type="numpy")
|
| 291 |
|