Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,6 +49,18 @@ with st.expander("ℹ️ - About this app", expanded=True):
|
|
49 |
)
|
50 |
|
51 |
st.markdown("")
|
52 |
-
|
53 |
st.markdown("")
|
54 |
st.markdown("## 📌 Step One: Upload document ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
)
|
50 |
|
51 |
st.markdown("")
|
|
|
52 |
st.markdown("")
|
53 |
st.markdown("## 📌 Step One: Upload document ")
|
54 |
+
|
55 |
+
|
56 |
+
with st.container():
|
57 |
+
|
58 |
+
file = st.file_uploader('Upload PDF File', type=['pdf'])
|
59 |
+
if file is not None:
|
60 |
+
text = []
|
61 |
+
with pdfplumber.open(file) as pdf:
|
62 |
+
for page in pdf.pages:
|
63 |
+
text.append(page.extract_text())
|
64 |
+
text_str = ' '.join([page for page in text])
|
65 |
+
|
66 |
+
st.write('Number of pages:',len(pdf.pages))
|