import numpy as np
import gradio as gr
def retrieval_t2v(x):
return None
def retrieval_v2t(x):
return None
title = """
Demo of xxx
"""
description = """This is the demo of xxx. Upload your videos and start retrieval!
"""
article = """
"""
with gr.Blocks() as demo:
gr.Markdown(title)
gr.Markdown(description)
gr.Markdown(article)
with gr.Tab("text to video"):
text_input = gr.Textbox()
video_output = gr.Video()
t2v_button = gr.Button("Retrieval")
with gr.Tab("video to text"):
video_input = gr.Video()
text_output = gr.Textbox()
v2t_button = gr.Button("Retrieval")
t2v_button.click(retrieval_t2v, inputs=text_input, outputs=video_output)
v2t_button.click(retrieval_v2t, inputs=video_input, outputs=text_output)
demo.launch()