OpenSound commited on
Commit
4e581e9
·
verified ·
1 Parent(s): 9c44596

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
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
- gt_file_input = gr.Audio(label="Upload Audio to Edit", type="filepath", value="edit_example.wav")
267
-
268
- # Text prompt for editing
269
- text_edit_input = gr.Textbox(
270
- label="Edit Prompt",
271
- show_label=True,
272
- max_lines=2,
273
- placeholder="Describe the edit you wat",
274
- container=True,
275
- value="a dog barking in the background",
276
- scale=4
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