Spaces:
Runtime error
Runtime error
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() |