import streamlit as st import transformers # Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("summarization", model="google/pegasus-xsum") text=st.text_input("Write your text") if st.button("Submit") st.write(pipe(text))