Spaces:
Runtime error
Runtime error
File size: 524 Bytes
d3b8ec3 a5dd5c3 d3b8ec3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import streamlit as st
from transformers import pipeline
generate_summary = pipeline("summarization", model="pszemraj/led-large-book-summary")
def main():
st.title("Book Summarization App")
# Get user input
user_input = st.text_area("Enter the text you want to summarize:", "")
if st.button("Summarize"):
# Perform summarization
summary = generate_summary(user_input)
# Display result
st.write("Summary:")
st.write(summary)
if __name__ == "__main__":
main() |