Spaces:
Runtime error
Runtime error
jaydeepkum
commited on
Commit
•
a999a30
1
Parent(s):
9120fe9
Create new file
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from summarize import Summarizer
|
3 |
+
|
4 |
+
interface = gr.Interface(fn = Summarizer,
|
5 |
+
inputs = [gr.inputs.Textbox(lines=2,
|
6 |
+
placeholder="Enter your link...",
|
7 |
+
label='YouTube Video Link'),
|
8 |
+
gr.inputs.Radio(["mT5", "BART"], type="value", label='Model')],
|
9 |
+
outputs = [gr.outputs.Textbox(
|
10 |
+
label="Summary")],
|
11 |
+
|
12 |
+
title = "Video Summary Generator",
|
13 |
+
examples = [
|
14 |
+
['https://www.youtube.com/watch?v=OaeYUm06in0&list=PLHgX2IExbFouJoqEr8JMF5MbZSbyC91-L&t=5761s', 'BART'],
|
15 |
+
['https://www.youtube.com/watch?v=U5OD8MjYnOM', 'BART'],
|
16 |
+
['https://www.youtube.com/watch?v=Gfr50f6ZBvo', 'BART'],
|
17 |
+
['https://www.youtube.com/watch?v=G4hL5Om4IJ4&t=2680s', 'BART'],
|
18 |
+
['https://www.youtube.com/watch?v=0Jd7fJgFkPU&t=8776s', 'mT5']
|
19 |
+
],
|
20 |
+
enable_queue=True)
|
21 |
+
|
22 |
+
interface.launch(debug=True)
|