saidsef's picture
feat: update to text summarisation
e50c5bd verified
raw
history blame
224 Bytes
import streamlit as st
from transformers import pipeline
pipe = pipeline(task="summarization", model="facebook/bart-large-cnn")
text = st.text_area("Summarise the following")
if text:
out = pipe(text)
st.write(out)