Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
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
|
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 |
|