sahayk's picture
Update app.py
14a3fd3
raw
history blame contribute delete
402 Bytes
import streamlit as st
from transformers import pipeline
st.write("""
# Text Summarizer App
Enter text below and hit Enter to summarize using Facebook's BART LLM.
""")
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
ARTICLE = st.text_area('Enter some text here...')
if ARTICLE:
out = summarizer(ARTICLE, max_length=5000, min_length=30, do_sample=False)
st.json(out)