Spaces:
Runtime error
Runtime error
| import numpy as np | |
| import gradio as gr | |
| def retrieval_t2v(x): | |
| return None | |
| def retrieval_v2t(x): | |
| return None | |
| title = """<h1 align="center">Demo of xxx</h1>""" | |
| description = """<h3>This is the demo of xxx. Upload your videos and start retrieval!</h3>""" | |
| article = """<div style='display:flex; gap: 0.25rem; '><a href=''><img src='https://img.shields.io/badge/Project-Page-Green'></a><a href=''><img src='https://img.shields.io/badge/Github-Code-blue'></a><a href=''><img src='https://img.shields.io/badge/Paper-PDF-red'></a></div> | |
| """ | |
| 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() |