File size: 877 Bytes
b30c695
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from summarize import Summarizer

interface = gr.Interface(fn = Summarizer,
                        inputs = [gr.inputs.Textbox(lines=2, 
                                                    placeholder="Enter your link...",
                                                    label='YouTube Video Link'),
                                  gr.inputs.Radio(["mT5", "BART"], type="value", label='Model')],
                        outputs = [gr.outputs.Textbox(
                                                      label="Summary")],
                         
                        title = "Youtube Video Summarizer",
                        examples = [
                                   ['https://www.youtube.com/watch?v=WSbgixdC9g8', 'BART']
                                   ],
                        enable_queue=True)

interface.launch(debug=True)