fffiloni commited on
Commit
fd1f618
·
1 Parent(s): dab5e20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,7 +45,7 @@ def extract_video_frames(video_in):
45
  def input_changes(input_vid):
46
 
47
  if input_vid == None:
48
- return manual_cap.update(value="",placeholder=ph_message), caption_output.update(value=None), video_output.update(value=None)
49
  else:
50
  picked_frames = extract_video_frames(input_vid)
51
  caps = []
@@ -58,7 +58,7 @@ def input_changes(input_vid):
58
  print("CoCa caption: '" + final_cap + "' • ")
59
  ph_update = "CoCa caption: '" + final_cap + "' • "
60
 
61
- return manual_cap.update(value="",placeholder=f"{ph_update}{ph_message}"), caption_output.update(value=final_cap), video_output.update(value=None)
62
 
63
  def infer(video_input, manual_caption, duration_in, seed, caption_output):
64
 
@@ -182,7 +182,7 @@ with gr.Blocks(css="style.css") as demo:
182
 
183
  gr.HTML(article)
184
 
185
- change_out = [manual_cap, caption_output, video_output]
186
  input_vid.change(input_changes, input_vid, change_out, queue=False)
187
 
188
 
 
45
  def input_changes(input_vid):
46
 
47
  if input_vid == None:
48
+ return manual_cap.update(value="",placeholder=ph_message), caption_output.update(value=None), video_output.update(value=None), sound_output.update(value=None)
49
  else:
50
  picked_frames = extract_video_frames(input_vid)
51
  caps = []
 
58
  print("CoCa caption: '" + final_cap + "' • ")
59
  ph_update = "CoCa caption: '" + final_cap + "' • "
60
 
61
+ return manual_cap.update(value="",placeholder=f"{ph_update}{ph_message}"), caption_output.update(value=final_cap), video_output.update(value=None), sound_output.update(value=None)
62
 
63
  def infer(video_input, manual_caption, duration_in, seed, caption_output):
64
 
 
182
 
183
  gr.HTML(article)
184
 
185
+ change_out = [manual_cap, caption_output, video_output, sound_output]
186
  input_vid.change(input_changes, input_vid, change_out, queue=False)
187
 
188