File size: 704 Bytes
112d5ac
 
7a7296d
 
a744fab
7a7296d
a744fab
 
7a7296d
112d5ac
 
 
 
 
 
 
a744fab
 
 
 
112d5ac
 
 
 
 
 
a744fab
112d5ac
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import gradio as gr

from process import inference

def clickit(video, prompt):
    return inference(
        video,
        prompt
    )

with gr.Blocks() as blok:
    with gr.Row():
        with gr.Column():
            video = gr.Video(
                label="video input",
            )
            prompt = gr.Text(
                label="Prompt",
                value="Please describe this video in detail."
            )
        with gr.Column():
            button = gr.Button("Caption it", variant="primary")
            text = gr.Text(label="Output")
        
        button.click(
            fn=clickit,
            inputs=[video, prompt],
            outputs=[text]
        )

blok.launch()