Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
pipe = pipeline('summarization'
|
5 |
|
6 |
def summary(input):
|
7 |
value = pipe(input)
|
8 |
return value[0]['summary_text']
|
9 |
-
a = gr.Interface(fn=summary, inputs= '
|
10 |
a.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline('summarization')
|
5 |
|
6 |
def summary(input):
|
7 |
value = pipe(input)
|
8 |
return value[0]['summary_text']
|
9 |
+
a = gr.Interface(fn=summary, inputs= gr.Textbox(lines=5 label='Enter Text'), outputs = gr.Textbox(label='Summary'), title = 'Text Summarizer')
|
10 |
a.launch()
|