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()