fffiloni commited on
Commit
2766d34
1 Parent(s): cda19ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -12,7 +12,10 @@ def convert_to_mp4_with_aac(input_path, output_path):
12
  return output_path
13
 
14
  def load_audio(audio_listed):
15
- return f"data/audio/{audio_listed}"
 
 
 
16
 
17
  def execute_command(command: str) -> None:
18
  subprocess.run(command, check=True)
@@ -150,7 +153,7 @@ with gr.Blocks(css=css) as demo:
150
  examples_per_page=5
151
  )
152
  with gr.Row():
153
- gr.ClearButton([audio_input, image_path])
154
  run_btn = gr.Button("Run", elem_id="run-btn")
155
  with gr.Column():
156
  output_video = gr.Video(format="mp4")
 
12
  return output_path
13
 
14
  def load_audio(audio_listed):
15
+ if audio_listed is None:
16
+ return None
17
+ else:
18
+ return f"data/audio/{audio_listed}"
19
 
20
  def execute_command(command: str) -> None:
21
  subprocess.run(command, check=True)
 
153
  examples_per_page=5
154
  )
155
  with gr.Row():
156
+ gr.ClearButton([audio_input, image_path, audio_list])
157
  run_btn = gr.Button("Run", elem_id="run-btn")
158
  with gr.Column():
159
  output_video = gr.Video(format="mp4")