Text_Summarizer / app.py
AyushDey's picture
Update app.py
7e8974e
raw
history blame
271 Bytes
from transformers import pipeline
pipe = pipeline('summarization', model="facebook/bart-large-cnn")
def summary(input):
value = pipe(input)
return value[0]['summary_text']
a = gr.Interface(fn=summary, inputs= 'text', outputs = 'text', title = 'Text Summarizer')