Summarizer / app.py
ChandraP12330's picture
Update app.py
f6ca00f verified
raw
history blame contribute delete
351 Bytes
import streamlit as st
from transformers import pipeline
st.title("TLDR-izer")
article = st.text_area('Text to be summarized:', height=200)
if st.button("Do the Magic!"):
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
output= summarizer(article, min_length = 100 , max_length=200)
st.write(output[0]['summary_text'])