Spaces:
Sleeping
Sleeping
updated
Browse files
app.py
CHANGED
@@ -17,15 +17,11 @@ st.write("This app uses a Finetuned Bart model to summarize long text inputs.")
|
|
17 |
# Input text area for the user
|
18 |
user_input = st.text_area("Enter text to summarize:", height=300)
|
19 |
|
20 |
-
# Set summary parameters (optional)
|
21 |
-
max_length = st.slider("Maximum Summary Length", 30, 500, 150)
|
22 |
-
min_length = st.slider("Minimum Summary Length", 10, 100, 30)
|
23 |
-
|
24 |
# Summarize when the button is clicked
|
25 |
if st.button("Summarize"):
|
26 |
if user_input:
|
27 |
# Get the summary
|
28 |
-
summary = summarizer(user_input
|
29 |
# Display the result
|
30 |
st.subheader("Summary")
|
31 |
st.write(summary[0]['summary_text'])
|
|
|
17 |
# Input text area for the user
|
18 |
user_input = st.text_area("Enter text to summarize:", height=300)
|
19 |
|
|
|
|
|
|
|
|
|
20 |
# Summarize when the button is clicked
|
21 |
if st.button("Summarize"):
|
22 |
if user_input:
|
23 |
# Get the summary
|
24 |
+
summary = summarizer(user_input)
|
25 |
# Display the result
|
26 |
st.subheader("Summary")
|
27 |
st.write(summary[0]['summary_text'])
|