File size: 301 Bytes
82772fc
7862712
 
 
 
0565b17
7862712
1
2
3
4
5
6
7
import streamlit as st 
from transformers import pipeline
summarizer1 = pipeline("summarization", model = 't5-base')
user_input = st.text_area("Enter text to summarize here")
if st.button("Summarize"):
    summary_text = summarizer1(user_input, min_length=20, max_length=25)
    st.write(summary_text)