daarsh commited on
Commit
b86e9a4
1 Parent(s): b1e9146

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -31,8 +31,9 @@ with gr.Blocks() as demo:
31
  label="Min Length", minimum=1, maximum=10, value=10, step=1
32
  )
33
 
34
- def generate_caption(video, max_length, min_length, beam_size, througputs):
35
  # read video
 
36
  container = VideoReader(video)
37
  clip_len = model.config.encoder.num_frames
38
  frames = container.get_batch(
@@ -55,7 +56,7 @@ with gr.Blocks() as demo:
55
 
56
  generate.click(
57
  generate_caption,
58
- inputs=[video, max_length, min_length, beam_size, througputs],
59
  outputs=text,
60
  )
61
 
 
31
  label="Min Length", minimum=1, maximum=10, value=10, step=1
32
  )
33
 
34
+ def generate_caption(video, max_length, min_length):
35
  # read video
36
+ throughputs=1
37
  container = VideoReader(video)
38
  clip_len = model.config.encoder.num_frames
39
  frames = container.get_batch(
 
56
 
57
  generate.click(
58
  generate_caption,
59
+ inputs=[video, max_length, min_length],
60
  outputs=text,
61
  )
62