Spaces:
Runtime error
Runtime error
themanas021
commited on
Commit
•
2260d33
1
Parent(s):
eda21d3
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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", "Pegasus"], type="value", label='Model')],
|
9 |
+
outputs = [gr.outputs.Textbox(
|
10 |
+
label="Summary")],
|
11 |
+
|
12 |
+
title = "Youtube Summarizer",
|
13 |
+
examples = [['https://www.youtube.com/watch?v=A4OmtyaBHFE', 'mT5'],
|
14 |
+
['https://www.youtube.com/watch?v=cU6xVZfkcgo', 'mT5']],
|
15 |
+
enable_queue=True)
|
16 |
+
|
17 |
+
interface.launch(debug=True)
|