IanRonk commited on
Commit
54a0cd0
1 Parent(s): 66ee2b4

Add examples etc

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -2,12 +2,26 @@ from os import pipe
2
  import gradio as gr
3
  from functions.punctuation import punctuate
4
 
 
 
5
 
6
- def pipeline(video_id):
 
 
7
  punctuated_text = punctuate(video_id)
8
  return punctuated_text
9
 
10
 
11
  # print(pipeline("VL5M5ZihJK4"))
12
- demo = gr.Interface(fn=pipeline, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
 
 
13
  demo.launch(share=True)
 
2
  import gradio as gr
3
  from functions.punctuation import punctuate
4
 
5
+ title = "sponsoredBye - never listen to sponsors again"
6
+ description = "Sponsored sections in videos are annoying and take up a lot of time. Improve your YouTube watching experience, by filling in the youtube url and figure out what segments to skip."
7
 
8
+
9
+ def pipeline(video_url):
10
+ video_id = video_url.split("?v=")[-1]
11
  punctuated_text = punctuate(video_id)
12
  return punctuated_text
13
 
14
 
15
  # print(pipeline("VL5M5ZihJK4"))
16
+ demo = gr.Interface(
17
+ fn=pipeline,
18
+ title=title,
19
+ description=description,
20
+ inputs="text",
21
+ outputs="text",
22
+ examples=[
23
+ "https://www.youtube.com/watch?v=VL5M5ZihJK4",
24
+ "https://www.youtube.com/watch?v=VL5M5ZihJK4",
25
+ ],
26
+ )
27
  demo.launch(share=True)