File size: 1,312 Bytes
0e5d440
 
 
0a39b38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5360a19
0a39b38
 
 
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
29
30
import gradio as gr
from summarize import Summarizer

interface = gr.Interface(
    fn=Summarizer,
    inputs=[
        gr.Textbox(lines=2, placeholder="Enter your link...", label='YouTube Video Link'),
        gr.Radio(["mT5", "BART"], label='Model')
    ],
    outputs=gr.Textbox(label="Summary"),
    title="Video Summary Generator",
    examples=[
        ['https://www.youtube.com/watch?v=JN3KPFbWCy8&t=197s', 'BART'],
        ['https://www.youtube.com/watch?v=p3lsYlod5OU&t=5202s', 'BART'],
        ['https://www.youtube.com/watch?v=Gfr50f6ZBvo&t=1493s', 'BART'],
        ['https://www.youtube.com/watch?v=4oDZyOf6CW4&t=3149s', 'BART'],
        ['https://www.youtube.com/watch?v=lvh3g7eszVQ&t=291s', 'mT5'],
        ['https://www.youtube.com/watch?v=OaeYUm06in0', 'mT5'],
        ['https://www.youtube.com/watch?v=ZecQ64l-gKM&t=545s', 'mT5'],
        ['https://www.youtube.com/watch?v=5zOHSysMmH0&t=5798s', 'mT5'],
        ['https://www.youtube.com/watch?v=X0-SXS6zdEQ&t=23s', 'mT5'],
        ['https://www.youtube.com/watch?v=gFEE3w7F0ww&t=18s', 'mT5'],
        ['https://www.youtube.com/watch?v=Z1KwkpTUbkg&t=30s', 'mT5'],
        ['https://www.youtube.com/watch?v=rIpUf-Vy2JA&t=3542s', 'mT5'],
        ['https://www.youtube.com/watch?v=bgNzUxyS-kQ&t=3631s', 'mT5']
    ]
)

interface.launch(debug=True)