ysharma HF staff commited on
Commit
2a78406
1 Parent(s): 25acfe1
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def display_vid(html):
4
+ return html
5
+ demo = gr.Blocks()
6
+
7
+ with demo:
8
+ gr.Markdown("<h1><center>Ask a Question to a YouTube Video and get the timestamp where the probable answer is</center></h1>")
9
+ gr.Markdown(
10
+ "<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>"
11
+ "<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><div>I am using Qusetion-Answering, Sentence Transformers from HuggingFace Hub as my NLP tools to build this utility app. </div><br> <br> <br> <div> This App is Work in Progress, please bare with me.</div>
12
+ )
13
+ with gr.Row():
14
+ input_vid = gr.HTML(placeholder="Enter a video link here..")
15
+ #poem_txt = gr.Textbox(lines=7)
16
+ output_vid = gr.HTML()
17
+
18
+ b1 = gr.Button("Publish Video")
19
+ #b2 = gr.Button("Generate Image")
20
+
21
+ b1.click(display_vid, input_vid, output_vid)
22
+ #b2.click(poem_to_image, poem_txt, output_image)
23
+ #examples=examples
24
+
25
+ demo.launch(enable_queue=True, debug=True)