Spaces:
Sleeping
Sleeping
File size: 568 Bytes
e1ad024 632a4b4 8e23073 632a4b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import streamlit as st
from transformers import pipeline
# Load pipelines
pipe = pipeline("summarization", model="facebook/bart-large-cnn")
# Application
st.title("Make a summarization!")
user_input = st.text_input("Enter text to summarize:")
if st.button("Summarize Me!"):
if user_input:
with st.spinner('Summarizing...'):
result = pipe(user_input, max_length = 100)
summarization = result[0]['summary_text']
st.write(f"Summary: {summarization}")
else:
st.warning("Please enter some text to summarize!") |