ysharma's picture
ysharma HF staff
1
53e45fe
raw
history blame
1.45 kB
import gradio as gr
def display_vid(video):
html = "<iframe width='560' height='315' src=video frameborder='0' allowfullscreen></iframe>"
return html
demo = gr.Blocks()
with demo:
gr.Markdown("<h1><center>Ask a Question to a YouTube Video and get the timestamp where the probable answer is</center></h1>")
gr.Markdown(
"<div>How many times have you seen a long video/podcast on Youtube and wondered only if there would have been 'explanatory' timestamps it would have been so much better..</div>"
"<div>Well, using this Space/App you can provide a YouTube video link and then provide some questions that you would like, and the App will generate timestamps/play video at those timestamps for you in the space provided. Idea is that your question could be like 'Is this xxxx thing covered in the video?', or maybe 'does the host talks about the architecture of the model', or maybe 'Does host talk about alien doorway on Mars?' and so on.</div><br> <br> <div> This App is Work in Progress, please bear with me.</div>"
)
with gr.Row():
input_vid = gr.Textbox() #gr.HTML(placeholder="Enter a video link here..")
#poem_txt = gr.Textbox(lines=7)
output_vid = gr.HTML()
b1 = gr.Button("Publish Video")
#b2 = gr.Button("Generate Image")
b1.click(display_vid, input_vid, output_vid)
#b2.click(poem_to_image, poem_txt, output_image)
#examples=examples
demo.launch(enable_queue=True, debug=True)