demo-app / app.py
jerryjyl's picture
Update app.py
4d5b6b9 verified
raw
history blame contribute delete
288 Bytes
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)