File size: 288 Bytes
efd06ec 4d5b6b9 efd06ec |
1 2 3 4 5 6 7 8 9 |
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) |