File size: 790 Bytes
66ee2b4
232d651
66ee2b4
bffc7a4
54a0cd0
 
bffc7a4
54a0cd0
 
 
66ee2b4
 
232d651
 
66ee2b4
54a0cd0
 
 
 
 
 
 
 
 
 
 
d48eb67
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from os import pipe
import gradio as gr
from functions.punctuation import punctuate

title = "sponsoredBye - never listen to sponsors again"
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."


def pipeline(video_url):
    video_id = video_url.split("?v=")[-1]
    punctuated_text = punctuate(video_id)
    return punctuated_text


# print(pipeline("VL5M5ZihJK4"))
demo = gr.Interface(
    fn=pipeline,
    title=title,
    description=description,
    inputs="text",
    outputs="text",
    examples=[
        "https://www.youtube.com/watch?v=VL5M5ZihJK4",
        "https://www.youtube.com/watch?v=VL5M5ZihJK4",
    ],
)
demo.launch(share=True)