Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
import streamlit as st
|
2 |
from main import read_pdf, extract_key_phrases, score_sentences, summarize_text
|
3 |
import io
|
4 |
-
import base64
|
5 |
|
6 |
# Initialize your Streamlit app
|
7 |
st.title("PDF to Bullet Point Summarizer π π")
|
8 |
|
9 |
-
# Initialize the Streamlit app
|
10 |
-
|
11 |
-
|
12 |
# File uploader for the PDF
|
13 |
uploaded_file = st.file_uploader("Upload your PDF document", type="pdf")
|
14 |
|
15 |
# Slider for users to select the summarization extent
|
16 |
summary_scale = st.slider("Select the extent of summarization (%)", min_value=1, max_value=100, value=20)
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
with st.spinner('Processing...'):
|
20 |
# Read the PDF content
|
21 |
text = read_pdf(io.BytesIO(uploaded_file.getvalue()))
|
|
|
1 |
import streamlit as st
|
2 |
from main import read_pdf, extract_key_phrases, score_sentences, summarize_text
|
3 |
import io
|
|
|
4 |
|
5 |
# Initialize your Streamlit app
|
6 |
st.title("PDF to Bullet Point Summarizer π π")
|
7 |
|
|
|
|
|
|
|
8 |
# File uploader for the PDF
|
9 |
uploaded_file = st.file_uploader("Upload your PDF document", type="pdf")
|
10 |
|
11 |
# Slider for users to select the summarization extent
|
12 |
summary_scale = st.slider("Select the extent of summarization (%)", min_value=1, max_value=100, value=20)
|
13 |
|
14 |
+
# Submit button
|
15 |
+
submit_button = st.button("Generate Summary")
|
16 |
+
|
17 |
+
# Check if the submit button is pressed
|
18 |
+
if submit_button and uploaded_file is not None:
|
19 |
with st.spinner('Processing...'):
|
20 |
# Read the PDF content
|
21 |
text = read_pdf(io.BytesIO(uploaded_file.getvalue()))
|