Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
pipe = pipeline('summarization', model="facebook/bart-large-cnn")
|
4 |
+
|
5 |
+
def summary(input):
|
6 |
+
value = pipe(input)
|
7 |
+
return value[0]['summary_text']
|
8 |
+
a = gr.Interface(fn=summary, inputs= 'text', outputs = 'text', title = 'Text Summarizer')
|