Last commit not found
raw
history blame
1.03 kB
import gradio as gr
TITLE = """<h2 align="center"> ✍️ Highlight Detection with MomentDETR </h2>"""
def submit_video(input_video, retrieval_text):
print(input_video)
print(retrieval_text)
return input_video
with gr.Blocks() as demo:
gr.HTML(TITLE)
with gr.Row():
with gr.Blocks():
with gr.Column():
gr.Markdown("### Input Video")
input_video = gr.PlayableVideo().style(height=500)
retrieval_text = gr.Textbox(
placeholder="What should be highlighted?",
visible=True
)
submit =gr.Button("Submit")
with gr.Blocks():
with gr.Column():
gr.Markdown("### Results")
with gr.Row():
output_video = gr.PlayableVideo().style(height=500)
submit.click(
fn=submit_video,
inputs=[input_video, retrieval_text],
outputs=[output_video]
)
demo.launch()