import streamlit as st | |
from transformers import pipeline | |
pipe = pipeline("summarization", model="facebook/bart-large-cnn") | |
text = st.text_area("Enter a text paragraph to generate a summary!") | |
if text: | |
out = pipe(text, max_length=200, min_length=20, do_sample=False) | |
st.json(out) |