I want to display a different video in the gr.components.Video() after the button is clicked.
def update_video(input_video):
video = input_video.replace('.mp4', '_out.mp4')
return [gr.components.Video.update(value=video)]
with gr.Blocks(theme=gr.themes.Soft()) as interface:
inputs = gr.components.Video()
update = gr.Button('Update')
update.click(update_video, inputs=inputs, outputs=[inputs])
interface.launch(height=700)
Tried the code above it results in an empty video box.