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 = "Video Summary Generator", examples = [ ['https://www.youtube.com/watch?v=OaeYUm06in0&list=PLHgX2IExbFouJoqEr8JMF5MbZSbyC91-L&t=5761s', 'BART'], ['https://www.youtube.com/watch?v=Z1KwkpTUbkg', 'BART'], ['https://youtu.be/rIpUf-Vy2JA?t=5822', 'BART'], ['https://youtu.be/lvh3g7eszVQ?list=PLHgX2IExbFouJoqEr8JMF5MbZSbyC91-L&t=8928', 'BART'], ['https://youtu.be/OaeYUm06in0?list=PLHgX2IExbFouJoqEr8JMF5MbZSbyC91-L&t=5706', 'mT5'] ], enable_queue=True) interface.launch(debug=True)